Closed grcarey closed 11 years ago
That's odd.
I don't think there's anything specific to Authority that's going wrong here; your config/initializers/authority.rb
is being loaded, it refers to the Authority
constant, and that constant isn't loaded yet.
Authority doesn't do anything to load the Authority
constant; it's declared in lib/authority.rb
, which should be required by your Gemfile.
Any chance you put gem 'authority'
in your Gemfile in a section which doesn't apply to production?
Thanks for the response Nathan. The authority gem is not particular to a specific environment. It is bundle installed in the production environment.
If you run RAILS_ENV=production script/rails console
on your production machine and then type Authority
, do you get a missing constant? What about if you try a constant from another gem you're using?
I'm wondering if you're having this problem with Authority only, or if it's just the first initializer that runs (maybe they use alphabetical order).
Also, would you mind posting the contents of your Gemfile?
Hi Nathan,
In the end I wiped my staging environment, changed nothing in my dev environment, and re-ran the cap deploy and it worked. Not sure what the reason for this was.
@grcarey My usual explanation for such things is "computer gnomes." They are quite mischievous. ;)
This is a cross-post from me at stackoverflow.
http://stackoverflow.com/questions/19238540/error-when-deploying-the-authority-gem-with-capistrano
If a get a response from there I will post it back here.
I'm deploying a rails4 app from a dev machine to a server. This deployment has been working smoothly.
I have added authorisation to my application using the authority gem. When I run ./bin/cap deploy I now get the error in the unicorn log that is listed below.
All of the files created with
rails g authority:install
on the dev machine have been committed to git and are being deployed to the server using./bin/cap deploy
.Any help appreciated.