postrank-labs/goliath — Issue #131: Server crashes while evaluating an perfectly valid URI
Author: joaodrp
Created: 2012-01-08 13:01:22+00:00
State: open

Hi,

I have this in my config file:

require 'uri'
uri = URI.parse("mysql://visor:passwd@127.0.0.1:3306/visor")

and I'm getting this when launching the server:

$ be ruby server.rb -sv -p 4568 -e production -c config/server.rb

[2770:INFO] 2012-01-08 12:53:33 :: Starting server on 0.0.0.0:4568 in production mode. Watch out for stones.

"running configure..."

"mysql://visor:passwd@127.0.0.1:3306/visor"

/Users/joaodrp/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/bundler/gems/goliath-8a1476e0fc22/lib/goliath/server.rb:117:in `eval': bad URI(is not URI?): mysql://visor:passwd@127.0.0.1:3306/visor (URI::InvalidURIError)

from /Users/joaodrp/.rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/uri/common.rb:174:in `parse'
from /Users/joaodrp/.rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/uri/common.rb:628:in `parse'
from /Users/joaodrp/workspace/visor/em-meta/lib/em-meta/backends/mysql_db.rb:46:in `connect'
from (eval):22:in `load_config'
from /Users/joaodrp/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/bundler/gems/goliath-8a1476e0fc22/lib/goliath/server.rb:117:in `eval'
from /Users/joaodrp/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/bundler/gems/goliath-8a1476e0fc22/lib/goliath/server.rb:117:in `load_config'
from /Users/joaodrp/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/bundler/gems/goliath-8a1476e0fc22/lib/goliath/server.rb:81:in `block in start'
from /Users/joaodrp/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/em-synchrony-1.0.0/lib/em-synchrony.rb:25:in `call'
from /Users/joaodrp/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/em-synchrony-1.0.0/lib/em-synchrony.rb:25:in `block (2 levels) in synchrony'

Thats a perfectly valid URI, tried on IRB without problems.