Tech Curiosity & Bio Curiosity Discussion Forum Index Tech Curiosity & Bio Curiosity Discussion Forum

 
 HomeHome | ServicesServices | ContactContact Us
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
  Post GuidelinesPosting Guidelines    ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  TutorialsFree Tutorials - Linux | Web Hosting | Web Templates | Bioinformatics | Free BioScripts
 

Allwebco Website Templates Reliable Web Solutions
How to setup rails on cpanel?

 
Post new topic   Reply to topic    Tech Curiosity & Bio Curiosity Discussion Forum Index -> Ruby on Rails Web Hosting
View previous topic :: View next topic  
Author Message
Pinki



Joined: 03 Jun 2007
Posts: 1

PostPosted: Fri Jun 15, 2007 4:14 pm    Post subject: How to setup rails on cpanel? Reply with quote

Hi,
Can any one help me to setup rails on cpanel. I am working as a Linux web server admin. I would really appreciate if any one can help we with a step by step procedure to setup rails on Cpanel.
Back to top
View user's profile Send private message
telson



Joined: 29 Nov 2006
Posts: 123

PostPosted: Fri Jun 15, 2007 7:20 pm    Post subject: Get Rails Running Reply with quote

You need to login as the root user, install ruby, gems, rails, fcgi, mod_fastcgi and add a configuration line to http.conf and restart as follows.

$ cd /usr/local/src
$ wget ftp.ruby-lang.org/pub/ruby/ruby-1.8.4.tar.gz
$ tar -xvzf ruby-1.8.4.tar.gz
$ cd ruby-1.8.4
$ ./configure && make && make install

$ cd /usr/local/src
$ wget rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz
$ tar -xvzf rubygems-0.8.11.tgz
$ cd rubygems-0.8.11
$ ruby setup.rb

$ gem install rails

$ 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

$ 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

$ gem install fcgi

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

Then in /etc/httpd/conf/httpd.conf add

LoadModule fastcgi_module libexec/mod_fastcgi.so
<IfModule mod_fastcgi.c>

FastCgiIpcDir /tmp/fcgi_ipc/
AddHandler fastcgi-script .fcgi

< /IfModule>

install any other gems you want like rmagick and gettext and then restart
apache however you like.. Remember if you install a gem you must restart
apache to be able to use it.

Now to actually get rails running, follow what I have done with this domain
use your own user

$ su people
$ cd ~
$ rails test
$ cd public_html
$ ln -s ../test/public/ rails
$ cd ../test/
$ chmod -R 777 tmp/
$ cd public
$ chmod 755 dispatch.fcgi
$ vim .htaccess

chmod -R a+rwx tmp is probably better than 777, but it is an afterthought to
just getting this done

Change “dispatch.cgi” to “dispatch.fcgi”

Load up for the website: domainname.com/rails/

Now you will find Rails running.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Tech Curiosity & Bio Curiosity Discussion Forum Index -> Ruby on Rails Web Hosting All times are GMT + 5.5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Help us in our Mission - Donate to TechCuriosity


 
Partners:
Web hosting comparison | Web Hosting | Dedicated Server | Link Building SEO