Felix
Felix

Reputation: 5629

rails environment production not working no files loaded

in my Rails application all my js and css is in public folder.

in dev mode it works fine. but when I switch to production mode it dosn't work no css and js is found.

what could be the problem?

Upvotes: 0

Views: 1260

Answers (2)

dp7
dp7

Reputation: 6749

In your app/config/environments/production.rb, check if the following statement is present:

config.serve_static_assets = true

Upvotes: 2

Bart Jedrocha
Bart Jedrocha

Reputation: 11580

You'll need to enable this behaviour for production. Within config/environments/production.rb, set the following

config.serve_static_assets = true

Upvotes: 2

Related Questions