首页 > Windows开发 > 详细

windows10安装ruby

时间:2021-05-25 19:10:19      阅读:24      评论:0      收藏:0      [点我收藏+]

下载ruby

下载地址:
https://www.cr173.com/soft/14252.html

安装后安装上

C:\Users\Administrator>ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]

C:\Users\Administrator>gem -v
2.5.2

#报错没添加源
C:\Users\Administrator>gem install bundler
ERROR:  Could not find a valid gem ‘bundler‘ (>= 0) in any repository

# 报没有证书的错
C:\Users\Administrator>gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
Error fetching https://gems.ruby-china.com/:
        SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://gems.ruby-china.com/specs.4.8.gz)

C:\Users\Administrator>gem sources -l
*** CURRENT SOURCES ***

报上面的错误没有证书,参照下面的连接解决
https://www.pianshen.com/article/67147583/


C:\Users\Administrator>gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
https://gems.ruby-china.com/ added to sources
source https://rubygems.org/ not present in cache


C:\Users\Administrator>gem sources -l
*** CURRENT SOURCES ***

https://gems.ruby-china.com/

C:\Users\Administrator>gem install bundler
Fetching: bundler-2.2.17.gem (100%)
Successfully installed bundler-2.2.17
Parsing documentation for bundler-2.2.17
Installing ri documentation for bundler-2.2.17
Done installing documentation for bundler after 33 seconds
1 gem installed

C:\Users\Administrator>gem install rails
Fetching: concurrent-ruby-1.1.8.gem (100%)
Successfully installed concurrent-ruby-1.1.8
Fetching: i18n-1.8.10.gem (100%)
Successfully installed i18n-1.8.10
Fetching: tzinfo-2.0.4.gem (100%)
Successfully installed tzinfo-2.0.4
Fetching: zeitwerk-2.4.2.gem (100%)
ERROR:  Error installing rails:
        zeitwerk requires Ruby version >= 2.4.4.

windows10安装ruby

原文:https://www.cnblogs.com/haima/p/14809932.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!