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 Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Set up Git and Add Gems

I'm having trouble installing RSpec to Gemfile.

I'm having trouble installing RSpec to Gemfile.

This is what I am getting: http://codeshare.io/s835C

What am I missing?

5 Answers

Jack Choi
Jack Choi
11,420 Points

I think rspec requires nokogiri and nokogiri requires libiconv in your system. This is so common an issue that the Nokogiri team made a page to outline how to resolve it here: http://nokogiri.org/tutorials/installing_nokogiri.html#mac_os_x

Also, I notice you tried to install capybara but I think you've made a typo (an extra a between the p and the y)

Thanks Jack

I feel like I am just stumbling around with the command lines hoping that something rings true.

Here I am confirming nokogiri is installed. I then [cd] to the project and try to [bundle] again. No dice

http://codeshare.io/G7Xfn

Jack Choi
Jack Choi
11,420 Points

It seems nokogiri still hasn't been installed properly:

ERROR:  Error installing nokogiri:
    ERROR: Failed to build gem native extension.

    /Users/chester911cross/.rbenv/versions/2.0.0-p353/bin/ruby extconf.rb
Building nokogiri using packaged libraries.
-----
libiconv is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** extconf.rb failed ***

How did the install for libiconv go? I remember having to go through this a while back and I think I went with the Homebrew route. If you can provide the steps you went through to install libiconv I can try to help figure out what's wrong.

The libiconv seamed to be fine here is me running it again.

http://codeshare.io/1LJ8t

I'm giving homebrew a shot after looking into it a bit. I'm following this:

http://www.createdbypete.com/articles/ruby-on-rails-development-setup-for-mac-osx/

I'll update in a bit.

Tried with Homebrew too. This is driving me mad, ya no?

http://codeshare.io/toz3v

Moe Khatib
Moe Khatib
5,293 Points

I am having the exact same issue, I spent a good 6 hours trying to fix this, I gave up ever after! Drove me mad as well.