total n00b: Having trouble installing rails

Alex's Avatar

Alex

27 Sep, 2011 05:03 PM

I'm pretty sure this is a bad sign, but I'm trying to learn ruby on rails as my first coding language, on my own.
I'm trying to to get ruby and rails installed on my mac (OSX 10.6.8) and I am already hitting a brick wall.

  1. I downloaded RubyGems, and I put it in a folder in my user directory
  2. I ran ruby setup.rb, all good RubyGems installed the following executables: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem
  3. Then I ran gem install rails, and that is where I hit the wall.

    $ gem install rails
    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/1.8/usr/bin/ruby extconf.rb
    mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
    Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/bcrypt-ruby-3.0.1 for inspection.
    Results logged to /Library/Ruby/Gems/1.8/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out`
    

I"m not what is going on, but I don't think that ERROR is what I'm going for.

Will one of you take pity? I am just looking for advice on how to get it all installed properly?

  1. Support Staff 2 Posted by Luis Lavena on 27 Sep, 2011 05:12 PM

    Luis Lavena's Avatar

    Hello,

    To install gems that require compilation. You need a compiler.

    Either you can install Xcode (if you plan to develop with it) or just the compiler, which can be downloaded from here:

    https://github.com/kennethreitz/osx-gcc-installer

  2. Luis Lavena closed this discussion on 27 Sep, 2011 05:12 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

29 Aug, 2014 06:23 PM
28 Aug, 2014 07:18 PM
27 Aug, 2014 12:03 PM
26 Aug, 2014 07:09 PM
26 Aug, 2014 07:07 PM