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

RAJESH SHANKAR
RAJESH SHANKAR
1,795 Points

Could not able install gems on Windows PC.

CMD> gem install rails

ERRO: Could not find a valid gem 'rails' <>=0, here is why: Unable to download data from https://rubygems.org/ - SSL_connect retrned=1 errno=0 state=SSLv3 read server certificate B:certificate verify failed (https://api.rubygems.org/latest_specs.4.8.gz)

=========================================

I could not able to install sqlite or any other gems.

---Succesfully installed from rubyinstaller. from which ruby installed successfully.

        Please help to fix this. Your help will be grately appreciated.

Thanks, Rajesh.

3 Answers

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

If possible, avoid using Windows for Rails development at all costs. Using Windows when developing Rails will bring you more frustration than actual results and you will never be able to follow Treehouse videos completely. You need a Unix-based system. I suggest using free Linux distribution on a free virtual machine under Windows (like VMWare Player).

As far as I remember, problem with gems under Windows is the https:// part. You should try downloading from http like this: gem install rails --source http://rubygems.org

I just went through this process of setting up a Ruby on Rails environment for Windows 8.1. You need the RubyGems package manager, I recommend you select the ZIP button. Once you have extracted the files, open a command terminal in that directory - where setup.rb is located - and run ruby setup.rb.

Now you can run gem install rails. Next, you'll need to run gem install tzinfo-data read here for more information.

Next, run rails new app wherever you want to create your RoR app. This will create a directory called app in the current working directory.

If you are using a 64-bit version of Ruby on Windows, then add :x64_mingw to the list of platforms as follows (located in Gemfile at the root of your app):

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]

That should be about it. Let me know if you have any other issues. Good luck.

Also consider getting the Ruby Devkit. Basically, this will allow you to use most of the gems available for ruby.

RAJESH SHANKAR
RAJESH SHANKAR
1,795 Points

Thanks for your suggestions...This really helped me. But can I know in the real time development of rails development, Windows is not suitable. Do I need to uninstall windows and install UBUNTU.

Please suggest, should I degrade my WIndows to UBUNTU.?

Please suggest...

Thanks, Rajesh.

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

You don't have to uninstall Windows. You can use virtual machine (VMWare Player or Virtual Box), you can double boot and have Windows and Ubuntu on one computer (choose which one to run every time you turn on the computer), you can also use cloud environment, for example Cloud9 - you simply get a full Rails environment in your browser. Info on how to configure: https://www.railstutorial.org/book/beginning#sec-development_environment