我刚安装了带有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.
答案 0 :(得分:3)
这是一个错误:see bug report here
我不知道是否可以从MacPorts获得,但Ruby 1.9.1-p378和1.9.2-rc1都没有问题。
如果您还没有尝试过,我强烈推荐rvm用于多个Ruby解释器。