Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rails install - ERROR ... executing gem ... (OpenSSL::SSL::SSLError) SSL_connect ... read server hello A: wrong version number

I am very new to Linux (been living in MS world for many years). I thought I'd try something different, like ruby on rails under linux. Been trying to get a dev machine set up, and I must say, it's been quite overwhelming! Here is what I have done so far, and my current problem that I cannot figure out:

Installed Linux Mint 15 (was this a bad choice? the only reason I ask is all the difficulties I've had so far)

Ran the update manager and installed all updates.

Install git

sudo apt-get install git

Install rbenv

git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc

Install ruby-build as a rbenv plugin

git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

Install opensssl (the ruby install fails if I don't do this)

sudo apt-get install libssl-dev

Install ruby

rbenv install 2.0.0-p247

Set my ruby version

rbenv global 2.0.0-p247

Install rails

gem install rails

This fails with

Fetching: i18n-0.6.5.gem (100%)
Successfully installed i18n-0.6.5
ERROR:  While executing gem ... (OpenSSL::SSL::SSLError)
    SSL_connect returned=1 errno=0 state=SSLv3 read server hello A: wrong version number

So apparently, there's still something not quite right with the ssl lib? Either that or I've taken a wrong step somewhere? Please help, thanks!

like image 269
James R. Avatar asked Oct 19 '13 20:10

James R.


1 Answers

I am pretty new in linux world.

I was having exactly the same problem after following the same steps.

In my case it got solve just doing:

gem update --system

After that the rails installation gave me no prob.

Hope is just that!

like image 155
kikusin Avatar answered Oct 22 '22 09:10

kikusin