2012-02-26 132 views
2

當我運行包更新我收到此錯誤:如何解決這個兼容性問題?

bundle update

Fetching source index for https://rubygems.org/

Bundler could not find compatible versions for gem "railties": In Gemfile: rails (= 3.2.1) x86-mingw32 depends on railties (= 3.2.1) x86-mingw32

sass-rails (= 3.2.3) x86-mingw32 depends on 
    railties (3.2.2.rc1) 

我是新來的Rails,和一般的計算器,我的任何佈局的不便表示歉意。任何幫助將不勝感激。謝謝

編輯1:這裏是我的Gemfile

source 'https://rubygems.org' 

gem 'rails', '3.2.1' 

# Bundle edge Rails instead: 
# gem 'rails', :git => 'git://github.com/rails/rails.git' 

group :development, :test do 
    gem 'sqlite3', '1.3.5' 
    gem 'rspec-rails', '2.8.1' 
end 

# Gems used only for assets and not required 
# in production environments by default. 
group :assets do 
    gem 'sass-rails', '3.2.3' 
    gem 'coffee-rails', '3.2.2' 
    gem 'uglifier', '1.2.3' 
end 

gem 'jquery-rails', '2.0.0' 

group :test do 
    gem 'capybara', '1.1.2' 
end 

group :production do 
    gem 'pg', '0.12.2' 
end 

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

# To use Jbuilder templates for JSON 
# gem 'jbuilder' 

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

# Deploy with Capistrano 
# gem 'capistrano' 

# To use debugger 
# gem 'ruby-debug19', :require => 'ruby-debug' 
+0

請發佈您的Gemfile。 – 2012-02-27 21:00:33

+0

發表Gemfile – Jared 2012-02-28 16:42:58

回答

3

後重新安裝你需要改變在你的Gemfile你的資產組刪除明確版本:

group :assets do 
    gem 'sass-rails' 
    gem 'coffee-rails' 
    gem 'uglifier' 
end 

然後更新青菜護欄:

bundle update sass-rails 
+0

軟件包更新sass-rails返回相同的錯誤 – Jared 2012-02-27 19:07:42

+0

您的sass-rails版本已鎖定在您的Gemfile中,請參閱我更新的問題。 – 2012-02-28 18:25:50

+0

那麼,這是否回答你的問題?不要忘記[upvote /接受你的問題的答案](http://meta.stackexchange.com/a/5235/158402)':)' – 2012-03-08 06:07:43

1

我得到有點類似錯誤... 在Gemfile中: 軌(= 3.2.1)x86架構的mingw32取決於 railties(= 3.2 1.1)x86架構的mingw32

jquery-rails (= 2.0.0) x86-mingw32 depends on 
    railties (3.2.2.rc1) 

我試圖捆綁刪除Gemfile.lock的

+0

刪除Gemfile.lock後爲你安裝bundle安裝嗎? – Jared 2012-02-29 02:59:07

1

運行 解決了這個對我來說 包更新軌道。

0

更新到Rails 4.1.3時,我遇到了類似的問題。運行軟件包更新並不是一個好的做法,因爲它更新了所有的寶石,並且在一個大型的應用程序中很難修復所有的錯誤。 相反,我更新了必要的寶石:

bundle update rails sass-rails