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

Nthulane Makgato
PLUS
Nthulane Makgato
Courses Plus Student 19,602 Points

Missing the OpenSSL lib?

Hi Guys,

I have am trying to install ruby 2.1.1 but when I run it in the terminal, this is what i get:

$rbenv install 2.1.1 Downloading ruby-2.1.1.tar.gz... -> http://dqw8nmjcqpjn7.cloudfront.net/e57fdbb8ed56e70c43f39c79da1654b2 Installing ruby-2.1.1...

BUILD FAILED

Inspect or clean up the working tree at /var/folders/tj/_bd6whds6lb7wtn2m8ylwx7h0000gp/T/ruby-build.20140425020809.13664 Results logged to /var/folders/tj/_bd6whds6lb7wtn2m8ylwx7h0000gp/T/ruby-build.20140425020809.13664.log

Last 10 log lines: io-console 0.4.2 json 1.8.1 minitest 4.7.5 psych 2.0.3 rake 10.1.0 rdoc 4.1.0 test-unit 2.1.1.0 installing rdoc: /Users/nthulanemakgato/.rbenv/versions/2.1.1/share/ri/2.1.0/system installing capi-docs: /Users/nthulanemakgato/.rbenv/versions/2.1.1/share/doc/ruby The Ruby openssl extension was not compiled. Missing the OpenSSL lib?

I must admit that I don't know what is going on. So I went on Google, searched and tried a few things like:

$brew link openssl --forceLinking /usr/local/Cellar/openssl/1.0.1f... Warning: Could not link openssl. Unlinking...

Error: Permission denied - /usr/local/op

I have installed xcode I have a OS X 10.9.2. Homebrew is installed. OpenSSL 0.9.8y 5 Feb 2013

I have been struggling with this for a while. Please help.

6 Answers

Nthulane Makgato
PLUS
Nthulane Makgato
Courses Plus Student 19,602 Points

I found the answer to this challenge in another site.

$rbenv install --patch 2.1.1

then

$curl https://gist.githubusercontent.com/andschwa/11334511/raw/563d5c2efb869cafb0c65404d12243822bba2817/ruby-2.1.1-readline.patch | rbenv install --patch 2.1.1

I got this information from this link: https://schwartzmeyer.com/2014/04/26/building-ruby-2-0-0-and-2-1-1-on-os-x/

Stone Preston
Stone Preston
42,016 Points

try running

$ brew update
$ brew upgrade ruby-build

then running the rbenv install command after that

to be honest, I would probably just use RVM if you get tired of trying to figure this out haha. I used rbenv for a while, and now im back to using RVM.

Nthulane Makgato
PLUS
Nthulane Makgato
Courses Plus Student 19,602 Points

Thanks for responding. I have tried both and this is what is get.

''' $ brew update

error: unable to unlink old '.gitignore' (Permission denied) error: unable to create file CODEOFCONDUCT.md (Permission denied) error: unable to unlink old 'CONTRIBUTING.md' (Permission denied) error: unable to create file LICENSE.txt (Permission denied) error: unable to unlink old 'README.md' (Permission denied) error: unable to unlink old 'SUPPORTERS.md' (Permission denied) Checking out files: 100% (1995/1995), done. Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

$ brew upgrade ruby-build Error: ruby-build not installed '''

Any idea what's wrong? How do I make it come up as "markdown"?

Stone Preston
Stone Preston
42,016 Points

no idea really. Just trying stuff I found on google.

Stone Preston
Stone Preston
42,016 Points

trying installing openSSL without passing those flags you used when you first tried

$ brew install openssl

if you get a permissions error try

$ sudo brew install openssl
Nthulane Makgato
PLUS
Nthulane Makgato
Courses Plus Student 19,602 Points

"$ brew install openssl ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/openssl-1.0.1g.mavericks.bottle.tar.gz

################################################################## 100.0%

==> Pouring openssl-1.0.1g.mavericks.bottle.tar.gz ==> Caveats A CA file has been bootstrapped using certificates from the system keychain. To add additional certificates, place .pem files in /usr/local/etc/openssl/certs

and run /usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, so it was not symlinked into /usr/local.

Mac OS X already provides this software and installing another version in parallel can cause all kinds of trouble.

The OpenSSL provided by OS X is too old for some software.

Generally there are no consequences of this for you. If you build your own software and it requires this formula, you'll need to add to your build variables:

LDFLAGS:  -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include

Error: Failed to create: /usr/local/opt/openssl Things that depend on openssl will probably not build. ==> Summary ???? /usr/local/Cellar/openssl/1.0.1g: 429 files, 15M"

It doesn't look like it installed.