Reputation: 5534
I'm installing Ruby using MacPorts. After using the following command:
sudo port install rb-rubygem
I got the following error:
Error: Port rb-rubygem not found
What should I be doing?
Upvotes: 0
Views: 3020
Reputation: 51
This post is old but I'll add this here. If you want to use mac ports you can add ruby by using sudo port install ruby
and then sudo port install rb-rubygems
(notice you missed the 's' in rubygem*s* in your original post). You can always check what repositories are available in mac ports by typing port list
. Hope this helps.
Upvotes: 5
Reputation: 32629
Ruby is installed by default in every mac. However, it's ruby 1.8, which is very old and shouldn't be used in any of your projects.
Take a look at rvm.
It will allow you to install several versions of ruby in the same system.
So, for example, you can do the following :
rvm use 1.9.3
ruby -v #=> ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin12.2.0]
rvm use 2.0.0
ruby -v #=> ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.1]
Using rvm, you can install any new version of ruby using the following :
rvm install 2.0.0-p0 #=> This will install Ruby 2.0.0
rvm install jruby #=> This will install jruby
And so on
Upvotes: 0