1

Trying to install rails on OS X Mountain Lion (10.8.4). I installed homebrew and rvm. Ruby (2.0.0p247) has installed properly. However, when I try to install rails using

$ gem install rails

I eventually get the following error:

Building native extensions.  This could take a while...
/Users/myname/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
creating Makefile
make "DESTDIR="
compiling atomic_reference.c
atomic_reference.c:50:9: warning: implicit declaration of function
      'OSAtomicCompareAndSwap64' is invalid in C99
      [-Wimplicit-function-declaration]
    if (OSAtomicCompareAndSwap64(expect_value, new_value, &DATA_PTR(self))) {
        ^
1 warning generated.
linking shared-object atomic_reference.bundle
make "DESTDIR=" install
/usr/bin/install -c -m 0755 atomic_reference.bundle ./.gem.20130714-19171-3oplrw
installing default atomic_reference libraries
ERROR:  While executing gem ... (NoMethodError)
    undefined method `join' for nil:NilClass

I have updated all my gemsets, and tried "gem update --system" as this post recommended, however, to no avail.

Also, if helpful

$ rvm gemset list

provides

gemsets for ruby-2.0.0-p247 (found in /Users/myname/.rvm/gems/ruby-2.0.0-p247)
(default)
=> global

note I did first try to install rails using rbenv, but after the installation it wouldn't recognize that I installed it. So I uninstalled rbenv and rails and am now trying to follow this tutorial but am getting the above error.

Any suggestions?

Community
  • 1
  • 1
Sana
  • 79
  • 1
  • 13

1 Answers1

1

It looks like Rails 4.0 needs RubyGems 2.0.3, so the command is

gem update --system 2.0.3

then install rails by

gem install rails
shrikant1712
  • 4,336
  • 1
  • 24
  • 42
  • my current version is 2.0.5, should I be reverting to an older version? – Sana Jul 16 '13 at 04:33
  • 1
    I did `gem update --system 2.0.3` and the `gem install rails`, then I restarted my terminal window and it worked! thanks – Sana Jul 18 '13 at 01:59