Ruby无法找到匹配的捆绑程序版本,但它存在于PATH

时间:2019-01-16 20:05:58

标签: ruby rubygems jekyll bundler

我认为这归结为一些简单的PATH问题,但是我找不到任何相关的东西。

我成功运行了bundle install,这是第一次生成Gemfile.lock

这是我的情况

$ which bundle
/usr/local/bin/bundle

$ bundle version
Bundler version 1.17.3 (2019-01-01 commit d7089abb6)

$ bundle exec jekyll serve
/Library/Ruby/Site/2.3.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /Users/coder/code/repo/docs/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.17.3`
    from /Library/Ruby/Site/2.3.0/rubygems.rb:262:in `bin_path'
    from /usr/local/bin/bundle:22:in `<main>'  

echo $PATH
/Users/coder/.nix-profile/bin:/Users/coder/.nix-profile/lib/kde4/libexec:/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default:/nix/var/nix/profiles/default/lib/kde4/libexec:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki

在Gemfile.lock中,成功运行bundle install的那个文件:

BUNDLED WITH
   1.17.3

Nani ????

0 个答案:

没有答案