User Tools

Site Tools


Ruby on Rails

Sub Sites

Hosting Rails applications

Install Ruby, rubygems & Rails

Install ruby

yum install ruby ruby-devel

Install rubygems

wget http://<rubygems>
tar xzfv <rubygems>.tar
cd rubygems
ruby setup.rb

Install Rails

gem install rails

MySQL support

gem install mysql -- --with-mysql-config=/usr/bin/mysql_config

or alternatively

gem install mysql -- --with-mysql-dir=/usr/local/mysql

Install Ruby & rubygems from source

Include /usr/local/bin into your path:

export PATH=/usr/local/bin:$PATH

Do the following to add the path permanently:

vim  /etc/profile.d/

Enter this export statement:

# include the ruby binary (sh)
export PATH=/usr/local/bin:$PATH

Compile / install ruby:

tar -xzvf ruby-1.8.6-p110.tar.gz
cd ruby-1.8.6-p110
./configure --prefix=/usr/local
make install

Check if ruby is installed properly:

# ruby -v
ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-linux]
# which ruby

Install rubygems:

tar -xzvf rubygems-1.2.0.tgz
cd rubygems-1.2.0
ruby setup.rb

Freeze Rails Applications

Ruby on Rails allows you to “freeze” the version of Rails used by your application. When you freeze Rails, your application will always use that version of Rails and the associated Ruby Gems, regardless of what version is installed on the server. You can choose which version of Rails you want to freeze to.

Freezing Rails is recommended if you are using a Rails application for a business site or another production environment where stability is the most important concern. If you don't freeze your application, there is a small possibility that your application might stop working due to compatibility problems when a new version of Rails is installed on our servers.

However, keep in mind that if you freeze your application to use a current (or older) version of Rails, you will not get the security benefits of automatic upgrades. You should make sure you're keeping track of Rails versions yourself (for example, by subscribing to the Rails mailing lists) and upgrading your frozen version of Rails as necessary.


Change to the application directory and run the following command to freeze this application to the version of Rails that is currently on our servers.

rake rails:freeze:gems

You can also define a explicit rails version:

rake rails:freeze:gems RELEASE=2.3.0

Show the version actually installed:

ruby script/about


Unfreeze a frozen version with this command:

rake rails:unfreeze
/srv/ · Last modified: 2012/11/09 13:16 by niwo