I have created a new user account on my mac and I am trying to update to the current version of ruby on it (1.9.2) from the snow leopard default of 1.8.7. Can somebody point me to tutorial or explain the best method to update Ruby on my mac from 1.8 to 1.9.2? Thanks
相关问题
- How does the setup bootstrapper detect if prerequi
- How to specify memcache server to Rack::Session::M
- Why am I getting a “C compiler cannot create execu
- reference to a method?
- ruby 1.9 wrong file encoding on windows
相关文章
- 现在使用swift开发ios应用好还是swift?
- Visual Studio Code, MAC OS X, OmniSharp server is
- Ruby using wrong version of openssl
- Getting errors / failing tests when installing Pyt
- How do you make an installer for your python progr
- xcode 4 garbage collection removed?
- Difference between Thread#run and Thread#wakeup?
- IntelliJ IDEA can't open projects or add SDK o
I'll make a strong suggestion for rvm.
It's a great way to manage multiple Rubies and gems sets without colliding with the system version.
I'll add that now (4/2/2013), I use rbenv a lot, because my needs are simple. RVM is great, but it's got a lot of capability I never need, so I have it on some machines and rbenv on my desktop and laptop. It's worth checking out both and seeing which works best for your needs.
I know it's an older post, but i wanna add some extra informations about that. Firstly, i think that
rvm
does great BUT it wasn't updating ruby from my system (MAC OS Yosemite).What
rvm
was doing : installing to another location and setting up the path there to my environment variable ... And i was kinda bored, because i had two ruby now on my system.So to fix that, i uninstalled the
rvm
, then used the Homebrew package manager available here and installed ruby throw terminal command by doingbrew install ruby
.And then, everything was working perfectly ! The ruby from my system was updated ! Hope it will help for the next adventurers !
As previously mentioned, the bundler version may be too high for your version of rails.
I ran into the same problem using Rails 3.0.1 which requires Bundler v1.0.0 - v1.0.22
Check your bundler version using:
gem list bundler
If your bundler version is not within the appropriate range, I found this solution to work:
rvm @global do gem uninstall bundler
Note: rvm is required for this solution... another case for why you should be using rvm in the first place.
There are several other version managers to consider, see for a few examples and one that's not listed there that I'll be giving a try soon is ch-ruby. I tried rbenv but had too many problems with it. RVM is my mainstay, though it sometimes has the odd problem (hence my wish to try ch-ruby when I get a chance). I wouldn't touch the system Ruby, as other things may rely on it.
I should add I've also compiled my own Ruby several times, and using the Hivelogic article (as Dave Everitt has suggested) is a good idea if you take that route.
With brew this is a one-liner:
(assuming that you have tapped homebrew/versions, which can be done by running
brew tap homebrew/versions
)Worked out of the box for me on OS X 10.8.4. Or if you want 2.0, you just
brew install ruby
More generally,
brew search ruby
shows you the different repos available, and if you want to get really specific you can usebrew versions ruby
and checkout a specific version instead.Dan Benjamin's Hivelogic article Installing Ruby, RubyGems, and Rails on Snow Leopard is the recommended place to go although the article is for 1.8, so here's a Ruby 1.9-specific install on Snow Leopard. Watch out for the 64-bit thing... either go all 64-bit 'fat' (as is - for example - Apache on OS X, which can cause problems with 32-bit libraries) or check any gems you're likely to use to make sure they're okay for 64-bit.