error during running demo.rb file of Service Merchant.

Hello all,

I'm trying to use service merchant plugin in my application.

i installed plugin in vendor/plugins dir.

I am using mysql database. so i changed database configuration in two
files of service_merchant

1)"vendor\plugins\service_merchant\tracker\test\connection.rb" and
  "vendor\plugins\service_merchant\subscription_management\test" as
following

   require 'rubygems'
gem 'activerecord'
require 'activerecord'
#gem 'sqlite3-ruby'

ActiveRecord::Base.establish_connection(
    :adapter => "mysql",
    :database => "sarasave_service_marchant",
    :username => "root",
    :password => "myroot",
    :host => "localhost"
)

now i created database successfully. using

rake service_merchant:create_all_tables

but when i run "demo.rb" file then i got following error of
ConnectionNotEstablished -----

F:\sarasaves_service_merchant\sarasaves\vendor\plugins\service_merchant>ruby
dem
o.rb --trace
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_a
dapters/abstract/connection_pool.rb:326:in `retrieve_connection':
ActiveRecord::
ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished)
        from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record
/connection_adapters/abstract/connection_specification.rb:123:in
`retrieve_conne
ction'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record
/connection_adapters/abstract/connection_specification.rb:115:in
`connection'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record
/base.rb:1276:in `columns'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record
/base.rb:3008:in `attributes_from_column_definition_without_lock'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record
/locking/optimistic.rb:66:in `attributes_from_column_definition'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record
/base.rb:2435:in `initialize'
        from
./subscription_management/lib/subscription_management.rb:82:in `new
'
        from
./subscription_management/lib/subscription_management.rb:82:in `sub
scribe'
        from demo.rb:55

Looks like you configure connection in the wrong place. When
installed as plugin, service_merchant uses connection defined in
`config/database.yml` file of your Rails app.

What you have changed is a special connection that's only used in
service_merchant internal unit tests.