开发者

relationship bundler and gem

Coming from the java world if

rake == ant 开发者_如何学C 
gem  == maven #at least the dependency part

then what the heck is bundler?

It says "managing your application's dependencies", but isn't that what gem is doing by fetching them for me?


Gem fetches a library and installs it in one of the predefined places, like vendor gem, system or user gem directory at that point. That installed version will then be used by your program. So if you have two programs requiring two different versions of a gem you may be out of luck, since when you install the more current one the apps that require the older can have problems. You can specify version numbers for the gems, but those will need to be available on the target server(s) going forward.

There is where bundler comes - it manages exact dependencies including gem versions. So when you deploy an application and have specified exact gem versions that are required, bundler takes care of getting and installing those exact versions at that point. Your app will now have the specified versions 'bundled in' so that you it won't break, when, on the target system, gems have different, incompatible versions.


Rake = ant gem = jar Bundler = maven

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜