RuntimeError When Invoking #to_sql or #to_hash
Reported by John Topley | September 1st, 2007 @ 12:00 PM
Hi,
I get a RuntimeError when invoking the #to_sql or #to_hash methods on a Query object in an irb session:
RuntimeError: Missing process method for sexp: [:lasgn, :a]
from /usr/local/lib/ruby/gems/1.8/gems/ambition-0.1.5/lib/ambition/processor.rb:22:in `process_error'
from /usr/local/lib/ruby/gems/1.8/gems/ParseTree-2.0.1/lib/sexp_processor.rb:241:in `process'
from /usr/local/lib/ruby/gems/1.8/gems/ParseTree-2.0.1/lib/sexp_processor.rb:299:in `error_handler'
from /usr/local/lib/ruby/gems/1.8/gems/ParseTree-2.0.1/lib/sexp_processor.rb:240:in `process'
from /usr/local/lib/ruby/gems/1.8/gems/ambition-0.1.5/lib/ambition/processor.rb:26:in `process_proc'
from /usr/local/lib/ruby/gems/1.8/gems/ParseTree-2.0.1/lib/sexp_processor.rb:241:in `process'
from /usr/local/lib/ruby/gems/1.8/gems/ParseTree-2.0.1/lib/sexp_processor.rb:299:in `error_handler'
from /usr/local/lib/ruby/gems/1.8/gems/ParseTree-2.0.1/lib/sexp_processor.rb:240:in `process'
from /usr/local/lib/ruby/gems/1.8/gems/ambition-0.1.5/lib/ambition/processor.rb:44:in `to_s'
from /usr/local/lib/ruby/gems/1.8/gems/ambition-0.1.5/lib/ambition/query.rb:70:in `keyed_clauses'
from (irb):17:in `inject'
from /usr/local/lib/ruby/gems/1.8/gems/ambition-0.1.5/lib/ambition/query.rb:68:in `keyed_clauses'
from /usr/local/lib/ruby/gems/1.8/gems/ambition-0.1.5/lib/ambition/query.rb:31:in `to_hash'
from (irb):17
Any idea what could be causing this? I followed the installation instructions in your blog entry.
Thanks,
John
Comments and changes to this ticket
-
Chris Wanstrath September 1st, 2007 @ 02:20 PM
- State changed from new to open
Hey John,
Can you please post the code you typed into IRB? This error means you are doing in Ruby which Ambition does not recognize (aka I need to add code for it).
Thanks!
-
Chris Wanstrath September 2nd, 2007 @ 12:40 PM
- State changed from open to hold
-
John Topley September 2nd, 2007 @ 02:00 PM
Hi Chris,
I just ran this through the console again and would you believe that it's now working fine! :-) I've no idea what the problem was before but a reboot of my Mac seems to have fixed it.
I'll raise another ticket with steps to reproduce if it ever comes up again.
Thanks for the brilliant plug-in!
Cheers,
John
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป