Installation of Ruby On Rails would never be more easier. Here we provide the simple installation method. Please only use this on dedicated servers. Source from Wiki.
Install Ruby: (You can grab the latest source package from http://ruby-lang.org/en/20020102.html)
$ cd /usr/local/src
$ wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.4.tar.gz
$ tar -xvzf ruby-1.8.4.tar.gz
$ cd ruby-1.8.4
$ ./configure && make && make install
Next Ruby Gems: (Latest version and localized mirrors here http://rubyforge.org/frs/?group_id=126 )
$ cd /usr/local/src
$ wget rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz
$ tar -xvzf rubygems-0.9.0.tgz
$ cd rubygems-0.9.0
$ ruby setup.rb
Once Gems are installed its a whirl to install Rails:
$ gem install rails –include-dependencies
Now for FastCGI? and getting it to play nicely with Apache.
Install FastCGI?:
$ cd /usr/local/src
$ wget fastcgi.com/dist/fcgi-2.4.0.tar.gz
$ tar -xvzf fcgi-2.4.0.tar.gz
$ cd fcgi-2.4.0
$ ./configure && make && make install
And mod_fastcgi for Apache 1.3+ as DSO because cPanel uses EasyApache the location of apxs is different so these instructions deviate somewhat from the INSTALL docs.
$ cd /usr/local/src
$ wget fastcgi.com/dist/mod_fastcgi-2.4.2.tar.gz
$ tar -xvzf mod_fastcgi-2.4.2.tar.gz
$ cd mod_fastcgi-2.4.2
$ /usr/local/apache/bin/apxs -o mod_fastcgi.so -c *.c
$ /usr/local/apache/bin/apxs -i -a -n fastcgi mod_fastcgi.so
Now for Ruby fcgi: You could gem install fcgi but that currently installs version 0.8.5, so we recommend compiling 0.8.6 from source as below. 0.8.6.1 is now in the gem repository.
$ gem install fcgi
You now need to edit your Apache config file. By default its (/usr/local/apache/conf/httpd.conf). Add these lines: (tweak the last line accordingly, comments are welcome)
LoadModule fastcgi_module libexec/mod_fastcgi.so
FastCgiIpcDir /tmp/fcgi_ipc/
AddHandler fastcgi-script .fcgi
FastCgiConfig -maxClassProcesses 20 -maxProcesses 20 -minProcesses 1 -processSlack 1 -initial-env RAILS_ENV=production -idle-timeout 120
Make sure /tmp/fcgi_ipc/ is writable and executable by Apache.
$ mkdir -p /tmp/fcgi_ipc
$ chown nobody.nobody /tmp/fcgi_ipc -R
$ chmod 755 /tmp/fcgi_ipc -R
Now restart Apache:
$ /etc/rc.d/init.d/httpd restart
Ruby on Rails should now be successfully installed. Thank you
Enjoyed this article?
WebsiteWordpress themes!










{ 1 comment… read it below or add one }
Hi there,
Ugh, I liked! So clear and positively.
Have a nice day