How to freeze my Rails application?, Why I Should freeze my Rails application?

Ruby on Rails allows you to “freeze” the version of Rails used by your application.

1. Following command will freeze your application to the version of Rails that is currently on server:

rake rails:freeze:gems

This command will copy the Rails files to the “vendor/rails” directory of the application. When the Rails application the it will first check for the presence of “vendor/rails” directory. If it exists, Rails will load the Rails components from the directory instead of using the main server copy of Rails.

Unfreezing:

rake rails:unfreeze

Freezing to a different version

This command freezes the application to Rails 2.2.2:

rake rails:freeze:edge RELEASE=2.2.2

Following command freezes Rails to the current development version of your application:

rake rails:freeze:edge

To Find the Rails version of your application using use this command:

script/about

After updating Rails version update your configuration file “config/boot.rb”:

rake rails:update

Advertisements

One thought on “How to freeze my Rails application?, Why I Should freeze my Rails application?

Add yours

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: