views:

229

answers:

3

Hello all,

This is my first stab at Ruby on Rails. Just deployed a very simple app to Heroku.

The thing is that my app runs flawlessly on mongrel development; When I run it with "mongrel_rails start -e production" however, I get the error "We're sorry, but something went wrong."

For the life of me, I couldn't debug this. Heroku logs is not returning anything, the Exceptional addon in Heroku is not returning anything, and I cannot find mongrel.log on my Windows machine (when I run mongrel using: mongrel_rails start -e production -d"

I'm using Rails 2.3.5 and sqlite3 with bundler to pack my gems.

I was told that probably rails is not booting up correctly. I can't find any other way to diagnose this. Any ideas?

Thanks,
ANaimi

+1  A: 

Take a look at your log/production.log file. That should contain detailed information about what's going on. It will usually contain a line that specifies the name of a gem that needs to be installed.

Heroku doesn't use mongrel, so I'm assuming that's what you're trying to do to figure out why it isn't working when you push it to heroku.

I've found, in most cases, my heroku problems have been because of uninstalled gems. Make sure you create a gem manifest.

Tim Sullivan
log/production.log is empty. The app also doesn't work on my machine on production (so probably its not a heroku problem.) I'm using bundler, which I assumed it is a better alternative to gem manifest - am I wrong?Thanks for the fast response.
ANaimi
Heroku deals with gems separately from your project or local machine. It installs them into your account based exclusively on the contents of the manifest.What happens when you run `script/server -e production`?
Tim Sullivan
A: 

Try tailing logs while booting up. From the terminal in the log directory do: tail -f *.log and then launch the app from another terminal (likely it's development.log since you're probably running in development mode.)

Dave Sims
Oh, it could also be that your production database doesn't contain the stuff that you need (maybe it's blank!). I totally made this mistake on my first deploy.
normalocity
A: 

Not sure if this got definitively answered, however, check your '%app_root%/config/environments/' folder, and compare 'development.rb' to 'production.rb'.

Make sure that you have all necessary settings in the production.rb file - might have missed something important there.

normalocity