I have been having a strange problem with including active record
outside of rails when it works ok in rails 3.0.3.
When I do ''gem list'', I get this:
actionmailer (3.0.9, 3.0.3)
actionpack (3.0.9, 3.0.3)
activemodel (3.0.9, 3.0.3)
activerecord (3.0.9, 3.0.3)
activeresource (3.0.9, 3.0.3)
activesupport (3.0.9, 3.0.3)
So then I tried the code below, but I get this error:
db-test2.rb:6:in `<main>'': uninitialized constant
Object::ActiveRecord
(NameErro
r)
require ''rubygems''
gem ''activerecord'', ''= 3.0.3''
ActiveRecord::Base.establish_connection(
:adapter => "mysql",
:host => "localhost",
:pool => 5,
:encoding => ''utf8'',
:reconnect => false,
:database => "univ_parse_dev",
:user => "PZZ",
:password => "PZZ"
)
class MsdsAttr < ActiveRecord::Base
end
attr = MsdsAttr.find(:first)
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.