rake aborted! | STD: LoadError: cannot load such file -- sass
Error
Installation or upgrade fails during assets compilation with the next error:
rake aborted!
STD: LoadError: cannot load such file -- sass
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `block in require'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/autoload/sass.rb:1:in `<top (required)>'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `block in require'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/sass_compressor.rb:44:in `initialize'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/sass_compressor.rb:24:in `new'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/sass_compressor.rb:24:in `instance'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/sass_compressor.rb:28:in `call'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:231:in `block in stat_tree'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
STD: /tmp/d20190418-1680-1un3bq8/plugins/easyproject/easy_plugins/easy_extensions/lib/tasks/installer.rake:50:in `block (2 levels) in <top (required)>'
STD: /tmp/d20190418-1680-1un3bq8/plugins/easyproject/easy_plugins/easy_extensions/lib/tasks/installer.rake:72:in `block (2 levels) in <top (required)>'
STD: /usr/local/rvm/gems/ruby-2.4.1/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
STD: /usr/local/rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:24:in `eval'
STD: /usr/local/rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:24:in `<main>'
STD: Tasks: TOP => assets:precompile
STD: (See full trace by running task with --trace)
Cause
The problem is sassc-ruby, since version 2.0. It doesn't include sass gem as a dependency, see https://github.com/sass/sassc-ruby/pull/85 . Previous Easy Redmine versions depended on this behaviour. It was fixed long time ago, and if you downloaded latest package from clients it will be fixed automatically.
But if for any reason, this error occurs during your upgrade, there a simple solution.
How to fix
1) Open file plugins/easyproject/Gemfile in any editor and find the line
gem 'sassc', '>= 1.12.1'
2) Change the line to the following
gem 'sassc', '1.12.1'
3. Save the changes.
4. Rerun bundle install and bundle exec rake easyproject:install commands.
5. Continue regular upgrade procedure.
This problem is fixed from Easy Redmine 2018 1.3, platorm version 05.02. But may occur when upgrading from older versions.
Dependency note
Ruby-sass isn't maintained anymore http://sass.logdown.com/posts/7828841