fireruby problem while connecting to database

F

Franz Bettag

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top