Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/53.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails jasmine rails gem不工作,sass错误_Ruby On Rails_Configuration_Sass_Jasmine - Fatal编程技术网

Ruby on rails jasmine rails gem不工作,sass错误

Ruby on rails jasmine rails gem不工作,sass错误,ruby-on-rails,configuration,sass,jasmine,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 /User

在尝试将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>'

关于问题可能是什么有什么想法吗?

解决方案是在您的GEMS文件中指定最新版本的sass

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

这个问题在17天前才在这里得到解决

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]