sguss2024 / google-api-ruby-client

Automatically exported from code.google.com/p/google-api-ruby-client
Apache License 2.0
0 stars 0 forks source link

WEBrick log set to /dev/null even on Windows in bin/google-api #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The command line tool is broken on Windows, because the script sets a 
non-existent path for webrick's log.

C:/Ruby192/lib/ruby/1.9.1/webrick/log.rb:22:in `initialize': No such file or dir
ectory - /dev/null (Errno::ENOENT)
        from C:/Ruby192/lib/ruby/1.9.1/webrick/log.rb:22:in `open'
        from C:/Ruby192/lib/ruby/1.9.1/webrick/log.rb:22:in `initialize'
        from C:/Ruby192/lib/ruby/1.9.1/webrick/log.rb:78:in `initialize'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/google-api-client-0.3.0/bin/goo
gle-api:369:in `new'

Changing bin/google-api row 369 

logger = WEBrick::Log.new('/dev/null')

to

logger = WEBrick::Log.new() 

is a work-around but causes log to written on stdout.

I'm using RubyInstaller Ruby 1.9.2p180 and google-api-client 0.3.0

Original issue reported on code.google.com by kari.sil...@iki.fi on 15 Dec 2011 at 8:24

GoogleCodeExporter commented 9 years ago
Actually, that work-around doesn't help much, because the tool fails later on

[2011-12-15 10:19:02] ERROR NoMethodError: undefined method `each' for #<WEBrick
::Log:0x33aac88>
        C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:165:in `access_log'
        C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:87:in `run'
        C:/Ruby192/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_threa
d'

Original comment by kari.sil...@iki.fi on 15 Dec 2011 at 8:52

GoogleCodeExporter commented 9 years ago
Hmm, I thought I'd fixed this.

Original comment by bobaman@google.com on 15 Dec 2011 at 10:02

GoogleCodeExporter commented 9 years ago

Original comment by bobaman@google.com on 10 Jan 2012 at 7:11