May be somebody has a clue, why I get these errors below, while trying
to migrate.
Any help is very appreciated!
Greetinx
Rafael
I was trying to experiment a litte bit with redMine (www.redmine.org).
But I can only install it locally. On a system with already a
mongrel_cluster running, I get strange errors, already while trying to
start the migration rake db:migrate RAILS_ENV="production"
Thank you for your reply.
Sorry but redmine has a hellot of migrations.
I also think, this come's from another part because, I tried it also
in the console to type in some commands... same error.
I guess something with the database connection is wrong, is there a
way to test the database connection?
thnx
# script/console production
Loading production environment.
User.find_all
ArgumentError: wrong number of arguments (1 for 0)
from /usr/lib/ruby/site_ruby/1.8/active_record/vendor/mysql.rb:
566:in `initialize'
from /usr/lib/ruby/site_ruby/1.8/active_record/vendor/mysql.rb:
566:in `new'
from /usr/lib/ruby/site_ruby/1.8/active_record/vendor/mysql.rb:
566:in `scramble41'
from /usr/lib/ruby/site_ruby/1.8/active_record/vendor/mysql.rb:
144:in `real_connect'
from /usr/lib/ruby/site_ruby/1.8/active_record/
connection_adapters/mysql_adapter.rb:389:in `connect'
from /usr/lib/ruby/site_ruby/1.8/active_record/
connection_adapters/mysql_adapter.rb:152:in `initialize'
from /usr/lib/ruby/site_ruby/1.8/active_record/
connection_adapters/mysql_adapter.rb:82:in `new'
from /usr/lib/ruby/site_ruby/1.8/active_record/
connection_adapters/mysql_adapter.rb:82:in `mysql_connection'
from /usr/lib/ruby/site_ruby/1.8/active_record/
connection_adapters/abstract/connection_specification.rb:262:in `send'
from /usr/lib/ruby/site_ruby/1.8/active_record/
connection_adapters/abstract/connection_specification.rb:262:in
`connection_without_query_cache='
from /usr/lib/ruby/site_ruby/1.8/active_record/query_cache.rb:
54:in `connection='
from /usr/lib/ruby/site_ruby/1.8/active_record/
connection_adapters/abstract/connection_specification.rb:230:in
`retrieve_connection'
from /usr/lib/ruby/site_ruby/1.8/active_record/
connection_adapters/abstract/connection_specification.rb:78:in
`connection'
from /usr/lib/ruby/site_ruby/1.8/active_record/base.rb:1140:in
`add_limit!'
from /usr/lib/ruby/site_ruby/1.8/active_record/base.rb:1102:in
`construct_finder_sql'
from /usr/lib/ruby/site_ruby/1.8/active_record/base.rb:997:in
`find_every'
from /usr/lib/ruby/site_ruby/1.8/active_record/base.rb:418:in
`find'
from /usr/lib/ruby/site_ruby/1.8/active_record/
deprecated_finders.rb:39:in `find_all_without_deprecation'
from /usr/lib/ruby/site_ruby/1.8/active_support/deprecation.rb:
93:in `find_all'
from (irb):1>>
Thank you for your reply.
Sorry but redmine has a hellot of migrations.
I also think, this come's from another part because, I tried it also
in the console to type in some commands... same error.
I guess something with the database connection is wrong, is there a
way to test the database connection?
I believe the issue stems from incompatible versions of Ruby libraries. Are you using the same versions of Rails, gems and mysql adapter on both machines?
With the help of a redmine developer, I found the final solution.
Seems, that mysql adapter was not or false installed.
To fix this I did (re)install the mysql gem