开发者

How do I make my generator discoverable by Rails?

When I'm creating a gem, how do I make the generator discoverable by Rails?

I have a generators directory with my generator inside. I symlinked it from ~/.rails/generators and it worked fine, but when I install the gem, even though the generators directory is installed, Rails doe开发者_运维技巧sn't find it.


There's nothing special to be done. Just having generators/blah/blah_generator.rb with a BlahGenerator class inside was enough. I was missing the "_generator" in the filename.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜