Forum: Ruby on Rails 1.1 broke my app

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B516d0160f0f1abad076b0e3b2cc26cd?d=identicon&s=25 Sean Leach (Guest)
on 2006-03-29 01:36
(Received via mailing list)
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:in
`process_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:in
`process'
/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:in
`handle_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:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:94:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:89:in `each'
/usr/local/lib/ruby/1.8/webrick/server.rb:89:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'
/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:in
`dispatch'
/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:in
`require'
/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:in
`require__'
/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:in
`require'
./script/server:3

Help?  Thanks!
Cb610750ee94ca103aef4b2dc7b1b768?d=identicon&s=25 Nick Stuart (Guest)
on 2006-03-29 02:12
(Received via mailing list)
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
B516d0160f0f1abad076b0e3b2cc26cd?d=identicon&s=25 Sean Leach (Guest)
on 2006-03-29 02:15
(Received via mailing list)
On 3/28/06, Nick Stuart <nicholas.stuart@gmail.com> 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.
Cb610750ee94ca103aef4b2dc7b1b768?d=identicon&s=25 Nick Stuart (Guest)
on 2006-03-29 02:23
(Received via mailing list)
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
858392acd1398aa6071fb1d44cc33842?d=identicon&s=25 John Smilanick (Guest)
on 2006-03-29 02:49
(Received via mailing list)
Are you doing any custom routing for the controller? That is where
the problem could originate.

-John

--
John Smilanick
Computing Staff - Webmaster
Kavli Institute for Theoretical Physics
University of California, Santa Barbara
jsmilani@kitp.ucsb.edu
(805) 893-6307
B516d0160f0f1abad076b0e3b2cc26cd?d=identicon&s=25 Sean Leach (Guest)
on 2006-03-29 05:34
(Received via mailing list)
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
B516d0160f0f1abad076b0e3b2cc26cd?d=identicon&s=25 Sean Leach (Guest)
on 2006-03-29 05:53
(Received via mailing list)
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:in
`process_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:in
`process'
/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:in
`process_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:in
`each_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:in `each_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:in
`process!'
/var/www/vhosts/sfile.mahope.com/public/dispatch.fcgi:25
B516d0160f0f1abad076b0e3b2cc26cd?d=identicon&s=25 Sean Leach (Guest)
on 2006-03-29 06:16
(Received via mailing list)
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
Cb610750ee94ca103aef4b2dc7b1b768?d=identicon&s=25 Nick Stuart (Guest)
on 2006-03-29 15:44
(Received via mailing list)
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
This topic is locked and can not be replied to.