簡體   English   中英

Bundler找不到與“ bundler”寶石兼容的版本:在Gemfile中:rails(= 3.0.0)已解析為3.0.0,這取決於捆綁程序(〜> 1.0.0)

[英]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)

我剛剛購買了一個新的MBP,並且正在嘗試執行ruby應用程序。 在按照本教程進行安裝Ruby on Rails 5.0·macOS Sierra之后 ,我仍然遇到此問題:

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,重新安裝,刪除了gem,刪除了ruby,rails,rvm,然后再次安裝了所有內容。

拜托,有什么建議嗎?

解決了!!

解決了問題,在development.rb文件中刪除或注釋config.action_view.debug_rjs = true

謝謝大家!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM