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
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:
I got these same errors using ruby 1.8.6 with any version of rails
before 1.2.3
see:
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:
I performed a gem update. It didn’t fixed it. Another curiosity is that
I have another rails project in the same development environment and it
works fine. I couldn’t figure it out but I fix -or skip- my problem by
creating a new rails project and then copying all my code to it.
Hi. I’m having the same problem. Every time a DB request is made, I get
“wrong number of arguments (1 for 0)”. My development environment is my
desktop PC and a remote database server. The production is a remote
application server and the same database server. The problem only
happens in development environment (lucky me).
The rails version in both environments is the same (1.1.6) and the
database is the same (since it’s the same DB server).
Anyone has a further clue about it? I could really use some help. I’m
really having problems because of this. Thanks.
Fernando
beYou media { Rafael Schär } wrote:
Hi Jacob, Hi everybody
This was a good clue!
Thank you very much.
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