cjohansen / juicer

A command line tool for JavaScript and CSS developers
630 stars 47 forks source link

Not able to Install YUI Compressor on Windows 7!!! #64

Closed vikash-bhardwaj closed 11 years ago

vikash-bhardwaj commented 11 years ago

Hi,

I have been trying lot of things to install the YUI Compressor but always getting below error, can you please help me in resolving this issue. It used to work in past but not now for me :(

I have tried installing latest version of Ruby and also updated the latest version of Rubygem and Juicer 1.0.18, still no luck.

Error: C:/Ruby193/lib/ruby/1.9.1/net/http.rb:799:in connect': SSL_connect returned=1 e rrno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL ::SSL::SSLError) from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:799:inblock in connect' from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:54:in timeout' from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:99:intimeout' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:799:in connect' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:755:indo_start' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:744:in start' from C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:306:inopen_http' from C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:775:in buffer_open' from C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:203:inblock in open_loop' from C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:201:in catch' from C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:201:inopen_loop' from C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:146:in open_uri' from C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:677:inopen' from C:/Ruby193/lib/ruby/1.9.1/open-uri.rb:33:in open' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/juicer-1.0.18/lib/juicer/instal l/yui_compressor_installer.rb:64:inlatest' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/juicer-1.0.18/lib/juicer/comman d/install.rb:57:in version' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/juicer-1.0.18/lib/juicer/comman d/install.rb:42:inblock in execute' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/juicer-1.0.18/lib/juicer/comman d/install.rb:39:in each' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/juicer-1.0.18/lib/juicer/comman d/install.rb:39:inexecute' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/cmdparse-2.0.5/lib/cmdparse.rb: 464:in parse' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/juicer-1.0.18/lib/juicer/cli.rb :27:inparse' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/juicer-1.0.18/lib/juicer/cli.rb :37:in run' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/juicer-1.0.18/bin/juicer:6:in <top (required)>' from C:/Ruby193/bin/juicer:23:in load' from C:/Ruby193/bin/juicer:23:in

'

jackhand commented 11 years ago

I'm also seeing this in Windows 8.

xnzhu commented 11 years ago

I am also seeing the same on Windows Server 2008 R2, Ruby version: ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mingw32]. Installed juicer 1.0.18. When tried to run:juicer install yui_compressor, got the similar error:

C:/Ruby187/lib/ruby/1.8/net/http.rb:586:in connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL:: SSL::SSLError) from C:/Ruby187/lib/ruby/1.8/net/http.rb:586:inconnect' from C:/Ruby187/lib/ruby/1.8/net/http.rb:553:in do_start' from C:/Ruby187/lib/ruby/1.8/net/http.rb:542:instart' from C:/Ruby187/lib/ruby/1.8/open-uri.rb:242:in open_http' from C:/Ruby187/lib/ruby/1.8/open-uri.rb:616:inbuffer_open' from C:/Ruby187/lib/ruby/1.8/open-uri.rb:164:in open_loop' from C:/Ruby187/lib/ruby/1.8/open-uri.rb:162:incatch' from C:/Ruby187/lib/ruby/1.8/open-uri.rb:162:in open_loop' from C:/Ruby187/lib/ruby/1.8/open-uri.rb:132:inopen_uri' from C:/Ruby187/lib/ruby/1.8/open-uri.rb:518:in open' from C:/Ruby187/lib/ruby/1.8/open-uri.rb:30:inopen' from C:/Ruby187/lib/ruby/gems/1.8/gems/juicer-1.0.18/lib/juicer/install/yui_compressor_installer.rb:64:in latest' from C:/Ruby187/lib/ruby/gems/1.8/gems/juicer-1.0.18/lib/juicer/command/install.rb:57:inversion' from C:/Ruby187/lib/ruby/gems/1.8/gems/juicer-1.0.18/lib/juicer/command/install.rb:42:in execute' from C:/Ruby187/lib/ruby/gems/1.8/gems/juicer-1.0.18/lib/juicer/command/install.rb:39:ineach' from C:/Ruby187/lib/ruby/gems/1.8/gems/juicer-1.0.18/lib/juicer/command/install.rb:39:in execute' from C:/Ruby187/lib/ruby/gems/1.8/gems/cmdparse-2.0.3/lib/cmdparse.rb:436:inparse' from C:/Ruby187/lib/ruby/gems/1.8/gems/juicer-1.0.18/lib/juicer/cli.rb:27:in parse' from C:/Ruby187/lib/ruby/gems/1.8/gems/juicer-1.0.18/lib/juicer/cli.rb:37:inrun' from C:/Ruby187/lib/ruby/gems/1.8/gems/juicer-1.0.18/bin/juicer:6 from C:/Ruby187/bin/juicer:19:in `load' from C:/Ruby187/bin/juicer:19

sacparker commented 11 years ago

I was finally able to get this working

gem install mechanize

Update yui_compressor_installer.rb

webpage = Nokogiri::HTML(open(@website).read)

TO

require "mechanize"

a = Mechanize.new a.agent.http.verify_mode = OpenSSL::SSL::VERIFY_NONE webpage = Nokogiri::HTML(a.get(@website).content)

the better way is on the answer below but because i was just needing a quick fix to install, above works

http://stackoverflow.com/questions/8567973/why-does-accessing-a-ssl-site-with-mechanize-on-windows-fail-but-on-mac-work

cjohansen commented 11 years ago

I put the quick fix into 1.0.20.