Open jedeleh opened 5 years ago
So digging into the generator itself via the console, I found that the VanityGenerator class was not loaded. I created an initializer in config/initializers/vanity.rb and puts require 'generators/vanity/migration_generator'
inside. Generator works fine then. I imagine I'll have to do the same thing for the other generators. Perhaps this is a simple loadpath issue.
I didn't see this information in the README.md but saw that if you're using Rails this automagically is taken care of. This might not be true in ruby 2.4+ and Rails 4.2.11+.
I was able to reproduce this issue in a variety of our projects here using different ruby and rails versions with those noted above.
When I attempt to run the basic vanity generator, I get the following error:
(of course, that error message brings up all kinds of existentialistic questions, Shroedinger's Cat and a nice vacation in Copenhagen)
I've tried a large number of variations of the command, including but not limited to:
Nothing seems to work. In reading the compatibility information in the README, I noticed that ruby 2.5.5 isn't mentioned as having been tested, and neither has Rails 5.2.3. I'm wondering if there's an issue in this or if my local setup is somehow compromised.
My next step was to clone vanity and run the specs. I got 12 failures, each ones being exactly like this one:
That set of failures might be on me--I'm using my laptop far from home this week and the output suggests a timezone issue.
Anyway, I guess it would be good to know if vanity is compatible with Ruby 2.5.5 & Rails 5.2.x. If it isn't, is that compatibility in the works?
Please note that I posted a related question on Stackoverflow: https://stackoverflow.com/questions/57185533/vanity-gem-strange-rails-generate-vanity-error