Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I correctly install Ruby on Rails, bundler, etc on a fresh Mac OS X?

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

like image 762
Dave Avatar asked Oct 22 '11 23:10

Dave


People also ask

Does Ruby on Rails work on Mac?

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.

Can you install Ruby on Mac?

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.


1 Answers

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
like image 70
icktoofay Avatar answered Oct 16 '22 08:10

icktoofay