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

匿名 (未验证) 提交于 2019-12-03 03:06:01

问题:

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!

回答1:

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!



回答2:

I'm running rails 4 with ruby 2.0 on Linux Mint 15.

I did:

sudo apt-get install git sudo apt-get install curl curl -L https://get.rvm.io | bash -s stable --ruby sudo apt-get install git-core source ~/.rvm/scripts/rvm bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts    /rvm-installer) rvm autolibs enable rvm reload rvm requirements sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion rvm install ruby-2.0 curl -L https://get.rvm.io | bash -s stable --rails 

and it worked for me. Maybe this helps



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!