Open weyus opened 13 years ago
If I replace the require_dependency 'application' with require_dependency 'application_controller' in the vhost_extension.rb file, I then see:
$ rake radiant:extensions:vhost:migrate --trace rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+) * Invoke radiant:extensions:vhost:migrate (first_time) * Invoke environment (first_time) \ Execute environment Could not load extension from file: vhost_extension.
prepare_application' for class
ActionController::Dispatcher'>\ Execute radiant:extensions:vhost:migrate
rake aborted!
undefined method prepare_application' for class
ActionController::Dispatcher'
/Users/weyus/Documents/workspace/radiant_1_0_0_rc2/vendor/extensions/vhost/lib/scoped_access_init.rb:37:in `alias_method'
which is a direct result of the ActionController.const_defined?(:Dispatcher) call returning false.
Hope this is useful.
If you try to migrate this extension on Radiant 1.0.0 RC2, you get:
$ rake radiant:extensions:vhost:migrate --trace rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+) * Invoke radiant:extensions:vhost:migrate (first_time) * Invoke environment (first_time) \ Execute environment Could not load extension from file: vhost_extension.
<MissingSourceFile: no such file to load -- application.rb>
\ Execute radiant:extensions:vhost:migrate rake aborted! no such file to load -- application.rb
If you remove the application dependency, the scoped_access init.rb ends up failing at line 37 as though the if statement
if ActionController.const_defined?(:Dispatcher)
returns false, which is strange since it returns should return true as far as I can tell.
I gave up trying after several require_dependency mods. It appears to be something to do with load order.