【问题标题】:RVM Gempath not being setRVM Gempath 未设置
【发布时间】:2012-08-30 20:32:01
【问题描述】:

我最近安装了 RVM。加载我的.rvmrc 后,我尝试了bundle install 并收到错误消息,通知我bundler 未安装。

安装bundler 后,bundler 未安装错误仍然存​​在。经过一些快速挖掘后,我发现 ruby​​gems 没有使用 RVM gem 路径。

这里是gem env

RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.24
  - RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/jhalecom/ruby/gems
  - RUBY EXECUTABLE: /home/jhalecom/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
  - EXECUTABLE DIRECTORY: /home/jhalecom/ruby/gems/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /home/jhalecom/ruby/gems
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--remote --gen-rdoc --run-tests"
     - "gemhome" => "/home/jhalecom/ruby/gems"
     - "gempath" => []
     - "rdoc" => "--inline-source --line-numbers"
  - REMOTE SOURCES:
     - http://rubygems.org/

这里是~/.bashrc

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific aliases and functions


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

这里是~/.bash_pofile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

【问题讨论】:

    标签: ruby-on-rails path rubygems rvm


    【解决方案1】:

    你需要清理你的~/.gemrc,它会改变路径,最好是重写它:

    echo gem: --gen-rdoc --run-tests > ~/.gemrc
    echo rdoc: --inline-source --line-numbers >> ~/.gemrc
    

    或删除错误的行:

    sed -i '/gemhome|gempath/ d;'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多