knock
knock copied to clipboard
Rails::Generators::Base, using github master branch with Rails 5, puma 3.8.2 in Heroku, Ruby 2.4.0, heroku-16 stack, I receive error.
Using github master branch with Rails 5, Puma 3.8.2 in Heroku, Ruby 2.4.0, heroku-16 stack, I receive error.
Using latest version on Rubygems everything is OK.
The error is something related to "Rails::Generators::Base".
Probably not detailed enough issue, I'm using same everything and it works fine.
I encountered this error on Heroku as well, running pretty much the same stack. Turns out that for generators you need to explicitly require rails/generators
. This goes way back to Rails 3.x apparently. Not sure why this behaviour doesn't seem consistent, but adding that require to the top of the generator files does indeed fix this issue on Heroku.
References:
- https://github.com/plataformatec/devise/issues/2743
- https://github.com/thoughtbot/refills/pull/33
- https://stackoverflow.com/questions/14883897/uninitialized-constant-railsgenerators-nameerror/14884631#14884631
I'll submit a PR to add the requires.
Abit late to this. Anyway, i was bitten by this as well when deploying to heroku only. IMO, it doesn't make sense to require "rails/generators"
, since we don't need generators, especially in production. This is what i did eventually https://github.com/ngty/knock/pull/1/commits/97fb32f59b2027c808964b875be2fff22400da1d