gpt4 book ai didi

rubygems - 即使安装了 gem,RVM bundle 安装仍缺少 Gem 错误

转载 作者:行者123 更新时间:2023-12-03 05:50:50 24 4
gpt4 key购买 nike

即使我当前安装了 Bundler gem(当我运行 $gem list 时出现),我仍收到以下错误。

ERROR: Gem bundler is not installed, run `gem install bundler` first.

我正在使用 RVM,我的 $PATH 如下:

/Users/cjstingl/.rvm/gems/ruby-1.9.2-p290@rails3tutorial2ndEd/bin:
/Users/cjstingl/.rvm/gems/ruby-1.9.2-p290@global/bin:
/Users/cjstingl/.rvm/rubies/ruby-1.9.2-p290/bin:
/Users/cjstingl/.rvm/bin:
/Users/cjstingl/.bin:
/usr/local/sbin:
/usr/local/Cellar/php/5.3.6/bin:
/usr/local/share/python:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/usr/local/bin:
/usr/X11/bin

这也是我的 gem 环境

RubyGems Environment:
- RUBYGEMS VERSION: 1.8.15
- RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-darwin11.2.0]
- INSTALLATION DIRECTORY: /Users/cjstingl/.rvm/gems/ruby-1.9.2-p290@rails3tutorial2ndEd
- RUBY EXECUTABLE: /Users/cjstingl/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
- EXECUTABLE DIRECTORY: /Users/cjstingl/.rvm/gems/ruby-1.9.2-p290@rails3tutorial2ndEd/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-11
- GEM PATHS:
- /Users/cjstingl/.rvm/gems/ruby-1.9.2-p290@rails3tutorial2ndEd
- /Users/cjstingl/.rvm/gems/ruby-1.9.2-p290@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => false
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- "gem" => "-n/usr/local/bin --no-ri --no-rdoc --no-user-install"
- REMOTE SOURCES:
- http://rubygems.org/

另外:使用bundle -v 命令会返回相同的错误

我尝试过内爆 RVM 并重新安装,但这似乎不起作用。我很困惑,任何帮助将不胜感激。

最佳答案

将以下内容(取自 .bash_profile)添加到 .bashrc 为我解决了这个问题:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" 

关于rubygems - 即使安装了 gem,RVM bundle 安装仍缺少 Gem 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8990828/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com