OSX 上的 Ruby on Rails - 我是否搞砸了安装?
我刚刚在 OSX 上安装了 Rails。我使用了 Ruby 的库存版本,并按照以下过程进行操作:
- 安装了最新版本的 RubyGems
- Ran sudo gem install Rails --include-dependency
- 使用 sudo gem install mongrel --include-dependency 安装了 Mongrel
Rails 工作正常,但更多阅读导致我查看此设置指南:
http://hivelogic.com/articles/ruby-rails -mongrel-mysql-osx
这基本上与我执行的安装完全相同,只是他从源代码编译它并安装到 /usr/local ——我真的很喜欢这个想法,因为它保留了 OSX 安装库存并且将我所有的开发内容限制在一个区域。
那么,假设我想遵循这些说明,我需要做什么才能将我的系统恢复为“库存”红宝石?我可以只卸载 Rails 和 Mongrel gems 吗?升级后的 RubyGems 会导致任何问题吗?
基本上,我担心的是与我的开发工作无关的其他一些软件将需要使用 OSX 的原生 Ruby,而我会以某种方式搞砸它。任何有关撤销我上面列出的 3 个步骤并尽可能接近库存的建议将不胜感激。
谢谢!
I just installed Rails on OSX. I used the stock version of Ruby and followed the following procedure:
- Installed newest version of RubyGems
- Ran sudo gem install rails --include-dependencies
- Installed Mongrel using sudo gem install mongrel --include-dependencies
Rails is working just fine, but more reading led me to this setup guide:
http://hivelogic.com/articles/ruby-rails-mongrel-mysql-osx
This is essentially the exact same install I performed, except he compiles it from source code and installs to /usr/local -- I really like this idea, since it keeps the OSX install stock and confines all my dev stuff to one area.
So, assuming I want to follow these instructions, what do I need to do to revert my system back to "stock" ruby? Can I just uninstall the Rails and Mongrel gems? Will the upgraded RubyGems cause any issues?
Basically, my concern is that some other software unrelated to my development work will need to use OSX's stock Ruby, and I will have screwed it up somehow. Any advice to undo the 3 steps I listed above and get as close to stock as possible would be appreciated.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您引用的文章已有三年多了(在 Rails 社区中已经过时)。我的建议是:
每个步骤都会有更多子步骤,但您应该能够查找它们或得到提示和他们在一起。
The article you are referring to is over three years old (which is outdated in the Rails community). My recommendation is:
Each step will have a few more substeps but you should be able to look them up or be promted with them.
我不记得为什么这样做,但我确实知道它有效并且从那以后没有造成任何问题。我将 /Library/Ruby 移动到 /Library/Ruby.broken,然后将 Ruby 从源代码安装到 /usr/local 中。
OSX 中的原生 Ruby 从根本上缺失了一些东西。我希望我能记得那是什么。
I can't remember why I did this but I do know that it worked and has caused no problems since. I moved /Library/Ruby to /Library/Ruby.broken and then installed Ruby from source into /usr/local.
There's something fundamentally missing with the stock Ruby in OSX. I wish I could remember what that was.