Rails rake_freeze_other_gems
Posted by Rick DeNatale Mon, 02 Jul 2007 15:36:00 GMT
I’m working on a team rails project and adding some timezone support. I installed the tzinfo gem and, since I want to make sure that it gets to the production server, I used the freeze_other_gems rake task, which I’d found by doing a rake -T.I’d never used it before so I googled to find some documentation. It wasn’t exactly clear, but it turns out that you need to edit the fourth line of the lib/tasks/gems.rake file
libraries = %w(progressbar tzinfo)The progressbar gem was already there so I added tzinfo.
Then I invoked:
$ rake freeze_other_gemsOnly to get the error:
rake aborted! undefined method `version’ for nil:NilClassThis problem had been seen by others and commented on. I guessed that the problem was not with my newly added gem, but the progressbar gem which was already listed, apparently by one of the other developers.
The Quick Fix
The first step was to determine the version of the progressbar gem. I looked at lib where it had been installed, and found that it was version 0.3. I then installed the gem, and reran the freeze_other_gems rake task.Success









