0

Im trying to install Rails and I get this Error..... how can I fix this I've been trying to install for a week now and I cant seem to get it for the death of me.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for libkern/OSAtomic.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling atomic_reference.c
atomic_reference.c:57:59: warning: incompatible pointer types passing 'void **' to parameter of type 'volatile int64_t *' (aka 'volatile long long *') [-Wincompatible-pointer-types]
    if (OSAtomicCompareAndSwap64(expect_value, new_value, &DATA_PTR(self))) {
                                                          ^~~~~~~~~~~~~~~
/usr/include/libkern/OSAtomic.h:507:93: note: passing argument to parameter '__theValue' here
bool    OSAtomicCompareAndSwap64( int64_t __oldValue, int64_t __newValue, volatile int64_t *__theValue );
                                                                                            ^
1 warning generated.
linking shared-object atomic_reference.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [atomic_reference.bundle] Error 1

make failed, exit code 2
Nakilon
  • 34,866
  • 14
  • 107
  • 142
Juanto85
  • 33
  • 2
  • 10
  • possible duplicate of [Ruby Gem install Json fails on Mavericks and Xcode 5.1 - unknown argument: '-multiply\_definedsuppress'](http://stackoverflow.com/questions/22352838/ruby-gem-install-json-fails-on-mavericks-and-xcode-5-1-unknown-argument-mul) – Nakilon Apr 20 '14 at 01:20

2 Answers2

0

In your terminal, run the command:

export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future

And then try the installation on the same terminal, that should tell the compiler to treat the error as a warning a continue compiling...

Otherwise, you can try to install rails with rvm and latest version of ruby:

#Install rvm
\curl -sSL https://get.rvm.io | bash -s stable

#Install last version of ruby: 
rvm install ruby-2.0.0

#Install rails
gem install rails 
rorra
  • 9,593
  • 3
  • 39
  • 61
0

My problem was that I was trying to install rails to the system ruby and I guess thats a problem. thanks to @rorra I figured out that I needed the or a version manager (RVM or rbenv) so these errors don't persist on hitting. so the Steps I took where:

# Ran this on my command line like @rorra told me to (because of my earlier error)
export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future

# Installed Homebrew
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

# Installed ruby-build 
brew install ruby-build

# Add the your .bash_profile this line (this is to let rbenv know it has to initialize itself everytime you open a terminal shell)
eval "$(rbenv init -)"

# Install Ruby Using rbenv
rbenv install ***(version of ruby you need)***

# Use this to rehash the Version manager:
rbenv rehash

# Set the ruby version you want to use or the recently installed one
rbenv global ***(version number installed)***

# Install the gem *Bundler* then rehash by following **step 6**
gem install bundler

# Install rails 
gem install rail --no-ri --no-rdoc

And thats how my problem got fixed I hope I was able to help someone else experiencing this same problem...

Nakilon
  • 34,866
  • 14
  • 107
  • 142
Juanto85
  • 33
  • 2
  • 10