Deploying Rails applications on DreamHost using passenger

Source: Internet
Author: User
Tags ruby on rails

Wanstrath tweet about using passenger testimonials on DreamHost, reminding me that I should write a little about my experience. I have some small rails apps on the DreamHost and I'm happy with that.

Based on this article, Git ' n Your Shared Host on, in order to use the Capistranoas file I provided below for better deployment, you need a source control tool.

A total of three steps. Create your site, capify your application, deploy. Once you've done this a few times, these steps will take you only a few minutes, but if you're a beginner, don't be discouraged even if you spend a few hours, because you'll be quicker every time.

1. Create Your site

The first thing you need to do is use the DreamHost panel to create your site. After landing, click "Domains", then "Manage Domains" and "Add new Domain/sub-domain". The Rails app on DreamHost has two different points to the PHP app:

Make sure to select Ruby on Rails passenger.

Specify your Web directory: Yourdomain.com/current/public.

Look at the screenshot of the highlighted section of the picture below. Note: If you do not set Current/public as your web directory, you may gain unprecedented experience of failure.

Figure #1: Adding a Domain in DH ' s Panel

It is worth mentioning that whether you choose an existing user or create a new user, make sure that this user area is updated with the shell access, otherwise he will not have this right.

Because you set up your web directory to be current/public, DreamHost will automatically create a directory for you. Be sure to SSH login to your server and remove the current directory (RM-RF) so that Capistrano can use it appropriately as a symlink to the current version of your application.

2.Capify of your application

Now that the site is created, then install and configure CAPISTRANO.CD to your application directory, and run capify like this:

$ cd yourapp
$ capify .

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.