run-jekyll-on-windows icon indicating copy to clipboard operation
run-jekyll-on-windows copied to clipboard

ERROR: Could not find a valid gem 'jekyll' (>= 0), here is why:

Open EnterpriseWide opened this issue 10 years ago • 28 comments
trafficstars

C:\RubyDevKit>gem install jekyll ERROR: Could not find a valid gem 'jekyll' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/latest_specs.4.8.gz)

Any Ideas?

EnterpriseWide avatar Dec 05 '14 06:12 EnterpriseWide

I just found this and it worked so this may be worth putting in your doco.

$ gem sources --remove https://rubygems.org/ $ gem sources -a http://rubygems.org/ $ gem install jekyll

I found this info here - https://github.com/jekyll/jekyll/issues/1409

EnterpriseWide avatar Dec 05 '14 06:12 EnterpriseWide

@EnterpriseWide This problem (and fix) is desribed here: https://gist.github.com/luislavena/f064211759ee0f806c88 I agree, it could be included in the guide.

linacurious avatar Dec 07 '14 13:12 linacurious

@EnterpriseWide in step 2 error can you help me ?

andikarekatias avatar Dec 17 '14 03:12 andikarekatias

Hi there, When I did this, the installer was very fussy about the url used. When I run gem sources , I get http://rubygems.org/. I think you may have to put the forward slash on the end.

Regards

On Wed, Dec 17, 2014 at 2:29 PM, andikart [email protected] wrote:

@EnterpriseWide https://github.com/EnterpriseWide in step 2 [image: error] https://cloud.githubusercontent.com/assets/10099168/5466147/57f87808-85d7-11e4-8680-24430152ebc4.png can you help me ?

— Reply to this email directly or view it on GitHub https://github.com/juthilo/run-jekyll-on-windows/issues/34#issuecomment-67272566 .

[image: Liquid Visual] http://ewide.com.au/Ben NormanWeb Developer / .NET Specialiste [email protected] t (+61) 404 828 246 w ewide.com.au

EnterpriseWide avatar Dec 17 '14 04:12 EnterpriseWide

Hi,

just went here to file this issue. I just had the same error. Installing any gem failed due to some certificate validation issues. I found the solution by myself on the web, but took some time, so I think it would be really useful to include some note about this on the guide.

I simply removed the SSL source and added the plain HTTP one

gem source -a http://rubygems.org
gem source --remove https://rubygems.org

I used ruby 2.0 x64 on a Windows 8.1 machine.

Thx

juristr avatar Dec 27 '14 09:12 juristr

I just ran into the same issue on Ruby 2.1 x64 + Windows 8.1, and found another solution: https://stackoverflow.com/questions/5720484/how-to-solve-certificate-verify-failed-on-windows/16134586#16134586 .

achimnol avatar Jan 07 '15 05:01 achimnol

I hade the same issue and solved it by creating a gemrc file (workaround 3) like described there: http://railsapps.github.io/openssl-certificate-verify-failed.html

bst27 avatar Jan 17 '15 17:01 bst27

The solution suggested by @juristr worked for me, thanks!

dmcglinn avatar Feb 01 '15 02:02 dmcglinn

Thanks @juristr its help for me as well

tnbuig avatar Feb 01 '15 09:02 tnbuig

Thanks to @juristr. It works well. But It's better to fix this issue in beloved jekyll itself

DONGChuan avatar Feb 10 '15 16:02 DONGChuan

I just tried installing the latest version of gem manually and it worked!

MohammedRabaya avatar Feb 11 '15 04:02 MohammedRabaya

Thanks to @EnterpriseWide . It works well

joeywen avatar Feb 13 '15 09:02 joeywen

I encountered the same issue.The fix is here https://gist.github.com/luislavena/f064211759ee0f806c88 Thx Everyone.

josekenya avatar Mar 05 '15 09:03 josekenya

Just upgrade to the latest rubygems available and it should fix the issue. Specifically, 2.2.3, 2.0.15, 1.8.30 have this fix backported. Note that on Windows 2.4.x might have other issues so in that case switch to 2.3.0.

XhmikosR avatar Mar 10 '15 14:03 XhmikosR

For Chinese user blocked by the Great Wall , you can refer ruby.taobao.com do this:

$ gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/

wzso avatar Nov 05 '15 02:11 wzso

@EnterpriseWide @juristr 3x。 It really works! @wenzhishen Great Wall Oh! 3x!

WhaleChen avatar Jan 05 '16 11:01 WhaleChen

@EnterpriseWide thank you .

zdawei avatar Oct 06 '16 14:10 zdawei

@juristr Your suggestion worked for me! Thanks very muck.

JashonWang avatar Oct 14 '16 07:10 JashonWang

@juristr suggestion worked to me, I'm using windows 7

jeffersondesouza avatar Nov 15 '16 13:11 jeffersondesouza

Thanks man, you saved my ass from a lot of pain. I've been dealing with this for months every time I installed a new gem in my rails projects.

Thanks Ben @EnterpriseWide

MukunziChild avatar Nov 27 '16 07:11 MukunziChild

@juristr your suggestion works for me, i'm using windows 10, thank you

0LING0 avatar Dec 03 '16 09:12 0LING0

This worked for me and I got the guide off of Jekyll's install page. So I'm pretty confident this will work for anyone having the same issue.

http://guides.rubygems.org/ssl-certificate-update/

Donatoni-zz avatar Dec 08 '16 15:12 Donatoni-zz

@EnterpriseWide you solution is perfect!

costanzo avatar Dec 22 '16 12:12 costanzo

Make sure you have all the packages

sudo apt-get update
sudo apt-get install ruby ruby-dev make gcc 

If you do then remove ruby first

sudo apt-get remove ruby

Then run the ones above.

Then do the commands @EnterpriseWide shared above

gem sources --remove https://rubygems.org/
gem sources -a http://rubygems.org/
sudo gem install jekyll

SalN3t avatar Jan 14 '18 06:01 SalN3t

What @juristr said fixed my gem install problem on macOS Sierra 10.12.6 (16G29)

leiurus17 avatar Jul 05 '18 04:07 leiurus17

juristr you boii you have fixed my problem on windows 7 thnx for it buddy ! @juristr . Many many thx

ashirafzal avatar Sep 05 '18 23:09 ashirafzal

请尽可能用比较新的 RubyGems 版本,建议 2.6.x 以上。

$ gem update --system # 这里请翻墙一下 $ gem -v 2.6.3 $ gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/ $ gem sources -l https://gems.ruby-china.com

确保只有 gems.ruby-china.com 2020年3月31日 14:11:03

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

cscli avatar Mar 31 '20 06:03 cscli

如果遇到 SSL 证书问题,你又无法解决,请修改 ~/.gemrc 文件,增加 ssl_verify_mode: 0 配置,以便于 RubyGems 可以忽略 SSL 证书错误。


:sources:

  • https://gems.ruby-china.com :ssl_verify_mode: 0 --------这行, ssl_verify_mode前面有冒号

cscli avatar Mar 31 '20 06:03 cscli