Reputation: 51
I'm using Rails 3.2 and I'm running on some issues running my production environment. I ran rake assets:precompile and then rails s -e production. Here is the error I got:
Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError in Home#index
application_bottom.js isn't precompiled
But when I check to see what's in my public/assets I get
ls public/assets/application_bottom*
public/assets/application_bottom.js
public/assets/application_bottom.js.gz
I noticed that I should probably have a file with the hash appended to it but I don't. I'm guessing that may be related to the issue but I have no idea how to fix it.
Here is my assets configure for the environment;
config.serve_static_assets = true
config.assets.compress = true
config.assets.compile = false
config.assets.digest = true
What am I missing?
Upvotes: 1
Views: 1129
Reputation: 7998
Did you add application_bottom to the list of files that should be precompiled, this exists in the production.rb file inside of config/environments.
YOUR_APPLICATOIN_NAME::Application.configure do
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
config.assets.precompile += %w( application_bottom.js )
end
Hope that helps.
Upvotes: 5