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 trialJac Wynn
16,850 PointsError when adding gems
So I am trying to install the gems rspec and capybara in the Odot tutorial. After trying to do the bundle install in the terminal i get a error saying:
extconf failed, exit code 1
Gem files will remain installed in /Users/Jac/.rvm/gems/ruby-2.1.2/gems/nokogiri-1.6.3.1 for inspection.
Results logged to /Users/Jac/.rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-13/2.1.0-static/nokogiri-1.6.3.1/gem_make.out
An error occurred while installing nokogiri (1.6.3.1), and Bundler cannot continue.
Make sure that gem install nokogiri -v '1.6.3.1'
succeeds before bundling.
In the beginning of this tutorial it was mentioned that if your running Rails 4.1 (which I am) you may have problems so I'm guessing this is one of those problems. Any help from anyone will be great! Thanks
4 Answers
Dan Martin
33,150 PointsCoincidentally I was going through this issue when you initially posted. Until now, I have not had a solution. (http://apple.stackexchange.com/questions/129280/nokogiri-gem-fails-to-install-in-os-x-mavericks) finally had my solution. Not an easy one. Seems to be common with clean installs of mavericks osx. Been trying to install vagrant on my home machine for quite some time now. Hope this helps you if you haven't already found a solution.
Derek Hendricks
13,155 PointsHi Jac,
I'm not sure if you're still having an issue with this, but I was able to get it to work by installing the new Xcode, which has an update for OS X
First, enter the following command in the terminal: xcode-select --install
Then a prompt will display, asking if you want to install the tools, so: click install
Once the installation is complete, enter the following command in the terminal: sudo gem install nokogiri
This worked for me. Hopefully it works for you as well.
Brant Wellman
9,748 PointsI was having this same issue, and Derek's solution worked for me. I'm now moving forward. Thanks!
Ken Alger
Treehouse TeacherJac;
I am running Rails 4.1 as well and did not have any issue installing rspec or capybara, so I don't believe that is the issue.
Can you provide a little bit of additional information in terms of the Operating System version and type as well as any additional development environment information?
Jac Wynn
16,850 PointsMac OS X 10.9 and what exactly do you mean by development environment? Im pretty new to this so some things are a little confusing to me.
Ken Alger
Treehouse TeacherI was thinking about any other software you have installed which might be hampering your gems. If you have been strictly installing things from the video, you are probably okay with conflicts. While I have Mac experience I don't develop on one so I will let someone with more specific Mac knowledge assist you through your gem issues.
Best of luck!
Jac Wynn
16,850 PointsThank you...I appreciate everything!
Jac Wynn
16,850 PointsJac Wynn
16,850 PointsThis actually solved my problem. I had to install a RVM to get the gem "nokogiri" to install. I'm guessing the version of ruby that comes straight out the box doesn't work with all gems. Lesson learned. Thanks for all your help!