I'm using the following configuration:
- Ubuntu 12.04 desktop i386
- Ruby 1.9.3p327
- Rails 3.2.9
- NodeJS 0.8.14
- Nginx + Phusion Passenger
I followed these steps:
- Crate a new Ubuntu virtual machine to test with
- Install Ruby + Rails + NodeJS
- Install Passenger + Nginx from here
- Create a new Rails app in /home/gerald/myapp without ActiveRecord (to discard DB issues)
- Run the said Rails app in dev mode (Rails server)
It worked perfectly, I was even able to see the rails.png image.
The problem is...
...When I configured Nginx to run the said app, I got a 404 error in the rails.png image.
These are the lines I added to /opt/nginx/conf/nginx.conf file:
http {
...
server {
listen 80;
server_name www.mydomain.com;
root /home/gerald/myapp/public;
passenger_enabled on;
}
...
}
The Nginx error.log only says:
2012/11/19 15:07:06 [error] 17398#0: *1 open() "/home/gerald/myapp/public/assets/rails.png" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /assets/rails.png HTTP/1.1", host: "127.0.0.1", referrer: "http://127.0.0.1/"
Thank you in advance.