开发者

Bundler loaded gem order

开发者 https://www.devze.com 2023-03-12 16:58 出处:网络
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.

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

精彩评论

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