From: Bernard Lambeau Date: 2011-01-15T01:33:13+09:00 Subject: Re: Best practice to require external code dependency ? --00163630f32374fb660499d0fdeb Content-Type: text/plain; charset=ISO-8859-1 Thanks a lot Luis, it makes things a lot clearer for me!! For the sake of history, the initial code I was refering to in my first message is now here: https://gist.github.com/779830 B On Fri, Jan 14, 2011 at 5:15 PM, Luis Lavena wrote: > On Jan 14, 11:26 am, Bernard Lambeau wrote: > > [Note: parts of this message were removed to make it a legal post.] > > > > I see (I was currently re-readinghttps://gist.github.com/54177, which is > > clear in fact -- my apologies). > > > > I understand that users of my library will have a good _foo_ executable > that > > works fine :-) > > > > Now, as a developer I would like to be able to run (no rake, no rspec, > and > > so on): > > > > ruby -rrubygems bin/foo > > > > How are version requirements met in that scenario? I assume they are not > and > > that rubygems will load last versions of all gems? > > They are not. Up to you deal with the dependencies. > > > > > Should I configure rvm's gemsets on my devel computer ? or do you use > > Bundler to manage that case ?? > > > > Don't add bundler code to your library either, as bundler depends on > RubyGems, you can: > > ruby -rrubygems -rbundler/setup bin/foo > > Above line will work on 1.9, but not on Ruby 1.8.x > > Either you need a wrapper script to do this: > > ruby -Ilib -rrubygems -e "require 'bundler/setup'; load 'bin/foo'" > > I can't comment more on Bundler as I don't use it, sorry. > > -- > Luis Lavena > > --00163630f32374fb660499d0fdeb--