Sunday, February 4, 2007

Freezing Ruby Gems

Whenever a new gem version appears on the host, your Rails application will attempt to automatically upgrade to that version. This is convenient when in development, but after moving to production, it can cause things to break unexpectedly. For obvious reasons, you don't necessarily want your application being updated after it has been published. To prevent gems from updating, change directories to your application root, and issue the command “rake freeze_gems”. This copies the gems from /usr/lib/ruby/gems/1.8/gems/ (the default location) to /vendor/ and keeps them from being automatically updated.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home