Topic: Adding a generator to a gem
I'm trying to add a simple generator to a gem using 3.0.4 but nothing I try seems to be working.
I create a simple gem using bundle.
I try to follow the various examples online (ex. http://nicksda.apotomo.de/2010/09/getti ting-it/), but they're all different.
My understanding is that you just need to add *_generator.rb files under the lib/generators dir. But I've seen people using lib/rails/generators, lib/generators/GEMNAME, etc.
Looking at the docs, it seems like you shouldn't need Railties.
I can't get it working at all. rails g doesn't list my generator. I can add a generator in an app and have it working, but no luck with gems.
I feel like I'm missing some basic, vital thing that everyone who posts about it doesn't bother to mention because they expect you already know.
Does anyone know of a clean, simple example of creating a gem and adding a generator?