From: Luis Lavena Date: 2011-01-15T01:15:31+09:00 Subject: Re: Best practice to require external code dependency ? 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