-
Notifications
You must be signed in to change notification settings - Fork 403
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
uninitialized constant Rolify::Adapter::Scopes #83
Comments
you're definitely right, rolify 3.2.0.beta4 was never released on rubygems, only committed this version on github. |
The issue as I encountered it won't reproduce anymore, because rails_app_composer added a workaround: RailsApps/rails_apps_composer@0056877 The changes are in recipes/devise.rb and recipes/add_user.rb. TL;DR: they are using rolify 3.1.0 and adding That line should probably be inserted by your rolify:role generator so the workaround isn't required. Here's a gist with my (now working) User.rb: https://gist.github.com/2919964 I haven't tried any more recent versions of rolify, so I don't know if this is even still an issue...the comment in the above diff implied that it isn't as of 3.2.0.beta4, but it failed for me in 3.2.0.rc1. |
Can you try it again please with the latest master branch version ? it should be fixed. |
It works fine with the latest master. |
I am attempting to use the following setup for a new app:
rails 3.2.5
mongoid 2.4.11
devise 2.1.0
cancan 1.6.7
rolify 3.2.0.rc1
This was all generated using rails_apps_composer, except that I modified the authorization recipe to use rolify 3.2.0.rc1 from github (it currently points to 3.2.0.beta4, which doesn't appear to exist on rubygems). The template runs the rolify:role generator correctly, but whenever I try to run any rake task that depends on environment, I get the following exception:
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant Rolify::Adapter::Scopes
/Users/adam/code/testapp/app/models/role.rb:18:in
<class:Role>' /Users/adam/code/testapp/app/models/role.rb:1:in
<top (required)>'/Users/adam/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.4.11/lib/rails/mongoid.rb:73:in `load_model'
.
.
.
The text was updated successfully, but these errors were encountered: