Hi,
I’m having some problems running a self made generator. When I want to
list the generators with: rails g, my generator shows up in the list.
But when I want to run it, I get Could not find generator error.
module MyGem
module Core
class InstallGenerator < Rails::Generators::Base
source_root File.expand_path(’…/templates’, FILE)
def copy_initializer
delete_stylesheets
copy_stylesheets
end
private
def delete_stylesheets
remove_file "public/stylesheets/style.css"
end
def copy_stylesheets
copy_file "stylesheets/style.css",
“public/stylesheets/style.css”
end
end
end
end
Anyone who has an idea what might be wrong?