jasmine-rails gem不工作,sass错误

时间:2014-01-24 23:47:54

标签: ruby-on-rails configuration sass jasmine

尝试将jasmine添加到我的rails 4项目

后,我收到以下错误
rails g jasmine:install

/Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:1132:in `module_function': undefined method `singleton_class?' for module `Sass::Util' (NameError)
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:1132:in `block in <module:Util>'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:1132:in `each'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:1132:in `<module:Util>'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:14:in `<module:Sass>'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:12:in `<top (required)>'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/version.rb:2:in `<top (required)>'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass.rb:9:in `<top (required)>'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/bootstrap-sass-3.0.3.0/lib/bootstrap-sass/sass_functions.rb:1:in `<top (required)>'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/bootstrap-sass-3.0.3.0/lib/bootstrap-sass.rb:7:in `load!'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/bootstrap-sass-3.0.3.0/lib/bootstrap-sass.rb:76:in `<top (required)>'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `each'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `block in require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `each'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.1/lib/bundler.rb:131:in `require'
    from config/application.rb:7:in `<top (required)>'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/railties-4.0.0/lib/rails/commands.rb:44:in `require'
    from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/railties-4.0.0/lib/rails/commands.rb:44:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

的Gemfile

source 'https://rubygems.org'
ruby '2.1.0'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'

# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
gem 'pg'
gem 'devise'
gem 'font-awesome-rails'
gem 'bootstrap-sass', '~> 3.0.3.0'
gem 'simple_form', git: 'https://github.com/plataformatec/simple_form.git'
gem 'carrierwave'
gem 'fog', '~> 1.3.1'
gem 'mini_magick'
gem 'rails_12factor'
gem 'friendly_id', '~> 5.0.0'
gem 'feedzirra'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
gem 'bourbon'

group :development do
  gem 'sass-rails-source-maps'
end

group :development, :test do
  gem 'jasmine'
end

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails', '~> 3.0'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
# gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

关于问题可能是什么的任何想法?

1 个答案:

答案 0 :(得分:1)

解决方案是在gemfile中指定最新版本的sass

gem 'sass', git: 'https://github.com/nex3/sass.git'

问题在17天前解决了https://github.com/nex3/sass/issues/1057?source=cc