Forum: Ruby fireruby problem while connecting to database

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Franz Bettag (Guest)
on 2006-03-10 05:14
(Received via mailing list)
Hi there,

i got a small problem when connecting to my firebird database:

config/database.yml:
      29 myfirebird:
      30   adapter: firebird
      31   database: /var/firebird/database.gdb
      32   username: SYSDBA
      33   password: masterkey
      34   host: my.server


app/models/customer.rb:
       1 class Customer < ActiveRecord::Base
       2     Customer.establish_connection 'myfirebird'
       3 #    def self.table_name() 'kunden' end
       4 end


strangly my controller gives me:
wrong number of arguments (1 for 0)
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/firebird_adapter.rb:15:in
`initialize'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/firebird_adapter.rb:15:in
`new_from_params'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/firebird_adapter.rb:35:in
`firebird_connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in
`connection_without_query_cache='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/query_cache.rb:54:in
`connection='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:106:in
`retrieve_connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:20:in
`connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:931:in
`add_limit!'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:924:in
`construct_finder_sql'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:395:in
`find'
../script/../config/../app/controllers/dns_domain_controller.rb:15:in
`list'
../script/../config/../app/controllers/dns_domain_controller.rb:4:in
`index'

Dont' wonder because it is dns_domain_controller.rb, in there i do a
@customers = Customer.find :all
so it is initated from there :)

any solutions? :) thanks!

--


Mit freundlichen
Grüßen
Franz Bettag

____________________________
QS Housing
Franz Bettag
Ludwigstr. 45-47
90402 Nürnberg
http://www.qs-housing.net

Tel: +49 1805 737376 664
Fax: +49 1805 737376 665
This topic is locked and can not be replied to.