RailsApps / rails-devise-pundit

Rails 5.0 starter app with Devise for authentication and Pundit for authorization.
http://railsapps.github.io/rails-devise-pundit/
483 stars 156 forks source link

Where's Pundit? #9

Closed bdsimmons closed 10 years ago

bdsimmons commented 10 years ago

I have used the generate commands provided several times:

$ rails new rails-devise-pundit -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb

It works great, except that there is no option to use Pundit for authorization. All I get is this:

question  Authorization?
           1)  None
           2)  CanCan with Rolify

I can get the application with Pundit from cloning the repo, but then I have to rename the app. This tool would be fantastic if Pundit was part of the composer.

DanielKehoe commented 10 years ago

My guess is that you are using an older version of Rails. Try running with Rails 4.1. Let me know if that solves the issue.

bdsimmons commented 10 years ago

That is exactly right. I was running Rails 4.0.5. I upgraded to 4.1.1 and it works perfectly. Question though - Why did the option for figaro go away. I didn't see it?

DanielKehoe commented 10 years ago

The Figaro option will show up as a final question when you choose 'Custom application'.

      extras  Create a GitHub repository? (y/n) n
    question  Add gem and file for environment variables?
          1)  None
          2)  Add .env with Foreman
          3)  Add application.yml with Figaro

Be advised that 'Custom application' is fragile right now and you may get errors in the generated app. I'm refactoring Rails Composer now and 'Custom application' will take some time to stabilize. Choose 'Build a RailsApps example application' if you want stability.