如何在OS 10.6.6 Ruby 1.8和Rails 3上更改安装ruby gem的路径 [英] How to change the path where ruby gems are installed on OS 10.6.6 Ruby 1.8 and Rails 3
问题描述
我的宝石是否使用 gem install
或 bundle install
,它们不起作用。有时候 sudo gem install
让gem工作。我运行了 gem list -d
和这是gem
命令,而且似乎我的系统配置为所有gem会被安装到/Library/Ruby/Gems/1.8中,但我的环境希望它们位于/ usr / bin / gem中。我怎么能正确地纠正这一点?我的印象是'bundle'应该能够安装gem的本地应用程序特定副本吗?
会建议使用RVM(Ruby版本管理器)来控制你正在安装宝石的Ruby版本。它还有助于将所有包和宝石数据保存在您的主目录中的文件夹中。
Whether I use gem install
or bundle install
for my gems, they don't work. Sometimes sudo gem install
gets gems to work. I ran the gem list -d
and which gem
commands, and it seems that my system is configured such that all the gems get installed into " /Library/Ruby/Gems/1.8" but my environment expects them in "/usr/bin/gem". How could I properly correct this? I was under the impression that 'bundle' should be able to install a local, application specific copy of a gem?
I would suggest using RVM (Ruby Version Manager) to control which version of Ruby you are installing your gems into. It will also help keep all the bundle and gem data in a folder in your home directory.
这篇关于如何在OS 10.6.6 Ruby 1.8和Rails 3上更改安装ruby gem的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!