RVM 和 GEM_PATH
我使用相同的脚本通过 rvm 为同一台计算机上的两个用户设置 ruby 和 gems。我已通过 rvm --version 确认我使用的是相同的版本,并且安装的内容似乎相同。
然而,一方面我的 $GEM_PATH 设置正确,另一方面 $GEM_PATH 和 $GEM_HOME 都是空白 - 我已经通过 echo $GEM_PATH 和在 ruby 脚本中读取 ENV['GEM_PATH'] 确认了这一点
RVM 是否意味着设置$GEM_PATH?如果是这样,有什么想法为什么不适合我吗?
I have used the same script to setup ruby and gems via rvm for two users on the same machine. I have confirmed with rvm --version that I'm using the same version and things seem to be installing identically.
However, on one my $GEM_PATH is being set properly, on the other both $GEM_PATH and $GEM_HOME are both blank - I have confirmed this both by echo $GEM_PATH and within a ruby script reading ENV['GEM_PATH']
Is RVM meant to set $GEM_PATH? If so, any ideas why it hasn't for me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确定两台机器都运行相同的 ruby 和 gem 集吗?
如果第一台机器运行 ruby 版本 a 和 gems 版本 b,而第二台机器运行系统版本(很可能在 OS X 上),那么第二台机器可能有不同的 gem 路径。
确保
在两台机器上都这样做!
Are you sure both machines are running the same set of ruby and gems?
If the first is running version a of ruby and version b of gems and the second one is running the system versions (very likely on OS X) then the second machine may have different gem paths.
Make sure to do
in both machines!