无法加载此类文件 -- gems/bundler-2.1.4/exe/bundle?
cannot load such file -- gems/bundler-2.1.4/exe/bundle?
我在安装捆绑包时遇到了这个错误
捆绑安装
/Users/nour/.rvm/gems/ruby-2.4.0/bin/bundle:23:in load': cannot load such file -- /Users/nour/.rvm/rubies/ruby-2.4.0/lib/ruby/gems/2.4.0/gems/bundler-2.1.4/exe/bundle (LoadError)
from /Users/nour/.rvm/gems/ruby-2.4.0/bin/bundle:23:in
'
来自 /Users/nour/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:24:in eval'
from /Users/nour/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:24:in
'
rails g controller home
Your Gemfile lists the gem byebug (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 4.2.11.1) was resolved to 4.2.11.1, which depends on
bundler (>= 1.3.0, < 2.0)
Current Bundler version:
bundler (2.1.4)
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.3.0, < 2.0)', which is required by gem 'rails (= 4.2.11.1)', in any of the sources.
您有 Bundler 2.1.4,Rails4.2 不适用于 Bundler 2 及更高版本。
您需要像这样安装受支持的捆绑程序版本:
gem install bundler:1.17.3
要使用新安装的版本运行:
bundle _1.17.3_ install
我在安装捆绑包时遇到了这个错误
捆绑安装
/Users/nour/.rvm/gems/ruby-2.4.0/bin/bundle:23:in load': cannot load such file -- /Users/nour/.rvm/rubies/ruby-2.4.0/lib/ruby/gems/2.4.0/gems/bundler-2.1.4/exe/bundle (LoadError)
from /Users/nour/.rvm/gems/ruby-2.4.0/bin/bundle:23:in
'
来自 /Users/nour/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:24:in eval'
from /Users/nour/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:24:in
'
rails g controller home
Your Gemfile lists the gem byebug (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 4.2.11.1) was resolved to 4.2.11.1, which depends on
bundler (>= 1.3.0, < 2.0)
Current Bundler version:
bundler (2.1.4)
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.3.0, < 2.0)', which is required by gem 'rails (= 4.2.11.1)', in any of the sources.
您有 Bundler 2.1.4,Rails4.2 不适用于 Bundler 2 及更高版本。
您需要像这样安装受支持的捆绑程序版本:
gem install bundler:1.17.3
要使用新安装的版本运行:
bundle _1.17.3_ install