Rails doesn't serve static files in production mode


#1

I just noticed this:

RoR does serve static files on a lighttpd-server just fine - in
development mode. If I set it to production in environment.rb - static
files are not served anymore (like the scaffold.css).

How can I fix this?


#2

found some additional info in my production.log

ActionController::RoutingError (Recognition failed for
“/stylesheets/scaffold.css”):
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:488:in
recognition_failed' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:478:inrecognize!’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:150:inprocess_request’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:54:in
process!' /usr/lib/site_ruby/1.8/fcgi.rb:600:ineach_cgi’
/usr/lib/site_ruby/1.8/fcgi.rb:597:in each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:53:inprocess!’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:23:in
`process!’
/var/www/html/evj/public/dispatch.fcgi:24


#3

Nevermind… I just found the problem…