简体   繁体   中英

RoR app running on mongrel development but not production

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

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 .

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.)

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM