bploetz / versionist

A plugin for versioning Rails based RESTful APIs.
MIT License
971 stars 51 forks source link

Generators don't work with rails engines. #40

Closed ji closed 11 years ago

ji commented 11 years ago

I get the following errors, when trying to use the new_api_version generator in a mountable rails engine:

Even without parameters the generator should at least print out it's USAGE.

$ bundle exec rails g versionist:new_api_version

[WARNING] Could not load generator "generators/versionist/new_api_version/new_api_version_generator". Error: uninitialized constant Versionist::NewApiVersionGenerator::InflectorFixes. /Users/yi/Development/private/RoR/gems/versionist/lib/generators/versionist/new_api_version/new_api_version_generator.rb:3:in <class:NewApiVersionGenerator>' /Users/yi/Development/private/RoR/gems/versionist/lib/generators/versionist/new_api_version/new_api_version_generator.rb:2:inmodule:Versionist' /Users/yi/Development/private/RoR/gems/versionist/lib/generators/versionist/new_api_version/new_api_version_generator.rb:1:in <top (required)>' /Users/yi/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.13/lib/rails/generators.rb:300:inrequire' /Users/yi/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.13/lib/rails/generators.rb:300:in block (2 levels) in lookup' /Users/yi/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.13/lib/rails/generators.rb:296:ineach' /Users/yi/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.13/lib/rails/generators.rb:296:in block in lookup' /Users/yi/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.13/lib/rails/generators.rb:295:ineach' /Users/yi/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.13/lib/rails/generators.rb:295:in lookup' /Users/yi/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.13/lib/rails/generators.rb:152:infind_by_namespace' /Users/yi/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.13/lib/rails/generators.rb:169:in invoke' /Users/yi/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.13/lib/rails/commands/generate.rb:12:in<top (required)>' /Users/yi/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.13/lib/rails/engine/commands.rb:21:in require' /Users/yi/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.13/lib/rails/engine/commands.rb:21:in<top (required)>' script/rails:8:in require' script/rails:8:in

'

Rails version is, as you can guess from the railties version, 3.2.13.

bploetz commented 11 years ago

Closing in favor of #41