I recently reinstalled my Mac OS X (10.6.8) and want to install things properly this time. I had some trouble last time so I just want to set things up right.
In particular, I want to install Ruby on Rails, bundler, and so on... but when I do "gem install bundler" I get the following error:
c-69-181-106-62:~ dave$ gem install bundler
WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and
/usr/bin aren't both writable.
WARNING: You don't have /Users/dave/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.
ERROR: Error installing bundler:
bundler requires RubyGems version >= 1.3.6
I'm confused... can someone help me out, or point me to an article saying "OK, first, add this to this file, then download this, then do this..."?
Thanks
Another reason the Mac has continued to be so popular is that has included Ruby, Rails & SQLite out of the box for the past few years. This means you can have a working Rails environment on every new machine. You can even do native development (full GUI desktop applications) on the Mac in Ruby.
ruby-build is a plugin for rbenv that allows you to compile and install different versions of Ruby. ruby-build can also be used as a standalone program without rbenv. It is available for macOS, Linux, and other UNIX-like operating systems.
The first warning is because you aren't root
. The second warning is because you don't have something in your PATH
(but I don't think that will be a problem if you're root
.) The third error is because you have an out-of-date RubyGems. Try this:
sudo gem update --system
sudo gem install bundler
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With