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

Policy generator does not work with rails 3.0.17 #2

Closed
trekdemo opened this issue Nov 29, 2012 · 4 comments
Closed

Policy generator does not work with rails 3.0.17 #2

trekdemo opened this issue Nov 29, 2012 · 4 comments

Comments

@trekdemo
Copy link

rails 3.0.17
thor 0.14.6
pundit 0.1.0

$ bundle exec rails g pundit:policy workflow_template
      create  app/policies/workflow_template_policy.rb
(erb):1:in `template': undefined method `module_namespacing' for #<Pundit::Generators::PolicyGenerator:0x106ad6108> (NoMethodError)
        from (eval):1:in `template'
        from /Users/trek/dev/some_project/.bundle/gems/pundit-0.1.0/lib/generators/pundit/policy/policy_generator.rb:7:in `create_policy'
        from /Users/trek/dev/some_project/.bundle/gems/thor-0.14.6/lib/thor/task.rb:22:in `send'
        from /Users/trek/dev/some_project/.bundle/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
        from /Users/trek/dev/some_project/.bundle/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
        from /Users/trek/dev/some_project/.bundle/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
        from /Users/trek/dev/some_project/.bundle/gems/thor-0.14.6/lib/thor/shell.rb:14:in `map'
        from /Users/trek/dev/some_project/.bundle/gems/thor-0.14.6/lib/thor/core_ext/ordered_hash.rb:75:in `each'
        from /Users/trek/dev/some_project/.bundle/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
        from /Users/trek/dev/some_project/.bundle/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
        from /Users/trek/dev/some_project/.bundle/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
        from /Users/trek/dev/some_project/.bundle/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
        from /Users/trek/dev/some_project/.bundle/gems/railties-3.0.17/lib/rails/generators.rb:163:in `invoke'
        from /Users/trek/dev/some_project/.bundle/gems/railties-3.0.17/lib/rails/commands/generate.rb:10
        from /Users/trek/dev/some_project/.bundle/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `polyglot_original_require'
        from /Users/trek/dev/some_project/.bundle/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
        from /Users/trek/dev/some_project/.bundle/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:242:in `require'
        from /Users/trek/dev/some_project/.bundle/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:225:in `load_dependency'
        from /Users/trek/dev/some_project/.bundle/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:597:in `new_constants_in'
        from /Users/trek/dev/some_project/.bundle/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:225:in `load_dependency'
        from /Users/trek/dev/some_project/.bundle/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:242:in `require'
        from /Users/trek/dev/some_project/.bundle/gems/railties-3.0.17/lib/rails/commands.rb:17
        from script/rails:6:in `require'
        from script/rails:6
@jnicklas
Copy link
Collaborator

Odd, maybe that method was introduced in a newer Rails version?

@trekdemo
Copy link
Author

@shanemcd
Copy link

shanemcd commented Dec 4, 2012

I dont know what the OPs exact situation is, but I've found that upgrading from 3.0.x to 3.1 is relatively painless. If its the asset pipeline youre worried about, it is optional and defaults to off when upgrading.

@trekdemo
Copy link
Author

trekdemo commented Dec 4, 2012

It's not a critical bug, so i close it.

@shanemcd we have some legacy gems that are incompatible with AR 3.1.x.
But we are planing the upgrade :)

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

3 participants