Notice: Google is retiring their OpenID 2.0 authentication service. If you are using Google OpenID as your primary means to authenticate on this forum, then please either:

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:

get "static_pages/home"  
get "static_pages/about"

Now when I got to my site: and I get an Internal Server Error (500)

Here is what is in the nginx error.log

cache: [GET /assets/rails.png] miss
cache: [GET /static_pages/home] miss
cache: [GET /static_pages/home/] miss
cache: [GET /assets/rails.png] miss
2012/03/16 21:17:01 [emerg] 19415#0: bind() to failed (98: Address already in use)
2012/03/16 21:17:01 [emerg] 19415#0: bind() to failed (98: Address already in use)
2012/03/16 21:17:01 [emerg] 19415#0: bind() to failed (98: Address already in use)
2012/03/16 21:17:01 [emerg] 19415#0: bind() to failed (98: Address already in use)
2012/03/16 21:17:01 [emerg] 19415#0: bind() to failed (98: Address already in use)
2012/03/16 21:17:01 [emerg] 19415#0: still could not bind()
cache: [GET /static_pages/home] miss
cache: [GET /static_pages/home] miss

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


asked 16 Mar '12, 21:39

ckooiker's gravatar image

accept rate: 0%

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.

permanent link

answered 16 Mar '12, 23:00

johns's gravatar image

johns ♦♦
accept rate: 23%

edited 16 Mar '12, 23:00

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 ckooiker's gravatar image

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 ♦♦ johns's gravatar image

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 ckooiker's gravatar image


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 todork's gravatar image

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 ckooiker's gravatar image

Yes, I believe so.

(17 Mar '12, 11:42) todork todork's gravatar image
showing 5 of 6 show 1 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 16 Mar '12, 21:39

question was seen: 1,947 times

last updated: 17 Mar '12, 11:44

Features & prices    Sign up    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
© Copyright 2003-2015 Swarma Limited - WebFaction is a service of Swarma Limited