jgarber / radiant-vhost-extension

Like the multi_site extension but each domain appears to operate independently with its own scoped pages, snippets, and layouts. Host multiple, independent web sites. Right now only works with Radiant 0.6.9
8 stars 6 forks source link

Install fails on Radiant 1.0.0 RC2 #2

Open weyus opened 13 years ago

weyus commented 13 years ago

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.

weyus commented 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.

<NameError: undefined method prepare_application' for classActionController::Dispatcher'>

\ Execute radiant:extensions:vhost:migrate rake aborted! undefined method prepare_application' for classActionController::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.