tags:

views:

12

answers:

1

Hi, I'm trying to install Ruby Bossman, and the following exception happens:

/opt/local/lib/ruby/gems/1.8/gems/bossman-0.4.1/lib/bossman/boss.rb:10:in `initialize': undefined method `to_query' for #<Hash:0x1010f0800> (NoMethodError)
    from /opt/local/lib/ruby/gems/1.8/gems/bossman-0.4.1/lib/bossman/search.rb:12:in `new'
    from /opt/local/lib/ruby/gems/1.8/gems/bossman-0.4.1/lib/bossman/search.rb:12:in `method_missing'
    from es.rb:12

any idea? thanks

+1  A: 

The problem appears because a Hash outside of Rails doesn't have a to_query method.

I the code in

/opt/local/lib/ruby/gems/1.8/gems/bossman-0.4.1/lib/bossman/boss.rb

by changing a line

@uri.query = @options.to_query

into this:

@uri.query = ""
@options.each { |k,v| @uri.query += "#{k}=#{v}&" }
Merlin