Help: Exception caught

41 views
Skip to first unread message

Dark Ambient

unread,
Sep 12, 2006, 11:47:23 AM9/12/06
to rubyonrails-talk
I'm running into an error and not sure where to even look. Not sure
if it's an environment or routes ?

ArgumentError

wrong number of arguments (2 for 1)

RAILS_ROOT: ./script/../config/..

Then the full trace:

#{RAILS_ROOT}/vendor/rails/railties/lib/dispatcher.rb:104:in `require_or_load'
#{RAILS_ROOT}/vendor/rails/railties/lib/dispatcher.rb:104:in
`prepare_application'
#{RAILS_ROOT}/vendor/rails/railties/lib/dispatcher.rb:39:in `dispatch'
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel/rails.rb:73:in
`process'
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:551:in
`process_client'
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:550:in
`process_client'
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:636:in
`run'
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:636:in
`run'
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:625:in
`run'
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:956:in
`run'
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:955:in
`run'
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/bin/mongrel_rails:127:in
`run'
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel/command.rb:199:in
`run'
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/bin/mongrel_rails:235
#{RAILS_ROOT}/vendor/rails/activesupport/lib/active_support/dependencies.rb:357:in
`load'
#{RAILS_ROOT}/vendor/rails/railties/lib/commands/servers/mongrel.rb:48
C:/INSTAN~1/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
#{RAILS_ROOT}/vendor/rails/activesupport/lib/active_support/dependencies.rb:364:in
`require'
#{RAILS_ROOT}/vendor/rails/railties/lib/commands/server.rb:39
script/server:3

Bill Walton

unread,
Sep 12, 2006, 12:10:10 PM9/12/06
to rubyonra...@googlegroups.com
Hi Stuart,

Dark Ambient wrote:

> I'm running into an error and not sure where to even look.

> ArgumentError


>
> wrong number of arguments (2 for 1)

You haven't given us much to go on. When does this happen? What
application code is being executed?

Best regards,
Bill

Dark Ambient

unread,
Sep 12, 2006, 1:39:13 PM9/12/06
to rubyonra...@googlegroups.com
If I had more to go on I'd gladly share it. The app is development ,
basically the same trace I posted earlier from the exception is what I
see in the log.
It doesn't seem to matter though what controller / action I point it
at, same thing.

Stuart

Dark Ambient

unread,
Sep 12, 2006, 1:54:51 PM9/12/06
to rubyonra...@googlegroups.com
I should add that it doesn't seem to matter what I put in the url in
terms of controller , it just spits out the same message. Even if I
type in a controller that doesn't exist. The standard rails index
page does open if I just do a localhost:3000

Stuart

Dark Ambient

unread,
Sep 12, 2006, 2:00:55 PM9/12/06
to rubyonra...@googlegroups.com
Sorry , for all the posts, but I am running it in the RadRails browser
and getting a different error:

NoMethodError
undefined method `first' for :users:Symbol

This error occured while loading the following files:
./script/../config/../config/routes.rb

C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:405:in
`initialize_components'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:339:in
`initialize'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:615:in
`connect'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:644:in
`named_route'
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:650:in
`method_missing'
#{RAILS_ROOT}/config/routes.rb:7
#{RAILS_ROOT}/config/routes.rb:1
-e:4

I keep looking at routes and nothing is standing out.

Dark Ambient

unread,
Sep 12, 2006, 2:20:25 PM9/12/06
to rubyonra...@googlegroups.com

Stef Telford

unread,
Sep 12, 2006, 2:23:27 PM9/12/06
to rubyonra...@googlegroups.com

Hello again Stuart,
Well, to quote babylon 5, 'you know the solution, the question is do
you KNOW that you know the solution'. You must have changed something in
your development that has caused this to change, and I am willing to bet
it's in your routes that you setup. I would back them out, along with
any other changes, to the last point that you know works. This is where
SVN or even 'tarballs' come in incredibly handy :)

jst my 2c :)
Regards
Stef

Bill Walton

unread,
Sep 12, 2006, 2:38:16 PM9/12/06
to rubyonra...@googlegroups.com
Hi Stuart,

Dark Ambient wrote:
>
> Sorry , for all the posts, but I am running it in the
> RadRails browser and getting a different error:

Some thoughts...

Have you verified that the problem is application-specific? Are you able to
run any of your other apps? Are you using Apache? If so, have you checked
to verify that you get the same error under WEBrick?

hth,
Bill

Dark Ambient

unread,
Sep 12, 2006, 5:18:28 PM9/12/06
to rubyonra...@googlegroups.com
Yes, I made some changes - installed Restful Authentication , which
required I do a up to Edge Rails. So possibly the problem is with
edge .

Stuart

On 9/12/06, Bill Walton <bill....@charter.net> wrote:
>

Dark Ambient

unread,
Sep 12, 2006, 5:35:42 PM9/12/06
to rubyonra...@googlegroups.com
It was defintely edgerails that clashed with something. I removed it
and have my app back.

Stuart

On 9/12/06, Dark Ambient <samb...@gmail.com> wrote:

Bill Walton

unread,
Sep 12, 2006, 5:42:58 PM9/12/06
to rubyonra...@googlegroups.com
Dark Ambient

> Yes, I made some changes - installed Restful
> Authentication , which required I do a up to
> Edge Rails. So possibly the problem is with
> edge .

You might want to download InstantRails and test your app on it. That could
help you figure out where to look next.

Best regards,
Bill

Dark Ambient

unread,
Sep 12, 2006, 5:54:28 PM9/12/06
to rubyonra...@googlegroups.com
Well now that I've removed edgerails it's working again. I believe
that what I read on the Railesweenie site is what I'm experiencing.
Although I did not test, there apparently is some conflict between
Engines and Edge. I don't want to remove Engines at this point even
to test. However I am using InstantRails which is what I have
installed to develop with anyway.

Thank you

Stuart

On 9/12/06, Bill Walton <bill....@charter.net> wrote:
>

Zed Shaw

unread,
Sep 12, 2006, 8:04:53 PM9/12/06
to rubyonra...@googlegroups.com
On Tue, 2006-09-12 at 09:47 -0600, Dark Ambient wrote:
> I'm running into an error and not sure where to even look. Not sure
> if it's an environment or routes ?
>
> ArgumentError
>
> wrong number of arguments (2 for 1)
>
> RAILS_ROOT: ./script/../config/..
>
> Then the full trace:
>
> #{RAILS_ROOT}/vendor/rails/railties/lib/dispatcher.rb:104:in `require_or_load'
> #{RAILS_ROOT}/vendor/rails/railties/lib/dispatcher.rb:104:in
> `prepare_application'

Uh, no idea why that'd happen. Does your app work under Webrick? Did
you modify your intall somehow?


--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.

Bill Walton

unread,
Sep 12, 2006, 8:55:15 PM9/12/06
to rubyonra...@googlegroups.com
Dark Ambient wrote:

> However I am using InstantRails which is what I have
> installed to develop with anyway.

Just for future communications....

You might want to rethink your statement about "I am using InstantRails."
You might have started with InstantRails, but that ain't where you are now
WRT anybody trying to understand your environment so they can help you
through your problems.

Just food for thought.

Bill

Dark Ambient

unread,
Sep 12, 2006, 8:55:34 PM9/12/06
to rubyonra...@googlegroups.com
I'm not sure if my replies are coming through here. I discovered the
problem - it's a conflict with edge and engines.
Thank you though.
Stuart

Dark Ambient

unread,
Sep 12, 2006, 9:06:38 PM9/12/06
to rubyonra...@googlegroups.com
I'm not following you Bill. AFAIK Instant Rails is an installation of
ROR and includes ruby, gems, etc. If I'm using another version of
rails in an app, how does that change my installation ?

Stuart

On 9/12/06, Bill Walton <bill....@charter.net> wrote:
>

Bill Walton

unread,
Sep 12, 2006, 10:28:09 PM9/12/06
to rubyonra...@googlegroups.com
Hi Stuart,

Dark Ambient wrote:

> I'm not following you Bill. AFAIK Instant Rails
> is an installation of ROR and includes ruby, gems,
> etc. If I'm using another version of rails in an app,
> how does that change my installation ?

When you post a request for help here you're hoping, best case, that someone
will try to reproduce the problem you're having, be able to do so, and then
help you figure out what's going wrong.

If, for example, you posted a problem I found interesting, posted your code,
and told me you were using InstantRails, I might be inclined to download IR
and see if I could help. But you're not working on the code base I'd be
trying to reproduce your problem on. And when I found out that you'd wasted
my time by not bothering to give me the information needed to actually help
you... well, I might not be inclined to expend as much energy the next time
around.

hth,
Bill

Dark Ambient

unread,
Sep 13, 2006, 4:50:05 AM9/13/06
to rubyonra...@googlegroups.com, bill....@charter.net
Bill,
Understood and apologies. I appreciate you taking the time to respond
multiple times. I will be more cautious next time posting.

Stuart

On 9/12/06, Bill Walton <bill....@charter.net> wrote:
>

Bill Walton

unread,
Sep 13, 2006, 8:06:50 AM9/13/06
to rubyonra...@googlegroups.com
Hi Stuart,

No problem. Thanks for getting it. I hope my comments didn't seem harsh as
that wasn't my intention.

Best regards,
Bill

Dark Ambient

unread,
Sep 13, 2006, 8:54:13 AM9/13/06
to rubyonra...@googlegroups.com
No, your comments were helpful, not harsh.
Stuart

On 9/13/06, Bill Walton <bill....@charter.net> wrote:
>
> Hi Stuart,
>

Reply all
Reply to author
Forward
0 new messages