运行服务器时 Ruby 版本差异
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.3.0]
$ rails s
=> Booting WEBrick
=> Rails 3.0.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2010-09-28 13:45:50] INFO WEBrick 1.3.1
[2010-09-28 13:45:50] INFO ruby 1.8.7 (2009-06-08) [universal-darwin10.0]
[2010-09-28 13:45:50] INFO WEBrick::HTTPServer#start: pid=20761 port=3000
当我检查我的版本号时,看起来我正在运行 1.9.2p0
但当我运行服务器时,它显示我正在运行 1.8.7... 关于如何解决此问题有什么想法吗?
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.3.0]
$ rails s
=> Booting WEBrick
=> Rails 3.0.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2010-09-28 13:45:50] INFO WEBrick 1.3.1
[2010-09-28 13:45:50] INFO ruby 1.8.7 (2009-06-08) [universal-darwin10.0]
[2010-09-28 13:45:50] INFO WEBrick::HTTPServer#start: pid=20761 port=3000
When I check my version number, it looks like I'm running 1.9.2p0
But when I run the server, it shows that I'm running 1.8.7... Any ideas as to how I fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您有两个 Ruby 二进制文件。以及硬盘中的两个 gem 脚本和 gem 存储库。要找到您需要的所有内容 - 使用
which
命令:然后只需核对您不需要的内容并开始使用 rvm。
You have two Ruby binaries. As well as two gem scripts and gem repos in your hdd. To find all the stuff you need - use the
which
command:Then just nuke the one you don't need and start using rvm.