SVN: Attempted to lock an already-locked dir Error
Posted by e. | Filed under Technology
So you’ve been working hard on your project and you’re ready to check in when all of a sudden Subversion throws you this weird error message: Attempted to lock an already-locked dir. “What the hell is this about?” you ask yourself. Well, Subversion is a really cautious fella and likes to bookkeep all of its transactions. [...]
Tags: Subversion, SVN, svn cleanup, svn lock
Installing Grails on Mac OSX Leopard
Posted by e. | Filed under Grails, Technology
Here’s a quick tutorial to get Grails up and running on your Mac OSX machine:
Download the latest Binary from here.
To keep it clean, let’s unpack the archive and move the folder to /usr/share. Open up a terminal window and type: $ sudo mv ~/Downloads/grails-1.1 /usr/share
Change the permissions on these files $cd /usr/share
$sudo chown -R [...]
Javascript Countdown Timer
Posted by e. | Filed under JavaScript
Need a stylish Javascript countdown timer? No problem. Here’s a quick and dirty way to get one up that’s clean and usable. Check out the demo to see it in action.
To install:
Add the following HTML snippet to the section of your page where you want the timer to be placed
<div id="counter" class="counter">
<ul class="countdown">
<li><div class="countdown_num" id="countdown_day"></div><div>Days</div></li>
<li><div [...]
Tags: countdown, JavaScript, timer
Populating Tables with Data Using Migrations
Posted by g. | Filed under Ruby on Rails, Technology
I can think of very few Rails sites that don’t need some kind of data pre-populated in their tables. When you talk to a Rails developer, the first thing that comes to mind when talking about populating the db is fixtures. This is not what we’re talking about here. Fixtures populate your TEST database with [...]
Tags: data, database, migrations, populating, rails
Rotating Ruby on Rails Log Files Using Logrotate
Posted by g. | Filed under Ruby on Rails, Technology
If you don’t pay much attention to the size of your log files in your production apps, you might want to take a look! If left alone, files such as production.log can grow quite large and bog down your application or server’s performance. In Linux, there is a tool called logrotate to help you manage [...]
Pass Additional Parameters to REST Named Routes
Posted by g. | Filed under Ruby on Rails, Technology
Here’s a quick one, but a useful reference nonetheless. How do you pass additional parameters to REST named routes?
Say you have the following route from the restful_authentication plugin:
map.logout ‘/logout’, :controller => ’sessions’, :action => ‘destroy’
This enables you to say something like this:
redirect_to logout_url
And if you want to pass extra params to that URL? It’s as [...]
Tags: named routes, parameters, params, rails, REST
Using Reserved Words in your Database Tables
Posted by g. | Filed under Ruby on Rails
I was banging my head against the wall the other day for several hours wondering why an extremely simple MyModel.find(:all) call was giving me the error: ArgumentError: wrong number of arguments (0 for 1).
There was absolutely nothing strange about the table, my controller, or model object. The next day it dawned on me, I thought [...]
Tags: database, MySQL, rails, reserved words, table
Inspiration - 50 Beautiful Movie Posters
Posted by e. | Filed under Design
50 Beautiful Movie Posters
http://www.smashingmagazine.com/2008/10/12/50-beautiful-movie-posters/
- My personal favorites:
Alfred Hitchcock’s The Birds
Pulp Fiction
THX 1138
Tags: Design, Movie Posters
5 Awesome JavaScript Solutions
Posted by e. | Filed under JavaScript
Here are 5 awesome JavaScript solutions for your professional design:
Facebook Inspired Auto-Complete Form - One of the best multiple select text forms is on facebook. This post shows you how to do it.
CSS Sprites Using JQuery - A cool post that shows you how to do CSS Sprites using JQuery. Very Useful
JParallax - This is a cool tool [...]
Tags: Ajax, CSS, Facebook, Forms, JavaScript, JQuery
Going from acts_as_taggable_on_steroids to acts_as_taggable_on Plugin
Posted by g. | Filed under Ruby on Rails
For one reason or another, once I upgraded my app to Rails 2.1, I started getting these mysterious “stack level too deep” errors. I’m not too sure what that even means, but I won’t get into it here. After diving into the stack trace for a little while, I noticed that the problem was with [...]
Tags: acts_as_taggable_on, acts_as_taggable_on_steroids, migrate, plugins, Rails 2.1