I am using Ruby on Rails 3.1.0 and Capistrano. I have a problem on make the application to work in production mode (the remote machine is running Ubuntu 10.4 - my local machine is a MacOS running Snow Leopard 10.6.7).
When I deploy with Capistrano I get this error:
uninitialized constant Rake::DSL
When I try to access a web page I get this error:
ActionView::Template::Error (application.css isn't precompiled)
What I should to do in order to make the application to work in production mode on the remote machine?
In my Capfile
file I have:
# Uncomment if you are using Rails' asset pipeline
load 'deploy/assets'
In my Gemfile
file I have:
group :production do
gem 'execjs'
gem 'therubyracer'
end
If I comment the load 'deploy/assets'
I do not get anymore the uninitialized constant Rake::DSL
but I get still the ActionView::Template::Error (application.css isn't precompiled)
error.
Try to create new Rails 3.1 project with scaffolding and deploy it. If everything will be ok, compare configs and other files with your real project.
Try to add
config.assets.compile = true
in production.rb. Hope that helps.See:
http://guides.rubyonrails.org/asset_pipeline.html#precompiling-assets