Topic: Rails 3 - Moving from Development to Production Public Assets 404

I migrated a Rails 2.2.2 application to Rails 3.1. In development mode:

/var/www/project_dir# thin start --ssl

all the assets are found and served beautifully from

/stylesheets/
/javascripts/
/images/

When I run in production mode:
/var/www/project_dir# thin start --ssl -e production

all of the asset requests (JS,CSS and images) return a 404.

The paths in development and production mode are identical.

I have come to the point where I have exhausted all of my debugging ideas and have no ideas why when in production mode, none of the assets can be found.

I did try migrating over to asset pipeline but that caused more problems that I don't think I can solve right now so I need to solve this with asset pipeline off.

Any and all ideas are welcome and THANKS!

DetailsWeb Server: Thin 1.5.0
Asset Pipleine: Off
Asset Directories:
/var/www/project_dir/public/images
/var/www/project_dir/public/javascripts
/var/www/project_dir/public/stylesheets

Last edited by slinky66 (2013-04-30 10:13:43)

Re: Rails 3 - Moving from Development to Production Public Assets 404

In
/config/environments/production.rb

Do this:

    config.serve_static_assets = true

That will enable production to read from the /public folder