无法加载此类文件-gems / bundler-2.1.4 / exe / bundle?

问题描述 投票:0回答:1

我捆绑安装时出现此错误

捆绑安装 /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.
ruby-on-rails terminal bundle
1个回答
0
投票

您具有Bundler 2.1.4,并且Rails 4.2不适用于Bundler 2及更高版本。

您需要安装受支持的捆绑软件版本,如下所示:

gem install bundler:1.17.3
© www.soinside.com 2019 - 2024. All rights reserved.