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

Cant Install Devise.

Hey everyone, I was trying to instal "Devise" for the "Ruby" series, but couldn't get in to properly install in Terminal.

I included: gem 'devise' in the gem file, and ran bundle in Terminal.

However, I get this error message.

An error occurred while installing bcrypt-ruby (3.1.2), and Bundler cannot continue. Make sure that gem install bcrypt-ruby -v '3.1.2' succeeds before bundling.

What may I be doing wrong here? I'm new to ROR, so I'm still unfamiliar with the basics, but please help!

Thanks in advance!

5 Answers

Make sure you are using rails version 3.2, which is the version used in the videos.

If you are already using rails 3.2, then you probably have to specify the version of devise that works with that version of rails.

Hi, You are missing the bcrypt-ruby. Simple type "gem install bcrypt-ruby" on terminal.

Thank you Daniel and Brandon!

I'm absolutely a beginner with Ruby, so I had no idea how to solve this, but I made it to work. I was using Rails version 3.2, and also specified the version of Devise to use. However, when I ran the "gem install bcrypt-ruby" command, an error came up saying,

Error installing bcrypt-ruby: ERROR: Failed to build gem native extension.

I ended up with this article: "http://stackoverflow.com/questions/6119153/why-do-i-get-a-bcrypt-ruby-gem-install-error" and succeeded upon running this command: "sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2".

I'm still not 100% sure what this all means, but I did get it going. Thank you!

Probably the bcrypt-ruby is made of c/c++, so the gem need gcc to compile. But this is just a guess.

Those are the command line tools. They were probably out of date on your Mac. Depending on your version of OS X, you may have to update to 5.0