2017-01-09 83 views
1

我剛剛買了一個新的MBP和我正在嘗試執行一個Ruby應用程序。我跟着這個教程Install Ruby on Rails 5.0 · macOS Sierra, 我仍然有這個問題後:捆紮機找不到兼容版本的寶石「捆綁」:在Gemfile中:軌(= 3.0.0)拆分到3.0.0,這取決於捆綁(〜> 1.0.0)

MBP:test_app $ gem install rails 
Successfully installed rails-5.0.1 
Parsing documentation for rails-5.0.1 
Done installing documentation for rails after 0 seconds 
1 gem installed 
MBP:test_app $ rails new . 
Could not find gem 'rails (= 3.0.0)' in any of the gem sources listed in your Gemfile or available on this machine. 
Try running `bundle install`. 

然後,我想:

$ bundle install 

而且我得到了以下錯誤:

Fetching gem metadata from http://rubygems.org/.......... 
Fetching version metadata from http://rubygems.org/.. 
Fetching dependency metadata from http://rubygems.org/. 
Resolving dependencies... 
Bundler could not find compatible versions for gem "bundler": 
    In Gemfile: 
    rails (= 3.0.0) was resolved to 3.0.0, which depends on 
     bundler (~> 1.0.0) 

    Current Bundler version: 
    bundler (1.13.7) 
This Gemfile requires a different version of Bundler. 
Perhaps you need to update Bundler by running `gem install bundler`? 

Could not find gem 'bundler (~> 1.0.0)', which is required by gem 'rails (= 
3.0.0)', in any of the sources. 

我猜我已經嘗試了一切;安裝捆綁軟件1.0.0,重新安裝,刪除寶石,刪除ruby,rails,rvm,並再次安裝一切。

請問,有什麼建議嗎?

+0

你在你的gemfile中顯式聲明瞭'bundler 1.0.0',它仍然不起作用?我會仔細檢查你的其他寶石,看看它們中的任何一個是否依賴較新版本的打包程序,因爲有些東西會將你的打包程序版本移動到1.13.7 – BigRon

+1

另外,爲什麼要安裝rails 5.0.1,但隨後需要rails 3.0.0你的gemfile?您希望您的項目使用哪個版本的導軌? – BigRon

+0

你是否有機會在Gemset中工作?我建議先安裝捆綁軟件'gem install bundler'然後'gem install rails' –

回答

-1

解決!

問題解決了刪除或development.rb文件註釋config.action_view.debug_rjs = true

感謝大家!

相關問題