加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby – 设置Rails服务器

发布时间:2020-12-16 21:04:27 所属栏目:百科 来源:网络整理
导读:我是 Ruby的初学者,关注“ Creating a New Rails Project”. 但我无法启动服务器.我试过了: 运行rails服务器,但得到: Could not find gem 'tzinfo-data = 0 x86-mingw32' in the gems available on the machine. Run 'bundle install' to install missing
我是 Ruby的初学者,关注“ Creating a New Rails Project”.

但我无法启动服务器.我试过了:

>运行rails服务器,但得到:

Could not find gem 'tzinfo-data <>= 0> x86-mingw32' in the gems available on the machine. 
Run 'bundle install' to install missing gems.

>运行bundle install但得到了:

An error occurred while installing rake (10.4.2),and Bundler cannot continue.
Make sure that 'gem install rake -v '10.4.2'' succeeds before bundling.

> gem’tzinfo-data’但得到了:

Unknown command tzinfo-data

> gem install tzinfo-data:

Could not find a valid gem 'tzinfo-data' <>= 0>,here is why:
Unable to download data from...

我有Windows 8.1. 64位

tzinfo-data使用cacert.pem文件解决,该文件遵循接受的答案中的指南.今天我正在尝试安装bootstrap-sass gem文件.我需要另一个.pem文件吗?

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

解决方法

您有一个常见的SSL问题.

您将看到此错误消息:

certificate verify failed

错误消息是因为您的系统需要新的SSL证书.

以下是有关它的信息:

http://railsapps.github.io/openssl-certificate-verify-failed.html

在Windows上:

尝试升级SSL证书.

>下载http://curl.haxx.se/ca/cacert.pem.
>将此文件保存在您想要的任何位置,例如:

C:RailsInstallercacert.pem

>在命令行中,告诉Ruby在哪里找到cert文件,例如:

set SSL_CERT_FILE=C:RailsInstallercacert.pem

>重试gem安装.
>如果它有效,那很好.如果您希望这可以与系统上的每个项目一起使用,并且还可以在重新启动后继续使用,那么您可以通过在系统范围内添加cert来使证书文件永久化.为此,请使用Windows控制面板.

信用和更多信息:https://gist.github.com/fnichol/867550

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读