我怎样才能摆脱这个红宝石警告?
我刚刚使用 macports 安装了 ruby 1.9.1-p429。每次我使用它时,都会显示以下错误消息:
$ ruby1.9 -e "puts 'hi.'"
Error loading gem paths on load path in gem_prelude
can't modify frozen string
<internal:gem_prelude>:69:in `force_encoding'
<internal:gem_prelude>:69:in `set_home'
<internal:gem_prelude>:38:in `dir'
<internal:gem_prelude>:76:in `set_paths'
<internal:gem_prelude>:47:in `path'
<internal:gem_prelude>:286:in `push_all_highest_version_gems_on_load_path'
<internal:gem_prelude>:355:in `<compiled>'
hi.
I have just installed ruby 1.9.1-p429 with macports. Every time I use it, it displays this error message:
$ ruby1.9 -e "puts 'hi.'"
Error loading gem paths on load path in gem_prelude
can't modify frozen string
<internal:gem_prelude>:69:in `force_encoding'
<internal:gem_prelude>:69:in `set_home'
<internal:gem_prelude>:38:in `dir'
<internal:gem_prelude>:76:in `set_paths'
<internal:gem_prelude>:47:in `path'
<internal:gem_prelude>:286:in `push_all_highest_version_gems_on_load_path'
<internal:gem_prelude>:355:in `<compiled>'
hi.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个错误:在此处查看错误报告
我不知道是否是MacPorts 提供,但 Ruby 1.9.1-p378 和 1.9.2-rc1 都没有这个问题。
如果您还没有尝试过,我强烈推荐 rvm 用于多个 Ruby 解释器。
It's a bug: see bug report here
I don't know if either is available from MacPorts, but Ruby 1.9.1-p378 and 1.9.2-rc1 are both free of the problem.
If you haven't already tried it, I highly recommend rvm for multiple Ruby interpreters.