I have installed rails 3.1
with apache2
and passenger
on ubuntu 10.04
. using ruby 1.9.2
with RVM
I've found the answer myself, The reason for the error is rails app needs javascript runtime for certain features of sass, coffeescript and uglifier to work.
There are many ways to solve this, by installing javascript runtimes like nodejs
But, the solution I went with, and perhaps the easiest one is, adding gem 'therubyracer'
to my Gemfile
and then running bundle install
Excerpt from my Gemfile
is below
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'therubyracer'
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
adding therubyracer
also fixes rake assets:precompile
Hope this helps. I've spent days searching for this solution.