|
|
|
[
Permlink
| « Hide
]
Charles Oliver Nutter - 19/Oct/07 09:32 PM
Can you try this out again on trunk and 1.0 branch and see if it's still a problem? There have been a few autoload-related fixes since you reported this.
This does appear to still be failing in JRuby 1.1.1. Assigning to Tom to take a look before 1.1.2, since it might be easy (what with him being the autoload king and all).
I think we're going to need to punt this and do some homework (and hopefully get help). My naive attempt to reproduce the problem seems to work ok, so there's something more going on here.
a.rb module Foo
module Bar
autoload :Baz, "b.rb"
class Baz
def y
'wah'
end
end
end
end
a = Foo::Bar::Baz.new
a.x
a.y
b.rb module Foo
module Bar
class Baz
def x
'yay'
end
end
end
end
Without a better test case or followup from the reporter, this is in danger of getting closed as "incomplete". Please provide a test case for the issue or help us diagnose it further please
If the test case I posted no longer reproduces the issue then I'd say it would be fine to close the issue as works for me or something.
Unfortunately, I'm not currently doing any Ruby development so I don't have a sandbox handy to try to reproduce it again. Sorry about that, I was able to reproduce it following your original instructions. I'm not going to be able to look at this, but maybe Tom will...
I tried this and I do not think I have did enough to reproduce this....
I installed Rails 2.0.2 (Rails 2.1 does not seem compatible with AS). I then installed AS: ./script/plugin install http://activescaffold.googlecode.com/svn/tags/active_scaffold I unzipped into vendor/plugins the zip provided..I get the following error in both MRI and JRuby trunk (and it appears that autoload seems to be finding plugin1): enebo:01:27 ~/workspace/jruby_trunk/hoh 953% /usr/bin/ruby script/server => Booting Mongrel (use 'script/server webrick' to force WEBrick) => Rails application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... FirstPlugin module loaded Exiting /Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:77:in `evaluate_init_rb': undefined method `configuration' for "second.rb":String (NoMethodError) from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' from /Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:75:in `evaluate_init_rb' from /Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:39:in `load' from /Users/enebo/workspace/jruby_trunk/hoh/vendor/plugins/second_plugin/init.rb:1:in `evaluate_init_rb' from /Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:79:in `evaluate_init_rb' from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' from /Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:75:in `evaluate_init_rb' from /Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:39:in `load' ... 34 levels... from /Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39 from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require' from script/server:3 |
|||||||||||||||||||||||||||||||||||||||||||||||||||