Issues installing ambitious-activerecord

4 views
Skip to first unread message

thoraxe

unread,
May 14, 2008, 8:54:21 PM5/14/08
to ambition.rb
OK... I seem to be a little confused here, but that's not new for me.
After trying to install ambition, I see that the version from gem
install is only 0.5.2. ambitious-activerecord requires 0.5.3, so I
saw another post here that said someone simply cloned it directly into
their vendor/plugins folder. Sounds good:

thoraxe@vmdora ~/railsapps/equine $ gem list
*** LOCAL GEMS ***
actionmailer (2.0.2)
actionpack (2.0.2)
activerecord (2.0.2)
activeresource (2.0.2)
activesupport (2.0.2)
ezcrypto (0.7)
fastercsv (1.2.3)
hoe (1.5.1)
mime-types (1.15)
mini_magick (1.2.3)
mislav-will_paginate (2.3.1)
mysql (2.7)
ParseTree (2.1.1, 2.0.1)
rails (2.0.2)
rake (0.8.1)
RedCloth (3.0.4)
rubigen (1.1.1)
ruby2ruby (1.1.8, 1.1.7)
rubyforge (0.4.5)
rubygems-update (1.0.1)
RubyInline (3.6.7)
scaffold_form_generator (1.1.0)
sources (0.0.1)

In vendor/plugins I've got ambition and ambitious_activerecord. Let's
boot up some console:
thoraxe@vmdora ~/railsapps/equine $ script/console
Loading development environment (Rails 2.0.2)
>> require 'rubygems'
=> []
>> require 'ambition/adapters/active_record'
=> []
>> Barn.first
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.const_get
from /home/thoraxe/railsapps/equine/vendor/plugins/ambition/
lib/ambition/processors/base.rb:102:in `translator'
from /home/thoraxe/railsapps/equine/vendor/plugins/ambition/
lib/ambition/processors/base.rb:94:in `translator'
from /home/thoraxe/railsapps/equine/vendor/plugins/ambition/
lib/ambition/processors/slice.rb:11:in `to_s'
from /home/thoraxe/railsapps/equine/vendor/plugins/ambition/
lib/ambition/context.rb:45:in `<<'
from /home/thoraxe/railsapps/equine/vendor/plugins/ambition/
lib/ambition/api.rb:33:in `slice'
from /home/thoraxe/railsapps/equine/vendor/plugins/ambition/
lib/ambition/api.rb:47:in `first'
from (irb):3

Not looking so good for me. Someone on #ambition on freenode
suggested trying to install the gem directly:
thoraxe@vmdora ~/railsapps/equine/vendor/plugins/ambition $ rake
install_gem
(in /home/thoraxe/railsapps/equine/vendor/plugins/ambition)
Not doing any of the Echoe gemmy stuff, because you don't have the
specified gem versions
rake aborted!
Don't know how to build task 'manifest'

(See full trace by running task with --trace)
(in /home/thoraxe/railsapps/equine/vendor/plugins/ambition)
Not doing any of the Echoe gemmy stuff, because you don't have the
specified gem versions

Also not so good =(

Any suggestions?

thoraxe

unread,
May 14, 2008, 9:10:19 PM5/14/08
to ambition.rb
Well, installing echoe allowed me to rake install_gem for both
ambition and ambitious-activerecord. I'm still getting the same error
when actually trying to use ambitious-activerecord:

thoraxe@vmdora ~/railsapps/equine $ script/console
Loading development environment (Rails 2.0.2)
>> require 'rubygems'
=> []
>> require 'ambition/adapters/active_record'
=> []
>> Barn.first
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.const_get
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.4/lib/ambition/
processors/base.rb:102:in `translator'
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.4/lib/ambition/
processors/base.rb:94:in `translator'
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.4/lib/ambition/
processors/slice.rb:11:in `to_s'
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.4/lib/ambition/
context.rb:45:in `<<'
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.4/lib/ambition/
api.rb:33:in `slice'
from /usr/lib/ruby/gems/1.8/gems/ambition-0.5.4/lib/ambition/

thoraxe

unread,
May 14, 2008, 9:36:38 PM5/14/08
to ambition.rb
To add an interesting twist...

Barn < Contact.
>> Barn.first
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.const_get

>> Contact.first
=> #<Barn id: 18, type: "Barn", name:

So for some reason ambitious-activerecord does not like running on
inherited classes... which seems REALLY strange.

Chris Wanstrath

unread,
May 14, 2008, 11:08:23 PM5/14/08
to ambit...@googlegroups.com

This is a known issue, someone has brought it up before. The AR
adapter doesn't seem to like STI.

- Chris

thoraxe

unread,
May 15, 2008, 8:13:08 AM5/15/08
to ambition.rb
Is there a fix planned for the future? Anything I can do to help?
Reply all
Reply to author
Forward
0 new messages