Quoth Frederick Cheung ([email protected]):
>
>
> On 3 Feb 2009, at 14:05, Kenneth Dunlap wrote:
> >
> >
> > class Scode < ActiveRecord::Base
> > Scode.establish_connection(self::Conf)
> > end
> >
> > irb(main):001:0> require 'scode'
> > => true
> > irb(main):002:0> Scode
> > => Scode(Table doesn't exist)
> > irb(main):003:0> Scode.table_name
> > => "\e[4mScode\e[0ms"
> >
> > I know I can set the table name manually, but if this simple mechanism
> > is broken, how much other stuff is broken in this version?
> >
> Something to do with the connection pooling changes ?
>
I think it may have something to do with changes to ActiveSupport.
I notice that on my production system (v2.0.2), when I load an
ActiveRecord class, the Inflector class is available:
irb(main):001:0> require 'scode'
=> true
irb(main):002:0> Inflector
=> Inflector
On the test system (v2.2.2), it is not:
irb(main):002:0> require 'scode'
=> true
irb(main):003:0> Inflector
NameError: uninitialized constant Inflector
from
/pkg/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:445:in
`load_missing_constant'
from
/pkg/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:77:in
`const_missing'
from
/pkg/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:89:in
`const_missing'
from (irb):3
irb(main):004:0> ActiveSupport::Inflector
=> ActiveSupport::Inflector
Ken
--
I use the words you taught me. If they don't mean anything any more,
teach me others. Or let me be silent.
Samuel Beckett (Clov, Endgame)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---