Istniejaca db

Jak moge podlaczyc sie do istniejecej bazy

Skonfigurowalem polaczenie do bazy w config/databases.yml
Zrobilem rake db:schema:dump ( uzyskalem poprawny dump struktury)
Stworzylem model recznie odpowiadajacy tabeli

Jednak przy uruchomieniu z konsoli
Model.all wywala mi blad
Mozna prosic o rady co moze byc powodem

Hej,

jaki błąd?

http://rtfm.killfile.pl/

Mper.all
(136.7ms) SET SCHEMA mcs_dev
ArgumentError: wrong number of arguments (2 for 1)
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in to_sql' from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:18:inselect_all’
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:63:in select_all' from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.3/lib/active_record/querying.rb:38:infind_by_sql’
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.3/lib/active_record/explain.rb:40:in logging_query_plan' from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.3/lib/active_record/querying.rb:37:infind_by_sql’
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.3/lib/active_record/relation.rb:171:in exec_queries' from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.3/lib/active_record/relation.rb:160:into_a’
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.3/lib/active_record/explain.rb:33:in logging_query_plan' from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.3/lib/active_record/relation.rb:159:into_a’
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.3/lib/active_record/relation/finder_methods.rb:159:in all' from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.3/lib/active_record/querying.rb:5:insend
from /usr/lib/ruby/gems/1.8/gems/activerecord-3.2.3/lib/active_record/querying.rb:5:in `all’
from (irb):1

Pokaż swój database.yml, i przeczytaj tego linka, co Ci podesłałem :slight_smile:

Witam
Przeylam fragment database.yml

development:
adapter: ibm_db
username: db2inst1
password: haslo
database: mcs_dev
schema: mcs_dev
host: localhost
port: 50000
#account: my_account
#app_user: my_app_user
#application: my_application
#workstation: my_workstation
#security: SSL
#timeout: 10
#authentication: SERVER
#parameterized: false

Moglbys sprobowac czy to dziala dla najprostszego modelu? Wygeneruj np. model z 1 kolumna i sprawdz czy bedziesz mial ten sam blad.

Bardzo mozliwe, ze adapter do DB2 cos psuje, choc z drugiej strony nie widac go w backtrace, ktory podales.

To mnie wlasnie zastanawia
ale z drugiej strony po wydaniu rake db:schema:dump
pobral mi caly schemat bazy do pliku schema.rb
nie mam pojecia o co moze chodzic.