开发者

Using Plugin in place of Gem in rails3

I want use plugins in place of gems in my Rails application so that I can change the code of a gem which is still under development. Once I remove it from my gemfile and put it as a plugin in the vendor\plugin folder, what else do I need to d开发者_Python百科o to make Rails undesrstand that It needs to use the plugin?


nothing. Its done.

rails plugin install ********

Use this to install your respective plugin. Restart your server and its done.


You're developing a gem, but you want to load it as a plugin? I'm not sure that's the route you want to take. If you have a gem to start with, why not vendorize it and put its path in the Gemfile?

Example:

(from the root of your app)

gem unpack mygem --target vendor/gems

(in Gemfile)

gem 'mygem', :path => "vendor/gems/mygem-VERSION"
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜