无法捆绑sass-rails(4.0.3)ruby gem

时间:2014-10-06 17:24:01

标签: ruby-on-rails ruby sass

当我尝试bundle install或更新时,它会给我这个错误:

> bundle install
DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rake 10.3.2
Using i18n 0.6.11
Using json 1.8.1
Using minitest 5.4.1
Using thread_safe 0.3.4
Using tzinfo 1.2.2
Using activesupport 4.1.1
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.1
Using rack 1.5.2
Using rack-test 0.6.2
Using actionpack 4.1.1
Using mime-types 1.25.1
Using polyglot 0.3.5
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 4.1.1
Using activemodel 4.1.1
Using arel 5.0.1.20140414130214
Using activerecord 4.1.1
Using sass 3.2.19
Using bootstrap-sass 3.2.0.0
Using bundler 1.7.3
Using coffee-script-source 1.8.0
Using execjs 2.2.1
Using coffee-script 2.3.0
Using thor 0.19.1
Using railties 4.1.1
Using coffee-rails 4.0.1
Using fullcalendar-rails 1.6.4.0
Using hike 1.2.3
Using multi_json 1.10.1
Using jbuilder 2.1.3
Using jquery-rails 3.1.2
Using tilt 1.4.1
Using sprockets 2.11.0
Using sprockets-rails 2.1.4
Using rails 4.1.1
Using rdoc 4.1.2

Errno::ENOENT: No such file or directory @ rb_sysopen - C:/<ruby-app-dir>/vendor/bundle/ruby/2.1.0/gems/sass-rails-4.0.3/test/fixtures/alternate_config_p
roject/app/assets/stylesheets/partials/subfolder/relative_not_a_partial.css.scss

An error occurred while installing sass-rails (4.0.3), and Bundler cannot
continue.
Make sure that `gem install sass-rails -v '4.0.3'` succeeds before bundling.

但是,运行gem install sass-rails -v '4.0.3'成功且没有错误。

编辑:抛出错误的文件实际上并不存在,尽管sass-rails gem确实有这样的文件。手动输入文件并没有帮助。

带有32位Ruby的64位Windows 8.1,虽然我在64位ruby上遇到了同样的错误。

gem -v:2.2.2 bundle -v:1.7.3

的Gemfile:

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# 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'
# 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', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring',        group: :development

# bootstrap!
gem 'bootstrap-sass'

gem 'fullcalendar-rails'

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

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

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

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

1 个答案:

答案 0 :(得分:0)

从版本3.1.18开始,Sass与Ruby 2兼容,因此这不应成为问题。

尝试在您的工作目录中运行gem install saas-railshttps://rubygems.org/gems/sass-rails