2014-02-25 104 views
0

我嘗試部署在主機服務器上。但是,當我去我的域名,我看到PHUSION乘客的錯誤消息:Bundler找不到兼容版本的gem「rspec-mocks」 - Bundler :: VersionConflict

Could not find gem 'guard-rspec (= 2.5.0) ruby' in the gems available on this machine. (Bundler::GemNotFound) 

所以我做的:

$ gem install rspec-rails -v 2.13.1 

然後我得到:

Could not find gem 'rspec-rails (= 2.13.1) ruby' in the gems available on this machine. (Bundler::GemNotFound) 

SO我再做:

$ gem install guard-rspec -v 2.5.0 

最後我得到這個:

捆紮機找不到兼容版本的寶石 「rspec的-嘲笑」: 在Gemfile中: 護rspec的(= 2.5.0)紅寶石取決於 rspec的,嘲笑(〜> 2.14.0)紅寶石

rspec-rails (= 2.13.1) ruby depends on 
    rspec-mocks (2.13.1) 

(捆紮機:: VersionConflict)

我必須從我的Gemfile中刪除其中之一嗎?

回答

1

確保你在你的Gemfile中指定了你的gem以及他們需要的版本,並且安裝bundle而不是直接在系統中進行安裝。

的Gemfile:

gem "guard-rspec", "2.5.0" 
gem .... 

然後安裝寶石

bundle install 
0

也值得一試的事情:

bundle upgrade 
+0

我想你的意思束更新...胎面非常小心,當這樣做!很多人可能會出錯.... YMMV。 – stephenmurdoch

相關問題