突然无法捆绑安装

时间:2014-11-05 22:17:52

标签: ruby-on-rails-4 gem bundler gemset

我没有更改其中任何一个的版本号,因为它正在运行,但突然当我运行bundle updatebundle install时,我得到了:

Resolving dependencies...
Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    rails (= 4.0.1) ruby depends on
      railties (= 4.0.1) ruby

    sass-rails (~> 4.0.0) ruby depends on
      railties (4.1.1)

改变了什么,给了什么?

1 个答案:

答案 0 :(得分:1)

事实证明,sass-rails将接受铁路4.0.1,铁路将不接受铁路4.1.1。解决方案是在Gemfile的开头调用带有显式版本号的sass-rails。

在:

source 'https://rubygems.org'

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

# Use sqlite3 as the database for Active Record
#gem 'sqlite3'

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

后:

source 'https://rubygems.org'

gem 'railties', '4.0.1'

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

# Use sqlite3 as the database for Active Record
#gem 'sqlite3'

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