开发者

Bundler loaded gem order

I'm working on a small gem that will extend the paperclips has_attached_file method. I need this gem to be loaded after paperclip.

Is there a way to know the order in which the gems are load开发者_如何转开发ed? And is there a way to modify that order?

Thanks a lot,

NHI


In your gemspec require the other gem then it should load before yours. See the docs for more information.


i guess this might help give it a try.

gem 'New-Gem','some-version', :require => 'paperclip'


I had to add a Railtie to make this work. Paperclip was loading before my gem but wasn't include until much later...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜