You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ambition.rb
Hi,
some of my models are derived from classes that derive from
ActiveRecord:
class InfoDBModel < ActiveRecord::Base
# Stuff to change table name and even sometimes
# database name and force column reloads when that happens!
end
class Portal < InfoDBModel # (normally ActiveRecord::Base)
# ...
end
and when I use Ambition I get:
>> Portal.select{|z| z.user == 'acochran'}.to_s
ArgumentError: wrong number of arguments (2 for 1)
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.1/lib/ambition/
processors/select.rb:27:in `=='
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.1/lib/ambition/
processors/select.rb:27:in `send'
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.1/lib/ambition/
processors/select.rb:27:in `process_call'
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.1/lib/ambition/
processors/base.rb:74:in `send'
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.1/lib/ambition/
processors/base.rb:74:in `process'
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.1/lib/ambition/
processors/base.rb:9:in `process_proc'
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.1/lib/ambition/
processors/base.rb:74:in `send'
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.1/lib/ambition/
processors/base.rb:74:in `process'
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.1/lib/ambition/
processors/base.rb:85:in `to_s'
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.1/lib/ambition/
context.rb:33:in `<<'
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.1/lib/ambition/
api.rb:9:in `select'
from (irb):1
Whereas it all works fine if I don't derive from InfoDBModel.
Any ideas on how to overcome this?
Thanks,
Allan
Haruki Zaemon
unread,
Feb 20, 2008, 6:48:21 AM2/20/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ambition.rb
I found I was getting this because I had the wrong version of a
dependency. I think in my case it was ParseTree. I'm using
ParseTree-2.1.1, ruby2ruby-1.1.7, RubyInline-3.6.6 and rubigen-1.1.1