开发者

Ruby on Rails on OSX - did I mess up my install?

开发者 https://www.devze.com 2023-02-21 02:34 出处:网络
I just installed Rails on OSX. I used the stock version of Ruby and followed the following procedure:

I just installed Rails on OSX. I used the stock version of Ruby and followed the following procedure:

  1. Installed newes开发者_StackOverflow中文版t version of RubyGems
  2. Ran sudo gem install rails --include-dependencies
  3. 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!


The article you are referring to is over three years old (which is outdated in the Rails community). My recommendation is:

  1. Install XCode
  2. Install Homebrew
  3. Install MySQL, Postgres, Image Magick, etc. (brew install mysql, etc.)
  4. Install RVM
  5. Install Ruby 1.9.2 (rvm install 1.9.2)
  6. Switch to default (rvm 1.9.2 --default)
  7. Install Rails (gem install rails)
  8. Install Passenger (gem install passenger)

Each step will have a few more substeps but you should be able to look them up or be promted with them.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消