我在下面收到此错误
/usr/lib64/ruby/site_ruby/1.8/rubygems.rb:926:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
from /usr/lib64/ruby/site_ruby/1.8/rubygems.rb:244:in `activate_dep'
from /usr/lib64/ruby/site_ruby/1.8/rubygems.rb:236:in `activate'
from /usr/lib64/ruby/site_ruby/1.8/rubygems.rb:1307:in `gem'
from /usr/bin/rails:18
我从 ruby 1.8.7 和 rails 2.3.11 开始,然后我安装了 rvm,然后安装了 ruby 2.0.0 和 gem install rails 3.2.13,然后开始出现上述错误。任何帮助将不胜感激,谢谢。我认为这是某种路径问题,但无法弄清楚,对unix的东西不太了解。顺便说一句,我没有root权限。
如果有帮助,这是我的 .bashrc
# .bashrc
# User specific aliases and functions
alias mv='mv -i'
alias rm='rm -i'
alias cp='cp -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
export HPATH=$HOME
export GEM_HOME=$HPATH/ruby/gems
export GEM_PATH=$GEM_HOME:/usr/lib64/ruby/gems/1.8
export GEM_CACHE=$GEM_HOME/cache
export PATH=$PATH:$HPATH/ruby/gems/bin
export PATH=$PATH:$HPATH/ruby/gems
这是 .bash_profile
# .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
unset USERNAME
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM$