Deploying Rails 2.3.4 Application
With latest Rails distribution version 2.3.4, the application deployment process has changed significantly. Now Rails usage the Phusion PassengerTM for executing rails application. This makes managing an application easier and also reduces the number of steps in deploying new rails application.
Now follow below given steps to make your application working on the hosting server:
- Open a SSH session and go at the folder where you want to create your application.
- Create a rails application using the command: rails <project_name> -d mysql
- Now create an .htaccess file in your <project_name>/public directory with content as given below:
RailsEnv development
PassengerEnabled on
PassengerAppRoot /home/<account_user_name>/<complete_path_to_project_folder>/<project_name>
- Create a text file named “restart.txt” in the <project_name>/tmp folder. This will be used when you need to restart your application. Use the following command to restart your app as required:
touch /home/<account_user_name>/<complete_path_project_folder>/<project_name>/tmp/restart.txt
- Now to access your application from web create symbolic link in your public_html OR subdomain folder as given below:
ln -s /home/<account_user_name>/<complete_path_project_folder>/<project_name>/public /home/<account_user_name>/public_html/<public_app_name>
- Change your database configuration as required.
Now, you should be all right and ready to show your work to the rest of the world! You will be able to access the index page by typing:
http://www.your_domain.com/<public_app_name>
Search the site
Random Testimonial
- ~ Elance ID – gtownwebdev
"Nirvaat was responsive, fast, knowledgeable, professional and the price was great. I am thrilled to have found" - Read more testimonials »
What's the little bird saying?
- @pavanagrawal If computers will start asking questions then who will answer it!!!!! we have to creat a human version of google! in reply to pavanagrawal 1 week ago
- Turn a USB Flash Drive Into Extra Virtual RAM [USB Drive] http://bit.ly/cb9fOT 2010-06-28
- Is Entrepreneurship Just About the Exit? http://bit.ly/99oan9 2010-06-12
- More updates...
Posting tweet...
