hi, I am trying to connect to mysql server via active record :
require ‘rubygems’
require ‘active_record’
ActiveRecord::Base.establish_connection(
:adapter => “mysql2”,
:host => “localhost”,
:database => “xxxxxxx”,
:username => “root”,
:password => “xxxxxxx”,
:encoding => “utf-8”
)
but I am getting error message:
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:131:in rescue in const_missing': uninitialized constant ActiveRecord::ConnectionAdapters::AbstractAdapter::SchemaCreation (NameError) from /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:120:in
const_missing’…
I can connect to the server using mysql2 client directly
Am I doing something wrong? How can I correct this problem
regards,