Hopefully someone can help me with this. I created a new RoR app through the control panel. Then followed the instructions to install the sqlLite ruby gem from source I then followed the "Deploying a Ruby on Rails Application" guide to deploy my own app. After deploying my own app I ran bundle install and it ran without error. It is a very basic RoR app it has one controller called static_pages and two views called home and about to go with it. the routes.rb has this:
Now when I got to my site: http://username.webfactional.com/static_pages/home and I get an Internal Server Error (500) Here is what is in the nginx error.log
Since I'm still very new to RoR, I have no idea what is causing the problem especially since this very basic. Any help would be greatly appreciated Regards, asked 16 Mar '12, 21:39 ckooiker |
It looks like another instance of nginx is running. Have you tried restarting the nginx server after making your changes? You might also want to enable development to get more info from RoR. answered 16 Mar '12, 23:00 johns Thanks for your reply johns. When I switched into development mode it complained about not being able to find the JavaScript runtime. After installing the execjs and therubyracer gems the issues went away, and I could properly view my 2 static pages. But after turning off the development mode I still get the same 500 error as before.
(16 Mar '12, 23:51)
ckooiker
Do you have different database settings/drivers for production vs development? Are there any other factors between the configuration files that differs? Trying to isolate what is different between the 2 configurations would be the next step.
(17 Mar '12, 01:45)
johns
No the database settings are same. In my production.rb I set this line: config.consider_all_requests_local = true. This turns on the full error reports after restarting I got this error:application.css isn't precompiled. So I set config.assets.compile = true which solved the issue.
(17 Mar '12, 10:39)
ckooiker
Hi, You might also want to run "bundle exec rake assets:precompile RAILS_ENV=production" so assets are precompiled instead of being compiled live (on demand).
(17 Mar '12, 11:24)
todork
Yes I did that and after doing that I set the config.assets.compile back to false. Thanks! So I'm assuming that every time I add a new asset (js, img, css) I should be running the precompile command correct?
(17 Mar '12, 11:40)
ckooiker
Yes, I believe so.
(17 Mar '12, 11:42)
todork
showing 5 of 6
show 1 more comments
|