Post Reply  Post Thread 
Install Ruby On Rails
Author Message
Nilesh
Super Moderator
******


Posts: 42
Group: Super Moderators
Joined: Jul 2007
Status: Offline
Reputation: 0
Thank 0
0 was given thank in 0 posts
Post: #1
Install Ruby On Rails

Hello,

Following are the step which help you to install Ruby On Rails on linux server.

Download Ruby

Quote:
wget http://rubyforge.org/frs/download.php/23...8.2.tar.gz
tar zxvf ruby-1.8.2.tar.gz
cd ruby-1.8.2.tar.gz


Configure ruby

Quote:
./configure
make
make install


Then download the rubygems

Quote:
wget http://rubyforge.org/frs/download.php/52...0.8.11.tgz
gunzip rubygems-0.8.11.tgz
tar xvf rubygems-0.8.11.tgz
cd rubygems-0.8.11.tgz


Install rubygems

Quote:
ruby setup.rb


Once Gems are installed its a whirl to install Rails:

Quote:
$ gem install rails


Install FastCGI:
(‘Sourced’ from http://fastcgi.com/dist/)

Quote:
$ 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+
I installed mod_fastcgi as a DSO.
Because cPanel uses EasyApache the location of apxs is different so these instructions deviate somewhat from the INSTALL docs. (ymmv!)


Quote:
$ 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



Quote:
gem install fcgi


You now need to edit your Apache config file.
By default its (/etc/httpd/conf/httpd.conf)

Add these lines:

Quote:
LoadModule fastcgi_module libexec/mod_fastcgi.so

<IfModule mod_fastcgi.c>
FastCgiIpcDir /tmp/fcgi_ipc/
AddHandler fastcgi-script .fcgi
</IfModule>


Make sure /tmp/fcgi_ipc/ is writable and executable by Apache
(Apache runs as ‘nobody’ on my Machine, this may differ for you)

Quote:
$ mkdir -p /tmp/fcgi_ipc
$ chown nobody.nobody /tmp/fcgi_ipc -R
$ chmod 755 /tmp/fcgi_ipc -R


Now restart Apache:

Quote:
$ /etc/rc.d/init.d/httpd restart



You can get manual for ruby in following links .

http://www.swimshark.ca/rails/testing_tutorial.pdf
http://manuals.rubyonrails.com/read/chapter/35


~~~ Cool Buddy ~~~

ADD TO DEL.ICIO.US  ADD TO DIGG  ADD TO FURL  ADD TO NEWSVINE  ADD TO NETSCAPE 
ADD TO TECHNORATI FAVORITES  Technorati ADD TO SQUIDOO  ADD TO WINDOWS LIVE  ADD TO YAHOO MYWEB  ADD TO ASK 
ADD TO REDDIT  ADD TO STUMBLEUPON  ADD TO GOOGLE   

07-16-2007 07:56 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: