Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install fails on Radiant 1.0.0 RC2 #2

Open
weyus opened this issue Jun 1, 2011 · 1 comment
Open

Install fails on Radiant 1.0.0 RC2 #2

weyus opened this issue Jun 1, 2011 · 1 comment

Comments

@weyus
Copy link

weyus commented Jun 1, 2011

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
Copy link
Author

weyus commented Jun 1, 2011

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 class ActionController::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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant