尝试运行捆绑程序,并用-bash: /usr/local/bin/bundler: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directory
打招呼。已尝试取消安装rbenv,然后重新安装,卸载/重新安装捆绑程序。似乎没有任何办法可以解决此问题。如何更改已安装的捆绑器的路径?
:> gem install bundler
Successfully installed bundler-2.0.1
Parsing documentation for bundler-2.0.1
Done installing documentation for bundler after 2 seconds
1 gem installed
这是我当前的当前宝石ENV:
:> gem env
RubyGems Environment:
- RUBYGEMS VERSION: 3.0.1
- RUBY VERSION: 2.6.0 (2018-12-25 patchlevel 0) [x86_64-darwin18]
- INSTALLATION DIRECTORY: /Users/Cherubim/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0
- USER INSTALLATION DIRECTORY: /Users/Cherubim/.gem/ruby/2.6.0
- RUBY EXECUTABLE: /Users/Cherubim/.rbenv/versions/2.6.0/bin/ruby
- GIT EXECUTABLE: /usr/local/bin/git
- EXECUTABLE DIRECTORY: /Users/Cherubim/.rbenv/versions/2.6.0/bin
- SPEC CACHE DIRECTORY: /Users/Cherubim/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/Cherubim/.rbenv/versions/2.6.0/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-18
- GEM PATHS:
- /Users/Cherubim/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0
- /Users/Cherubim/.gem/ruby/2.6.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- "gem" => "--no-ri --no-rdoc"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/Cherubim/.rbenv/versions/2.6.0/bin
- /usr/local/Cellar/rbenv/1.1.1/libexec
- /usr/local/bin
- /usr/local/opt/icu4c/sbin
- /usr/local/opt/icu4c/bin
- /usr/local/opt/sqlite/bin
- /Users/Cherubim/.yarn/bin
答案 0 :(得分:1)
您可以尝试将捆绑器安装到上述位置。
sudo gem install -n /usr/local/bin/ bundler