Problems with " wrong number of arguments (2 for 1) (ArgumentError) " and rails server

Hi, I'm trying initialize my local rails server but I haven't can, because when I write "rails server", show me this message:

=> Booting WEBrick => Rails 3.0.3 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server Exiting /home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/ activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require': wrong number of arguments (2 for 1) (ArgumentError)   from /home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/ activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'   from /home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/ activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'   from /home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/ activesupport-3.0.3/lib/active_support/dependencies.rb:596:in `new_constants_in'   from /home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/ activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'   from /home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/ activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'   from /home/distriker/Documentos/public_html/auth/config.ru:6   from /home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/ rack-1.2.3/lib/rack/builder.rb:46:in `instance_eval'   from /home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/ rack-1.2.3/lib/rack/builder.rb:46:in `initialize'   from /home/distriker/Documentos/public_html/auth/config.ru:1:in `new'   from /home/distriker/Documentos/public_html/auth/config.ru:1

I have searched in Google for a solution, but, I didn't find a clearly solution.

Rewards, Iván

I think you turn more than one server is on…

If I try run a server in other port, it show me the same message. Before, if to me fail a port, I could use other, now no.

Rewards, Iván

1st, what do you use to run the server? netbeans or in ternimal

you should turn off all the server that you run. and run “rails server”’ again … if you have 2 server on check it maybe one of them is http://0.0.0.0:3000 and other is http://0.0.0.0:3001

Joanne

I run the server with the terminal and I know that if I have two servers the direction is or 3001, but, any of this direction work, becauseI I think that any server exist. I have shut down my computer because I must go to other site, and when I returned I have switched on again, and my server should work, but no. Have you other idea? Thanks ^^. Rewards, Iván

Hi, my problem has been solved. Thanks Yen for your help. I explain what was my error. In my config.ru file (in the root project folder) I have two params in the call of rake, this caused the problem.

Regards, Iván

Hi,

I can see on your error list: "/mysql2/ruby/1.8/gems/ activesupport-3.0.3/lib/active_support/ dependencies.rb:239:in "

means you try to use Rails3 with old Ruby version 1.8 probably. Do you use RVM? You might want to see outputs of these: $ ruby -v $ gem -v $ gem list

Running Ruby 1.9 with Rails3 is essential and it will have conflicts with your other gems if you have version differences.

Iván, ha további kérdésed van, nyugodtan írj!:slight_smile: cheers, Zoli

Not true, ruby 1.8.7 works fine with rails 3.0.x. I am using it as I type.

Colin

... Running Ruby 1.9 with Rails3 is essential and it will have conflicts with your other gems if you have version differences.

Not true, ruby 1.8.7 works fine with rails 3.0.x. I am using it as I type.

Absolutely. I have a number of Rails 3.0.x apps on 1.8.7.

However, I would suggest 1.9.2 for 3.1-pre. I believe 1.8.7 support won't be phase out until 4.x, but at RailsConf most people were strongly suggesting 1.9.2 for 3.1 . . .

Best Wishes, Peter

I have stuck with 1.8.7 because of very slow rails startup on ubuntu with 1.9.2. Hopefully that will be improved by the time I need to move up.

Colin

Hi,

Yes I agree, We can use Ruby 1.8.7 for rails 3.0.x application, its working for me in production server.