> Just upgraded from 8.04 to 8.10, which bumped my Ruby version to
> 1.8.7, and my Rails app (frozen to 2.2.2) gets a strange error on
> startup. I can easily reproduce just by running script/about:
> $ script/about
> /vendor/rails/actionpack/lib/action_view/template_handler.rb:11:in
> `initialize': wrong number of arguments (0 for 1) (ArgumentError)
> Anyone else having trouble with Rails on Ubuntu 8.10 and/or Rails
> 1.8.7?
> Jeff
This has something to do with all the eager loading of the views.
After removing a few views trying to narrow down the problem, script/
about now gives this:
../activesupport/lib/active_support/dependencies.rb:275:in
`load_missing_constant': uninitialized constant Rails::Info
(NameError)
Perhaps another clue, maybe this will ring a bell for someone. I'm
now slowly removing all of my views, running script/about after I
remove each one, and now I got this error:
$ script/about
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require': no such file to load -- rails/info
(MissingSourceFile)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from /home/jcohen/sites/pw/releases/20081201224923/vendor/rails/
activesupport/lib/active_support/dependencies.rb:155:in `require'
from /home/jcohen/sites/pw/releases/20081201224923/vendor/rails/
railties/lib/commands/about.rb:2
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from script/about:3
I can start script/console, and checking $LOAD_PATH reveals a few
differences from what's on my Mac OS X. Here's what I get on my Mac,
for example:
$LOAD_PATH.select { |p| p =~ /railties/ }
=> ["/Users/jcohen/dev/pw/config/../vendor/rails/railties/lib/../
builtin/rails_info/", "/Users/jcohen/dev/pw/vendor/rails/railties", "/
Users/jcohen/dev/pw/vendor/rails/railties/lib", "/Users/jcohen/dev/pw/
config/../vendor/rails/railties/lib"]
Notice that first path to builtin/rails_info. Doing the same on my
Ubuntu/Ruby 1.8.7 box shows this:
$LOAD_PATH.select { |p| p =~ /railties/ }
=> ["/home/jcohen/sites/pw/releases/20081201224923/vendor/rails/
railties", "/home/jcohen/sites/pw/releases/20081201224923/vendor/rails/
railties/lib", "/home/jcohen/sites/pw/releases/20081201224923/
config/../vendor/rails/railties/lib"]
In other words, the path to railsties/lib../builtin/rails_info is not
there! And if the load path is messed up, then I bet other things are
also.
I've tried unfreezing rails and using 2.2.2 gems, with the same result
- so it's not the result of a borked version of vendor/rails.
Any ideas?
Thanks
Jeff