Pages

How to set up ( Fedora php ruby on rails )

Showing posts with label passenger. Show all posts
Showing posts with label passenger. Show all posts

Sunday, August 2, 2009

Ruby on rails Apache passenger Fedora how to install passenger on feodra

Running rails using apache
After you have install ruby on rails on your system you just need to follow these steps to use apache server as you web server for development or for production environment.

sudo gem install passenger

sudo passenger-install-apache2-module






   LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/apache2/mod_passenger.so    PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4    PassengerRuby /usr/bin/ruby 




you may have different line as shown in the image so copy these lines in your httpd.conf file right after the modules






Now next step is to create a Virtual host in httpd.conf file of your apache server .

<virtualhost * >
ServerName ror.blog.com
DocumentRoot /home/ismail/www/blogs/public
RailsEnv development
RailsBaseURI /blogs

</virtualhost>


last of all now you have to make a symbolic link to make rails up and running



ln -s /home/ismail/www/blogs/public  /var/www/html/blogs 
The folder of rails is public so what so ever your application is your symbolic link must point toward the public folder of that application.
Now you may restart you web server and enjoy using ruby on your favorite server.