简体   繁体   English

Ruby on Rails-捆绑器问题

[英]ruby on rails - bundler problems

i have tried to install the rake gems with bundler and got the following messege: 我试图用捆绑器安装耙宝石,并得到以下消息:

C:\Users\M4L\Documents\ex_projects\ror\first_project>bundle install
Fetching source index from https://rubygems.org/
Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most
likely your system doesn't have the CA certificates needed for verification. For

information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without
using SSL, edit your Gemfile sources and change 'https' to 'http'.

I have tried both solutions: 我已经尝试了两种解决方案:

1) the gem source was http://rubygems.org/ and not https://rubygems.org/ the gem fetcher works fine. 1)gem来源是http://rubygems.org/而不是https://rubygems.org/ fetcher可以正常工作。 only the bundler fetcher doesn't work. 只有捆绑程序提取程序不起作用。

2)i tried to install the ca certificates needed for ssl ---- downloaded cacert.pem from http://curl.haxx.se/ca/cacert.pem ,put it on c:\\railsinstaller and adjusted the environment variables 2)我试图安装ssl所需的ca证书----从http://curl.haxx.se/ca/cacert.pem下载了cacert.pem,将其放在c:\\ railsinstaller上并调整了环境变量

set SSL_CERT_FILE = c:\railsinstaller\cacert.pem

and also adjusted them in the control panel. 并在控制面板中对其进行了调整。 all of this did not work 所有这些都不起作用

3) I tried to download all the specified gems in the gem.lock file menually by gem install -- this also did not work. 3)我尝试通过gem install菜单式下载gem.lock文件中的所有指定gem-这也行不通。 as somehow there is another gem list related to bundle install 由于某种原因,还有另一个与捆绑包安装有关的宝石清单

4)i changed my .gemrc file and added the line :ssl_verify_mode: 0 4)我更改了我的.gemrc文件并添加了行:ssl_verify_mode:0

5)if I new the source that bundler relates to I could have changed it to http://rubygems.org / - but I do not know it 5)如果我重新添加了捆绑程序所涉及的源,则可以将其更改为http://rubygems.org /-但我不知道

so I still cannot migrate my database. 因此我仍然无法迁移数据库。

what should I do? 我该怎么办?

i was a real beginner.. it needed to change the https to http in the gem.lock and the gemfile and i changed it only in gem.lock 我是一个真正的初学者..它需要在gem.lock和gemfile中将https更改为http,而我仅在gem.lock中进行了更改

basically the problem happens because i was subscripted to limited(screened) internet (named :"internet rimon") which made problems with ssl. 基本上发生问题是因为我被订购了受限制的(屏蔽的)互联网(名称为“ internet rimon”),这使ssl出现了问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM