How to Install and Use Edge Rails?
1. If you want to freeze your application to the gems version currently available on your system, then go to root of your rails application and run
rake rails:freeze:gems
By running the above command a new directory “rails” will be created inside your vendors directory. When you run your rails framework, Your application will first check for this directory and if it’s present, Rails components will be loaded from this directory instead of using your system copy of rails, and thus you are switched from Gems Rails to Edge Rails.
2. If at any point of time, you want to switch back from Edge Rails to Gem Rails. You can always do it by running the below command
rake rails:unfreeze
3. If you want to freeze your application to the latest development version, then run.
rake rails:freeze:edge
once you are switched to the latest development version, your javascripts and other configuration files needs to be updated corresponding to the latest version. For this you need to run,
rake rails:update
4. Freeze your application to a different version.
Consider you want to freeze your rails application to rails version 2.1.0, then you have to just run the command
rake rails:freeze:edge RELEASE=2.1.0
5. In order to find out what version of rails your application uses, From the root of your rails application, run
script/about
your output will be something like below.
About your application’s environment
Ruby version 1.8.6 (i686-linux)
RubyGems version 1.1.1
Rails version 2.1.0
Active Record version 2.1.0
Action Pack version 2.1.0
Active Resource version 2.1.0
Action Mailer version 2.1.0
Active Support version 2.1.0
Edge Rails revision unknown
Application root your application path
Environment development
Database adapter mysql
Database schema version 20090622125330
Loaded suite script/about
Started
Finished in 0.000606 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
6. Installing all other application depending gems locally.
1. Consider your application require the following two gems
a) will_paginate
b) mini_magick
Now go to your config/environment.rb file and config the required gems as below.
Rails::Initializer.run do |config|
config.gem “mini_magick”
config.gem “will_paginate”
end
2. Now consider these gems are not yet installed in your local machine. In order to install the above gems in your local machine, from the root of your application run
rake gems:install
If you have already installed the above gems at some point of time, then skip this step and proceed to next step.
3. Now In order to make the above gems application-dependent rather than system-dependent gems. You need to unpack all these gems inside your application using
rake gems:unpack
The above command will create a new directory “gems” inside your vendor folder and unpack the two gems “will_paginate” and “mini_magick” inside the “gems” directory.
4. Unpack gems individually
There are two ways to unpack the gems individually.
Either run this from the root of your application.
rake gems:unpack GEM=will_paginate
or
change your directory to /vendor/gems and run
gem unpack “gem_name”
1. If you want to freeze your application to the gems version currently available on your system, then go to root of your rails application and run
rake rails:freeze:gems
By running the above command a new directory “rails” will be created inside your vendors directory. When you run your rails framework, Your application will first check for this directory and if it’s present, Rails components will be loaded from this directory instead of using your system copy of rails, and thus you are switched from Gems Rails to Edge Rails.
2. If at any point of time, you want to switch back from Edge Rails to Gem Rails. You can always do it by running the below command
rake rails:unfreeze
3. If you want to freeze your application to the latest development version, then run.
rake rails:freeze:edge
once you are switched to the latest development version, your javascripts and other configuration files needs to be updated corresponding to the latest version. For this you need to run,
rake rails:update
4. Freeze your application to a different version.
Consider you want to freeze your rails application to rails version 2.1.0, then you have to just run the command
rake rails:freeze:edge RELEASE=2.1.0
5. In order to find out what version of rails your application uses, From the root of your rails application, run
script/about
your output will be something like below.
About your application’s environment
Ruby version 1.8.6 (i686-linux)
RubyGems version 1.1.1
Rails version 2.1.0
Active Record version 2.1.0
Action Pack version 2.1.0
Active Resource version 2.1.0
Action Mailer version 2.1.0
Active Support version 2.1.0
Edge Rails revision unknown
Application root your application path
Environment development
Database adapter mysql
Database schema version 20090622125330
Loaded suite script/about
Started
Finished in 0.000606 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
6. Installing all other application depending gems locally.
1. Consider your application require the following two gems
a) will_paginate
b) mini_magick
Now go to your config/environment.rb file and config the required gems as below.
Rails::Initializer.run do |config|
config.gem “mini_magick”
config.gem “will_paginate”
end
2. Now consider these gems are not yet installed in your local machine. In order to install the above gems in your local machine, from the root of your application run
rake gems:install
If you have already installed the above gems at some point of time, then skip this step and proceed to next step.
3. Now In order to make the above gems application-dependent rather than system-dependent gems. You need to unpack all these gems inside your application using
rake gems:unpack
The above command will create a new directory “gems” inside your vendor folder and unpack the two gems “will_paginate” and “mini_magick” inside the “gems” directory.
4. Unpack gems individually
There are two ways to unpack the gems individually.
Either run this from the root of your application.
rake gems:unpack GEM=will_paginate
or
change your directory to /vendor/gems and run
gem unpack “gem_name”
Comments
Post a Comment