0

I have OSX mavericks and I was trying to install ruby on rails .First I tried Installing via RailsInstaller (http://railsinstaller.org/en) ,There was a notice in the website saying "Please do not run the installer on OSX Mavericks until further notice."

Then I tried installing using rvm which turned out to be a night mare .

I followed instructions from all the below links none seem to work

Installing Rails on Mavericks

Xcode install on OSX 10.9 - clang: error: no input files

Installing Rails on Mavericks

http://railsapps.github.io/installrubyonrails-mac.html

I have installed Xcode 5.0 and I have even manually downloaded Command lines tools

https://developer.apple.com/downloads/index.action

when I try

rails -v

I get a message

Rails is not currently installed on this system. To get the latest version, simply type:

$ sudo gem install rails

Then I tried command for which I got an error message

Building native extensions.  This could take a while... ERROR:  Error installing rails:     ERROR: Failed to build gem native extension.

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

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

I'm not able to use xcode-select --install either which says the software is not present in the server

Please guide on how to install rails on my osx mavericks ?

Community
  • 1
  • 1
Arunachalam
  • 5,417
  • 20
  • 52
  • 80
  • It doesn't specifically help you solve your problem, but have you tried following [this guide](http://railsapps.github.io/installrubyonrails-mac.html). – Tamer Shlash Mar 29 '14 at 18:04
  • I already tried that guide . I posted the same link in question as well. Thanks – Arunachalam Mar 29 '14 at 19:11

1 Answers1

0

Rails 4 needs RubyGems 2.0.3. Update it and you should be good to go.

gem update --system 2.0.3

Then,

gem install rails

Hope it helps.

Nerve
  • 6,463
  • 4
  • 29
  • 29
  • I get this error message when I try the above commands aruns-mbp:~ arun$ gem update --system 2.0.3 Latest version currently installed. Aborting. aruns-mbp:~ arun$ gem install rails ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory. – Arunachalam Mar 30 '14 at 06:35
  • @Arunachalam You're likely using the system-provided Ruby. You can solve that problem with `sudo gem update --system 2.0.3`, but you probably should use something like [RVM](https://rvm.io) to manage your Ruby, if you're going to be doing serious development work. – sleepy_keita Mar 30 '14 at 09:28
  • my gem version is 2.0.3 and I did try with sudo but same result .I also have rvm installed . – Arunachalam Mar 30 '14 at 14:14