Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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".