I made a basic rails app with a simple pages controller with an index function and when I load the page I get:
ActionView::Template::Error (application.css i
if you think you followed everything good but still unlucky, just make sure you/capistrano run touch tmp/restart.txt or equivalent at the end. I was in the unlucky list but now :)
I ran into this error message today and wanted to post the resolution to my particular my case. It turns out that my problem was that one of my css files was missing a closing brace and this was causing the file to not be compiled. It may be harder to notice this if you have an automated process that sets everything up (including the asset precompile) for your production environment.
Just another way to fix this up on Heroku: Make sure your Rakefile is committed and pushed.
I was having the exact same error in my development environment. In the end all I needed to do in order to fix it was to add:
config.assets.manifest = Rails.root.join("public/assets")
to my config/environments/development.rb file and it fixed it. My final config in development related to assets looks like:
config.assets.compress = false
config.assets.precompile += %w[bootstrap-alerts.js] #Lots of other space separated files
config.assets.compile = false
config.assets.digest = true
config.assets.manifest = Rails.root.join("public/assets")
config.assets.debug = true
You probably have a syntax error
in the css you are using.
Run this command
$ bundle exec rake assets:precompile RAILS_ENV=development --trace
It will give the exception, fixed that and you are all done.
Thanks
A quick fix for capistrano user is to put this line to Capfile
# Uncomment if you are using Rails' asset pipeline
load 'deploy/assets'