Reputation: 11207
If I run the following commands and then visit a page it gives an error about routing failure on an asset.
rake assets:precompile
rails s -e production
However if I do the same after the following commands where I've added RAILS_ENV=production everything works.
rake assets:precompile RAILS_ENV=production
rails s -e production
What is rake assets:precompile
doing when I omit RAILS_ENV=production
that explains why it is not working properly?
Upvotes: 1
Views: 285
Reputation: 20232
It is precompiling the assets in your default environment, which is more than likely developement
Upvotes: 1