I have successfully deployed the Rails tutorial demo app (http://ruby.railstutorial.org/chapters/a-demo-app#top) on Heroku, and I'm trying to do the same here on WebFaction. My source code for this app is at https://github.com/jhsu802701/ror-demo . I followed the the WebFaction documentation on deploying a Rails app. However, my Demo app behaves differently on WebFaction than it does on Heroku and locally. I know that I have WebFaction set up to forward people to the correct app. You can see that when I make a modification to the public/index.html page, the result shows up as expected at http://doppler.webfactional.com/ . But when I change the name of public/index.html file to index2.html, I'm still getting an error message instead of the list of users at http://doppler.webfactional.com/users . What is the critical step that I need to take on WebFaction that wasn't necessary locally or in Heroku? UPDATE 1: I used Capistrano to try to deploy the demo Rails app, but I'm still back where I started. I used the procedure at http://docs.webfaction.com/software/rails.html , and I entered the "bundle install" and "rake db:migrate" commands from inside my app on WebFaction. Everything seems to work (no error messages) until I use my browser to open the URL http://testrails.doppler.webfactional.com/users . Instead of being given an option to create users, I get the "We're sorry, but something went wrong." error message. The contents of the production.log file are as follows: Connecting to database specified by database.yml Started GET "/users" for 74.5.73.237 at 2013-03-23 03:51:14 +0000 Processing by UsersController#index as HTML Completed 500 Internal Server Error in 23ms asked 21 Mar '13, 14:22 dopplervalue... |
I missed the troubleshooting section at the bottom of WebFaction's Rails page (http://docs.webfaction.com/software/rails.html), and this turned out to be the solution I was looking for. All I had to do was open the nginx.conf file and add the line "rails_env development;" within the server block. Now my Rails app works just as well on my WebFaction site as it does in my development environment. answered 22 Mar '13, 23:26 dopplervalue... Is there a way to mark this question as resolved?
(22 Mar '13, 23:27)
dopplervalue...
Yes, just accept your answer by clicking the check mark.
(23 Mar '13, 07:33)
timg ♦♦
Unfortunately, I don't see any check mark that I can click. I always see the check mark available on StackOverflow, but I can't see it here.
(26 Mar '13, 23:48)
dopplervalue...
(27 Mar '13, 11:38)
seanf
Unfortunately, I don't see a check mark below the thumbs-down icon on this page. (Yet I can see the check mark for other questions I've posted.)
(27 Mar '13, 17:59)
dopplervalue...
Ah, I just realized that you answered your own question! OSQA (the forum software) won't let you accept your own answers, so I'll mark it for you.
(27 Mar '13, 18:04)
seanf
showing 5 of 6
show 1 more comments
|
The answer to this question really depends on the actual error.
If you look in your Rails log (
~/webapps/app/project/log/production.log
or~/webapps/app/project/log/development.log
, depending on your active configuration), you should be able to see a descriptive error message that will tell you what the actual problem is, instead of a generic Rails "We're sorry" message.