yum install ruby ruby-devel
wget http://<rubygems> tar xzfv <rubygems>.tar cd rubygems ruby setup.rb
gem install rails
gem install mysql -- --with-mysql-config=/usr/bin/mysql_config
gem install mysql -- --with-mysql-dir=/usr/local/mysql
Include /usr/local/bin into your path:
Do the following to add the path permanently:
Enter this export statement:
# include the ruby binary (sh) export PATH=/usr/local/bin:$PATH
Compile / install ruby:
wget http://rubyforge.org/frs/download.php/25689/ruby-1.8.6-p110.tar.gz tar -xzvf ruby-1.8.6-p110.tar.gz cd ruby-1.8.6-p110 ./configure --prefix=/usr/local make make install
Check if ruby is installed properly:
# ruby -v ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-linux] # which ruby /usr/local/bin/ruby
wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz tar -xzvf rubygems-1.2.0.tgz cd rubygems-1.2.0 ruby setup.rb
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.
You can also define a explicit rails version:
rake rails:freeze:gems RELEASE=2.3.0
Show the version actually installed:
Unfreeze a frozen version with this command: