简体   繁体   English

在Rails上创建新项目时获取gem元数据时出错

[英]Error while fetching gem metadata when creating a new project on Rails

I have some problem and after one day searching for the answer I didn't find anything useful. 我有一些问题,经过一天寻找答案,我没有找到任何有用的东西。 There's the problem : 有问题:

When I want to create a new project with rails by typing this : 当我想通过键入以下内容创建一个带有rails的新项目时:

~$ rails new project

I get some messages and then an error message : 我得到一些消息,然后是一条错误消息:

Fetching gem metadata from https://rubygems.org/.Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Please include the full output of the command, your Gemfile and Gemfile.lock. Thanks!

Do you have solutions ? 你有解决方案吗? Thanks for the answers ! 谢谢你的回答!

EDIT : Using rails 3.2.2, rubygems 1.8.19 and bundler 1.1.1 编辑:使用rails 3.2.2,rubygems 1.8.19和bundler 1.1.1

Bastien 巴斯蒂安

I found the answer. 我找到了答案。 I put it here just in the case of somebody had the same problem. 我把它放在这里只是在有人遇到同样问题的情况下。 In fact, it was a problem with openssl witch make the whole thing fail. 事实上,这是一个问题,openssl女巫使整个事情失败。

 cannot load such file -- openssl (LoadError)

After many researchs, I found my answer here : 经过多次研究,我在这里找到了答案:

http://www.dinduks.com/rails-cannot-load-such-file-openssl http://www.dinduks.com/rails-cannot-load-such-file-openssl

Thank you all for helping me ! 谢谢大家的帮助!

尝试更新rubygems和bundler gem。

Just install jruby-openssl: 只需安装jruby-openssl:

jruby -S gem install jruby-openssl jruby -S gem install jruby-openssl

Just an advice: read all your console log, the answer was there. 只是一个建议:阅读所有的控制台日志,答案就在那里。

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

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