Question

I am trying to deploy my first Rails app. I copied all files to ~/mysite.com and set up MySql.

Here's my configuration at Dreamhost.

Now when I visit mysite.com I get a 404 error (which isn't my custom 404 error). It seems that Passenger does not run!

What should I do? Do I need to start Passenger? (touch tmp/restart.txt does nothing)

Was it helpful?

Solution

Based on your stack trace at http://www.foto-fiori.com/ it looks like there's a gem missing on your production server. Check the gem list in your environment.rb config file and ensure all gems are installed. You can also ssh into your application and run rake gems.

rake gems RAILS_ENV=production

You may want to freeze the gems if Dreamhost does not allow you to install them.

rake rails:freeze:gems

OTHER TIPS

4 things to check first:

  1. You enabled Ruby on Rails Passenger (mod_rails) for the domain name
  2. You point your domain name configuration to the public directory of your application.
  3. Your Rails Version (As of 8/5/2009 Rails is up to 2.3.3 but Dreamhost is at 2.2.2)
  4. All your gem dependencies are available at Dreamhost, in your home folder, or are unpacked in your rails application.

If passenger is giving you an error message then your rails app isn't starting, but passenger will put something in the apache logs.

These are in: ~/logs/domain.name/http/

Usually this is because of the wrong rails version or a missing gem or some other mismatch between the dreamhost environment and your development machine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top