【问题标题】:Fail to install bundle ruby version manager无法安装 bundle ruby​​ 版本管理器
【发布时间】:2018-06-08 05:50:04
【问题描述】:

我以前从未尝试过 Ruby。我正在尝试运行此elixirschool github repo

我首先收到此错误消息。

$ bundle install  
Your Ruby version is 2.5.1, but your Gemfile specified ~> 2.3.7

所以我按照问题中的说明进行操作。 How to fix "Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0"

现在我收到了这条消息。

$ bundle install  
Traceback (most recent call last):  
    1: from /usr/local/bin/bundle:23:in `<main>'
/usr/local/bin/bundle:23:in `load': cannot load such file -- /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/exe/bundle (LoadError)

我也做了这个命令。

$ bundler install
Traceback (most recent call last):
    2: from /usr/local/bin/bundler:23:in `<main>'
    1: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundler (Gem::GemNotFoundException)

【问题讨论】:

    标签: bash rvm


    【解决方案1】:

    打开文件夹根目录下的gemfile并删除:

    BUNDLED WITH
       1.16.2 #or whatever version number you see 
    

    然后运行:

    sudo gem install bundler
    

    检查:

    bundle --version
    

    【讨论】:

      【解决方案2】:

      【讨论】:

      • 我有类似的问题,但使用的是 Windows 10。你有什么解决方案或提示,因为 rvm 似乎不适用于该操作系统?见my question on stack overflow
      最近更新 更多