Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Jesse Fister
Jesse Fister
11,968 Points

installing rails 5 error

I am trying to install rails 5 and receive the following error in my terminal. Also i am using a Mac OS X El Capitan version 10.11.4... Ruby is already installed. Please help!

"Fetching: nokogiri-1.6.8.gem (100%) Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension.

current directory: /usr/local/rvm/gems/ruby-2.3.1/gems/nokogiri-1.6.8/ext/nokogiri

/usr/local/rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160824-27965-av4iqx.rb extconf.rb Using pkg-config version 1.1.7 checking if the C compiler accepts ... yes checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no Building nokogiri using packaged libraries. *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options."

5 Answers

I feel your pain. I abandoned Rails cause I couldn't get it up and running.

Ilya Dolgirev
Ilya Dolgirev
35,375 Points

Looks like you don't have XCode Command Line Tools. Check this article

Ilya, you had my attention there for a sec, cause I really wanted to do rails. It looks like Xcode command line is just for mac?

Ilya Dolgirev
Ilya Dolgirev
35,375 Points

Yep, this is for Mac :) Are you on Windows or Linux?

Windows sadly. I tried ubuntu (user friendly linux) it just didn't click w/me. And to get a decent mac is out of my price range.

Ilya Dolgirev
Ilya Dolgirev
35,375 Points

What does it mean "Didn't click"? :) Did you install it but you don't like it? It's OK, there are some many Linux distros. My personal choice is Fedora for workstation and CentOS for deployment.

But if you serious about becoming a Rails developer I highly recommend you to use Linux as your development OS. It will prevent you from some weird things and also being confident with Linux and CLI it's a "must have" skill for future Rails ninja. You will love it, I promise :)

There are 2 ways to use it in your case:

  1. Install it as a second system to your PC. You can google many detailed guides about that. I'm sure it'll be easy for you.

  2. Use Linux as a virtual machine.

    • with graphical interface - take a look to VirtualBox or some analogues. But I'm not sure you really need GUI for you VM. 99% of work is CLI-base.
    • CLI-mode (Recommended option) Here Vagrant or Docker(or both) come in to play. I do recommend to start with Vagrant, just follow the Getting Started section in docs. And the great benefit for using Vagrant is to add one more skill to your toolbelt.

Hope it will be helpful. Good luck :)

Jay McGavren
STAFF
Jay McGavren
Treehouse Teacher

john larson , if you want to give it one more go, we've created a new video for installing Rails 5 on Windows that might help you. If that works, you'll be all set to try Rails 5 Basics!

Thanks Jay, I will do that