Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on Rails, could not find a valid gem 'rails'

I installed ruby and updated ruby gems, now I want to download rails 3.2.13. I write gem install rails -v 3.2.13 (I need this version) I have this error

ERROR:  Could not find a valid gem 'rails' (= 3.2.13), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect SYSCA
LL returned=5 errno=0 state=SSLv2/v3 read server hello A (https://rubygems.org/s
pecs.4.8.gz)
ERROR:  Possible alternatives: rails

I read on internet that maybe downloading gem httpclient it could work, but I did not manage to download it (another error) Do you know how I could fix this?

like image 944
morg Avatar asked Jun 05 '13 15:06

morg


4 Answers

do this:

gem sources -a http://rubygems.org

then answer y for

Do you want to add this insecure source? [yn]

lastly,

gem install rails

hope that helps :)

like image 64
beginning Avatar answered Nov 20 '22 17:11

beginning


I had a similiar error.

Try in your Gemfile:

source 'http://rubygems.org'

Instead of:

source 'https://rubygems.org'

That solved my problem...

like image 40
user2503775 Avatar answered Nov 20 '22 17:11

user2503775


see if you can get this to work "wget rubygems.org/downloads/rails-3.2.13.gem"

That worked for me, but Vimsha did not explain how to install the gem once you've downloaded it. It's quite easy:

gem install rails-3.2.13.gem

installs the gem and other gems that it depends on.

This is where I got that information from:

Installing Ruby Gems manually

like image 33
user1208639 Avatar answered Nov 20 '22 17:11

user1208639


The answer and methodology can be found on http://guides.rubygems.org/ssl-certificate-update/

Skip to "INSTALLING USING UPDATE PACKAGES (NEW)" and follow the instructions

Newest RubyGem can be found at https://rubygems.org/pages/download

like image 34
Florian Winkler Avatar answered Nov 20 '22 16:11

Florian Winkler