-
Notifications
You must be signed in to change notification settings - Fork 233
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
undefined method 'join' for nil:NilClass in authorization.rb:23 #43
Comments
This is due to Rails.root still being nil when the AUTH_DSL_FILES code gets to run during initalization. See this ticket regarding the matter: |
I've fixed it here: http://github.com/yabawock/declarative_authorization/tree/rails3 990f62721426371cdbf7183b5f885609fb53e6af adds a railtie so that declarative_authorization integrates itself into the Rails 3 initialization process. Otherwise "initialize" will never get called and DA will not get set up Commit bc8c699095459a26912b83b1a0a54c4298842b4f modifies the logic to find the rules file a bit:
As we are in the initialize function when we are falling back on Rails.root this means that the Rails framework has been initialized and Rails.root should not be nil. |
Further fix for Rails.root being nil in plugin initialization in Rails 3.beta3 The correct approach most likely is to employ Railtie and init hooks to make sure |
yabawock, your approach seems like a good way to solve this problem in the future. 990f62721426371cdbf7183b5f885609fb53e6af seems to be empty, though. |
Seems, the merging from a different branch failed. Redid the merge, commit is 1ab1422f02c85f9334e8e3ea443887f6127ddfff |
Let's move this issue to its proper own thread: #44 |
after your last update 3 hours ago I now get an an error at Rails-Startup (see title)
I testet Rails.root.join("config", "authorization.rb") and it worked fine in console (without the GEM)...
Ruby 1.9.1p378
Rails Beta3 (same with Rails Beta 2)
The text was updated successfully, but these errors were encountered: