在捆绑之前确保 'gem install ~ ' 成功 [英] Make sure that 'gem install ~ ' succeeds before bundling

查看:69
本文介绍了在捆绑之前确保 'gem install ~ ' 成功的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我今天开始学习 Ruby on rails.我已经安装了 Ruby、DEVELOPMENT KIT、SQLite3、bundler 和 rails.

I began learning Ruby on rails today. I have installed Ruby, DEVELOPMENT KIT, SQLite3, bundler and rails.

接下来,我的教科书说在控制台中运行 rails new todo.然后,出现了以下消息:

Next, My textbook says to run rails new todo in the console. Then, the following message appeared:

Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read
server certificate B: certificate verify failed (https://rubygems.org/gems/coffee-rails-4.0.1.gem)
An error occurred while installing execjs (2.2.2), and Bundler cannot
continue.
Make sure that `gem install execjs -v '2.2.2'` succeeds before bundling.

我做了如下.

C:\rubyfolder>gem install execjs -v 2.2.2

然后出现如下:

Fetching: execjs-2.2.2.gem (100%)
Successfully installed execjs-2.2.2
Parsing documentation for execjs-2.2.2
Installing ri documentation for execjs-2.2.2
Done installing documentation for execjs after 1 seconds
WARNING:  Unable to pull data from 'https://rubygems.org/': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
1 gem installed

接下来,我再次运行 rails new todo.然后,上面消息的execjscoffee-script替换的消息出现了.

Next, I ran rails new todo again. Then, the message that execjs of above message is replaced by coffee-script appeared.

Make sure that `gem install coffee-script -v '2.3.0'` succeeds before bundling.

接下来,我安装了 coffee-script.

Next, I installed coffee-script.

这种工作我已经重复了三四次,但都没有完成.我该怎么办?

I have repeated this kind of work for 3 or 4 times, but it don't finish. What should I do?

(execjs 可能不是这个周期的第一个.我看不到日志的第一部分)

(execjs might not be the first of this cycle. I can't see first part of logs)

推荐答案

我也遇到过类似的问题.这对我有用:

I have faced similar kind of issue. This is what worked for me:

  1. 在你的 Gemfile 或任何你指定 gems 列表的地方,用这个 source 替换 source 'https://......'http://......' 否则它会一直问在打包前确保 gem install gem_name__ v xxx' 成功.`
  2. Do bundle installrails new todo
  3. 完成,这次没有错误.
  1. In your Gemfile or wherever you have specified the gems list and replace source 'https://......' with this source 'http://.......' otherwise it will keep on asking Make sure that gem install gem_name__ v xxx' succeeds before bundling.`
  2. Do bundle install or rails new todo
  3. Done, no error this time.

这篇关于在捆绑之前确保 'gem install ~ ' 成功的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆