Gem plugins and autoloading broken

Constant autoloading works fine for gems loaded using config.gem, but fails for gems loaded manually using "gem 'name'; require 'name'". The problem appears to be that ActiveSupport::Dependencies.load_paths doesn't get updated when Gem.activate adds stuff to $LOAD_PATH.

Most annoyingly, this means that gem plugins can manifest an issue where they work correctly from vendor/plugins but fail running from a gem.

See #1524 (#1524 Gem plugins, autoloading, and dev mode reloading - Ruby on Rails - rails) for more details. If this behavior is acceptable, it should be documented. Alternatively, it should be fixed (sample code in the ticket). I'd be glad to put together a patch, but how would one write a test for this?

Thanks,

--Matt Jones al2o3cr@gmail.com