SASS 3.3.0.rc.2 / Compass 1.0.0.alpha.17 / Rails 4错误 - Rails.root为零

时间:2013-12-28 01:37:10

标签: ruby-on-rails-4 sass compass-sass susy-compass

我正在尝试升级到最新的susy grid gem,它需要SASS 3.3.0.rc.2。我使用Compass,这意味着我还需要将Compass升级到最新的alpha(1.0.0.alpha.17)

当我尝试加载Rails应用程序时,我得到了这个堆栈跟踪:

rake aborted!
ERROR: Rails.root is nil!
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/sass-3.3.0.rc.2/lib/sass/util.rb:450:in `rails_root'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/sass-3.3.0.rc.2/lib/sass/plugin/rails.rb:11:in `default_options'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/sass-3.3.0.rc.2/lib/sass/plugin/configuration.rb:33:in `options'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/sass-3.3.0.rc.2/lib/sass/plugin/compiler.rb:38:in `initialize'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/sass-3.3.0.rc.2/lib/sass/plugin.rb:63:in `new'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/sass-3.3.0.rc.2/lib/sass/plugin.rb:63:in `compiler'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/sass-3.3.0.rc.2/lib/sass/plugin.rb:121:in `options'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/sass-3.3.0.rc.2/lib/sass/plugin/rails.rb:24:in `<top (required)>'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/sass-3.3.0.rc.2/lib/sass/plugin.rb:128:in `<top (required)>'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/compass-core-1.0.0.alpha.16/lib/compass/core.rb:51:in `<top (required)>'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/compass-1.0.0.alpha.17/lib/compass.rb:15:in `block in <top (required)>'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/compass-1.0.0.alpha.17/lib/compass.rb:14:in `each'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@creator/gems/compass-1.0.0.alpha.17/lib/compass.rb:14:in `<top (required)>'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.5.0/lib/bundler/runtime.rb:76:in `require'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.5.0/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.5.0/lib/bundler/runtime.rb:72:in `each'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.5.0/lib/bundler/runtime.rb:72:in `block in require'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.5.0/lib/bundler/runtime.rb:61:in `each'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.5.0/lib/bundler/runtime.rb:61:in `require'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.5.0/lib/bundler.rb:131:in `require'
/Users/chrisgriffin/code/apps/fullscreen/creator/config/application.rb:7:in `<top (required)>'
/Users/chrisgriffin/code/apps/fullscreen/creator/Rakefile:4:in `require'
/Users/chrisgriffin/code/apps/fullscreen/creator/Rakefile:4:in `<top (required)>'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@global/bin/ruby_executable_hooks:15:in `eval'
/Users/chrisgriffin/.rvm/gems/ruby-2.0.0-p353@global/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

谷歌搜索引导我解决这个问题:https://github.com/nex3/sass/issues/1033,它给出了解释并在SASS中修复了它,尽管还没有发布新的RC。在新的RC推出之前,是否有解决方法?我能做什么?

1 个答案:

答案 0 :(得分:0)

你可以在Gleb的分支上使用refs-1033分支,直到那时:

gem 'sass', github: 'glebm/sass', branch: 'refs-1033'