Could not install Mobility gem on Rails plugin

133 Views Asked by At

I'm creating a Rails plugin which uses Mobility gem.

I can see the installer listed when I do

rails generate --help

But then if I run

rails generate mobility:install

I get this totally weird error:

Could not find generator 'mobility:install'. Maybe you meant 'mobility:install', 'binda:install' or 'devise:install'

My guess is that mobility generator isn't located in lib/generators/mobility but in lib/generators/rails/mobility. See the github repository. The issue does appear only on Rails plugin not on Rails application.

Any idea how to overcome this issue?

1

There are 1 best solutions below

0
Chris Salzberg On BEST ANSWER

As you suspected, the problem is the paths used for generators in Mobility. This PR will fix the issue.