1.1 broke my app

I upgraded to Rails 1.1 (ruby 1.8.2 and ruby 1.8.4 on RHEL 4 using
webrick or fastcgi) and all of a sudden I get this hitting a
controller:

wrong number of arguments (1 for 0)

RAILS_ROOT: script/…/config/…
Application Trace | Framework Trace |
Full Trace
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:379:in
send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:379:inprocess_without_filters’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/filters.rb:364:in
process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session_management.rb:117:inprocess’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/dispatcher.rb:38:in
dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/webrick_server.rb:115:inhandle_dispatch’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/webrick_server.rb:81:in
service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:inservice’
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/local/lib/ruby/1.8/webrick/server.rb:155:instart_thread’
/usr/local/lib/ruby/1.8/webrick/server.rb:144:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:144:instart_thread’
/usr/local/lib/ruby/1.8/webrick/server.rb:94:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:89:ineach’
/usr/local/lib/ruby/1.8/webrick/server.rb:89:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:79:instart’
/usr/local/lib/ruby/1.8/webrick/server.rb:79:in start' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/webrick_server.rb:67:indispatch’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/commands/servers/webrick.rb:59
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
require__' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:inrequire’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:136:in
require' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/commands/server.rb:30 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:inrequire__’
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_support/dependencies.rb:136:inrequire’
./script/server:3

Help? Thanks!

Did you update your scripts after you updated Rails?
rake rails:update

Since it looks like the error is all within rails this is all I can
think of.

-Nick

On 3/28/06, Nick S. [email protected] wrote:

Did you update your scripts after you updated Rails?
rake rails:update

Since it looks like the error is all within rails this is all I can think of.

Yes - I ran that right after update.

Are you doing any custom routing for the controller? That is where
the problem could originate.

-John


John S.
Computing Staff - Webmaster
Kavli Institute for Theoretical Physics
University of California, Santa Barbara
[email protected]
(805) 893-6307

And it gives you the same error when you try to run it with Lighttpd?
I’ve upgraded my install on OS X and FC4, both with little fan fair.

-Nick

I haven’t tried with lighttpd. I am not doing anything custom with
routing. My config/routes.rb is pretty much the stock:

ActionController::Routing::Routes.draw do |map|

The priority is based upon order of creation: first created ->

highest priority.

Sample of regular route:

map.connect ‘products/:id’, :controller => ‘catalog’, :action =>

‘view’

Keep in mind you can assign values other than :controller and

:action

Sample of named route:

map.purchase ‘products/:id/purchase’, :controller => ‘catalog’,

:action => ‘purchase’

This route can be invoked with purchase_url(:id => product.id)

You can have the root of your site routed by hooking up ‘’

– just remember to delete public/index.html.

map.connect ‘’, :controller => “index”

Allow downloading Web Service WSDL as a file with an extension

instead of a file named ‘wsdl’

map.connect ‘:controller/service.wsdl’, :action => ‘wsdl’

Install the default route as the lowest priority.

map.connect ‘:controller/:action/:id’
end

Tried lighttpd, same error:

ArgumentError in Files#index

wrong number of arguments (1 for 0)

RAILS_ROOT: /var/www/vhosts/sfile.mahope.com/public/…/config/…
Application Trace | Framework Trace | Full Trace

/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:379:in
send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:379:inprocess_without_filters’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/filters.rb:364:in
process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session_management.rb:117:inprocess’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/dispatcher.rb:38:in
dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/fcgi_handler.rb:150:inprocess_request’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/fcgi_handler.rb:54:in
process!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/fcgi_handler.rb:53:ineach_cgi’
/usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in each' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:ineach_cgi’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/fcgi_handler.rb:53:in
process!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/fcgi_handler.rb:23:inprocess!’
/var/www/vhosts/sfile.mahope.com/public/dispatch.fcgi:25

Heh, oops, hate it when that happens. And the #send method is actually
a Ruby Object method. It lets you send messages to objects instead of
invoking them directly.

-Nick

Bah - I figured it out. Right at the same time I upgraded I also added

def send
end

to one of my controllers…my bad. That overrode the
action_controller#send method