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 Installing a Ruby Development Environment Installing a Ruby Development Environment Installing Ruby on Mac

Issac Gonzalez
Issac Gonzalez
5,354 Points

Trying to install ruby and get error - "fatal error: 'stdlib.h' file not found #include < stdlib.h> "

When trying to install ruby via terminal I get the following error.

" ./cryptlib.h:62:10: fatal error: 'stdlib.h' file not found #include < stdlib.h>

1 error generated. make[1]: *** [cryptlib.o] Error 1 make: *** [build_crypto] Error 1 "

My XCode is up to date.

Please let me know what I should do.


3 Answers

Stone Preston
Stone Preston
42,016 Points

have you installed the xcode developer tools? try opening terminal and running the following command:

xcode-select --install

a window should pop up about installing the command line tools. you most likely need to install these to install rails/ruby. install them then try installing ruby again

Kang-Kyu Lee
Kang-Kyu Lee
52,045 Points

Yes exactly - only not sure if it's for Mavericks only. Also alternatively, (I remember I started with)

gcc --version

And, this is my question, is Xcode Command-line Tools another thing, or the same, from Xcode Development Tools?

Isaac, sounds like you're on OS X. What do you see when typing "ruby -v" at the command line?

Great! Isaac, I suggest marking Stone's answer "Best Answer".