#14 ✓resolved
Ben Carpenter

rake db:migrate:reset fails in decl_auth_demo_app

Reported by Ben Carpenter | May 25th, 2009 @ 10:40 PM

Hi.

Some initial information:
I cloned the demo app from github and made a small modification to the environment.rb, changing:
= '2.3.0' unless defined? RAILS_GEM_VERSION to
= '2.3.2' unless defined? RAILS_GEM_VERSION (as I couldn't figure out how to get version 2.3.0, and didn't think it was too important).

I got the submodules for the project set up (init, update), but I run into an error when resetting the db:

~/decl_auth_demo_app{0}(master)$ rake db:migrate:reset ... ... rake aborted!
no such file to load -- vendor/plugins/declarative_authorization/lib/maintenance

Using rake with --trace, the problem appears to be coming from here:
.../gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in require' ./db/migrate//20090112084912_add_first_user.rb:1

which is:
require "vendor/plugins/declarative_authorization/lib/maintenance"

ls -p vendor/plugins/declarative_authorization/lib =>
declarative_authorization/ declarative_authorization.rb

and inside declarative_authorization/ there is a maintenance.rb, so I changed

require "vendor/plugins/declarative_authorization/lib/maintenance"
to
require "vendor/plugins/declarative_authorization/lib/declarative_authorization/maintenance"

And rake db:migrate:reset now works fine. Is the demo migration out of date, or do I have something out of whack with the way I set up the demo project?

-- Ben Carpenter

Comments and changes to this ticket

  • Steffen Bartsch

    Steffen Bartsch May 26th, 2009 @ 09:04 AM

    • State changed from “new” to “resolved”

    You are right, the path changed when I gemified the plugin. I will pull the change from your fork. Thanks for fixing it.

    Any reason for not doing a schema:load?

    Steffen

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

By now, decl_auth is using the GitHub issue tracker as well. Please use the one over there: http://github.com/stffn/declarative_authorization/issues

People watching this ticket

Pages