Rails - Don't know how to build task 'assets:precompile:primary'

Hig Guys,

I get this error when I try to run rake db:migrate

rake aborted!
Don't know how to build task 'assets:precompile:primary'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task_manager.rb:49:in `[]'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:339:in `[]'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/tinymce-rails-langs-0.1/lib/tasks/assets.rake:1:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:222:in `load'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:222:in `block in load'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:213:in `load_dependency'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:222:in `load'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine.rb:641:in `block in run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine.rb:641:in `each'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine.rb:641:in `run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/application.rb:243:in `block in run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine/railties.rb:17:in `each'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine/railties.rb:17:in `each'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/application.rb:243:in `run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine.rb:446:in `load_tasks'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/mate/sites/rails_projects/bev/Rakefile:6:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/bin/rake:33:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/bin/rake:23:in `load'
/usr/local/rvm/gems/ruby-2.0.0-p0@global/bin/rake:23:in `<main>'
/usr/local/rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval'
/usr/local/rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `&lt;main&gt;'

I am using Rails 4 rc2 and Ruby 2.0 and also Compass.

Compass config:

project_type = :rails
http_path    = '/'
css_dir =   "app/assets/stylesheets"
sass_dir =  "app/assets/sass"

I am trying to solve this for 2 days and its driving me crazy…

Anyone encountered the same problem?

Best Wishes,
Matt

Ok. Got the bug. It was the tinymce-rails-langs gem which tried to run assets:precompile:primary which is removed from Rails 4.

I believe Compass also doesn’t work in Rails 4 yet.

A surprising number of gems that are commonly used haven’t yet been updated to be compatible with Rails 4 despite a pretty long beta/release candidate phase. Odds are you’ll be seeing subtle errors for a while. You can check out the Github issues page to see if anybody mentions Rails 4 issues but problems aren’t always documented.

Rails 3 might be an easier choice for some quick projects for a while because of this.