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

Eliot Ostling
Eliot Ostling
9,599 Points

Couldn't find valid gem 'rails'

After running the gem install rails --version 5.0.0 I get an error that it couldnt find the valid gem rails, unable to download data from https://rubygems.org -ssl connect returned=1 errono-0 read server certificate B: certification verify failed. Any ideas?

Hi Eliot,

If you go to https://rubygems.org and search for Rails, it will default to 5.0.0.1 It suggests that if you DO just run gem install rails, this is the version that will download, right now you would specifiy a version only if you wanted rails 4 or earler. Let me know! :)

2 Answers

Eliot Ostling
Eliot Ostling
9,599 Points

Thank you for your response! The solution that worked for me was from http://guides.rubygems.org/ssl-certificate-update/ This very issue is solved with C:>gem install --local C:\rubygems-update-2.6.7.gem C:>update_rubygems --no-ri --no-rdoc

then

C:>gem uninstall rubygems-update -x

After this I was happy as a clam. Cheers guys!

David O' Rojo
David O' Rojo
11,051 Points

As Lee commented, for now you can just run gem install rails. Other option is

gem install rails -v '~> 5.0'