RVM Gempath没有设置 [英] RVM Gempath not being set
本文介绍了RVM Gempath没有设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
.rvmrc
后,我尝试了 bundle install
,并得到了错误信息,告诉我 bundler
$ b 安装 bundler
后, bundler
未安装错误仍然存在。
这里是 gem env
在一些快速挖掘之后,我发现RVM gem路径没有被rubygems使用。 :
RubyGems环境:
- RUBYGEMS版本:1.8.24
- RUBY VERSION:1.9.2安装目录:/ home / jhalecom / ruby / gems
- RUBY EXECUTABLE:/home/jhalecom/.rvm/rubies/ruby- 1.9.2-p290 / bin / ruby
- 可执行文件目录:/ home / jhalecom / ruby / gems / bin
- RUBYGEMS平台:
- ruby
- x86_64-linux
- 创业板路径:
- / home / jhalecom / ruby / gems
- 创业板配置:
- :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
- 远程来源:
- http://rubygems.org/
以下是〜/ .bashrc
:
#.bashrc
#源全局定义
if [-f / etc / bashrc];然后
。 / etc / bashrc
fi
#用户特定的别名和函数
[[-s$ HOME / .rvm / scripts / rvm ]]&&来源$ HOME / .rvm / scripts / rvm
这里是〜 /.bash_pofile
:
#.bash_profile
#获取别名如果[-f〜/ .bashrc];则函数
;然后
。 〜/ .bashrc
fi
#用户特定的环境和启动程序
PATH = $ PATH:$ HOME / bin
导出PATH
解决方案您需要清理〜/ .gemrc
,它改变了路径,最好是用下面的代码重写它:
echo gem:--gen-rdoc --run-tests> 〜/ .gemrc
echo rdoc:--inline-source --line-numbers>> 〜/ .gemrc
或删除错误的行:
sed -i'/ gemhome | gempath / d;'
I recently installed RVM. After loading my .rvmrc
I tried bundle install
and got the error informing me bundler
was not installed.
After installing bundler
, the bundler
not installed error persisted. After some quick digging I discovered that the RVM gem paths are not being used by rubygems.
Here is 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/
Here is ~/.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"
Here is ~/.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
解决方案 you need to clean your ~/.gemrc
, it changes the paths, best would be to rewrite it with :
echo gem: --gen-rdoc --run-tests > ~/.gemrc
echo rdoc: --inline-source --line-numbers >> ~/.gemrc
or to remove the wrong lines:
sed -i '/gemhome|gempath/ d;'
这篇关于RVM Gempath没有设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文