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 Rails on Mac

Eric Tuffyas
Eric Tuffyas
8,546 Points

ERROR: While executing gem ... (Gem::Exception) Unable to require openssl, install OpenSSL and rebuild ruby

I have tried to reinstall Xcode several times and re-build ruby but I still keep getting this message. Can someone please help me?

1 Answer

Eric Tuffyas
Eric Tuffyas
8,546 Points

I ended up having to use the following command: sudo gem install rails --source http://rubygems.org (it will ask for your password since you are accessing the install as a super user). Then mid-way through the instal it failed to instal a gem called "nokogiri" I went into the library files and there was a script named "test_all" in the partially complete nokogiri library folder. The script said that I needed ruby version 2.3.3. I installed ruby 2.3.3 (as shown in this video) and set it to default. This allowed me to use complete the rails gem install.