Replace
rake assets:precompile RAILS_ENV=production
with
rake assets:precompile
(RAILS_ENV=production bundle exec rake assets:precompile
is the exact rake task)
Since precompilation is done in production mode only, no need to explicitly specify the environment.
Update:
Try adding the below line to your Gemfile:
group :assets do
gem 'therubyracer'
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
Then run bundle install
.
Hope it will work :)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…