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 trialNick Harmon
5,900 Pointsinstalling Ruby on mac, got error...
Hi i don't know what is going on but I've been trying to watch the videos and look up stuff online to install ruby, everything goes well in terminal until the end i get an error message that says :
MadelynsMiniMac-2:~ madelynpapineau$ sudo gem install rails Password: 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
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.5 for inspection. Results logged to /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.5/ext/nokogiri/gem_make.out MadelynsMiniMac-2:~ madelynpapineau$
Can anyone tell me what I am doing wrong or how to fix this problem please? Thank You
1 Answer
Stone Preston
42,016 Pointstry installing the xcode command line tools from here. you will have to create a free developer account.
Nick Harmon
5,900 PointsNick Harmon
5,900 Pointsthanks i'll try it now
Nick Harmon
5,900 PointsNick Harmon
5,900 Pointsthat didn't change anything i'm still getting error messages saying I cant install...
Stone Preston
42,016 PointsStone Preston
42,016 Pointswhat does the output of running the command
gcc --version
look like
Nick Harmon
5,900 PointsNick Harmon
5,900 PointsMadelynsMiniMac-2:~ madelynpapineau$ gcc --version
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Stone Preston
42,016 PointsStone Preston
42,016 Pointsdo you have xcode installed? if so try opening it. it will probably ask you to accept the terms
Nick Harmon
5,900 PointsNick Harmon
5,900 Pointsok great that worked and it installed both ruby and rails fine. As I'm continuing on in the Ruby on Rails track where am I supposed to be writing the code...ruby doesnt show up like any program I have used before, do I just use terminal or textedit...sorry for such basic questions I've just never done this before. Thanks for your help!