From: Michael Linfield Date: 2007-08-17T11:04:35+09:00 Subject: Re: shared scripts and ruby gems Michael Schidlowsky wrote: > Hello everyone, > > If I'm writing a ruby script that uses a certain library (e.g. > Chronic) and I want to share that script with other users by making it > publicly executable on a linux filesystem, do I need to do anything in > the script to make sure that the gem is installed or will other users > just end up using my copy of the gem automatically (in which case it's > enough for me to just run "gem install chronic")? > > Thanks! > -Michael so long as you include the library / gem in ur script then so long as they have that library / gem installed, they shouldnt have a problem, if they dont have it installed then the program simply wont run....if the user of the script has any idea of how the script works they should be able to easily look at the top few lines to ensure they have the proper libraries and/or gems installed. require 'gem_name_or_library' ### if they dont have it installed, they will get a LoadError.. on the flipside if u wanted to "check" if they have it installed just use a raise LoadError approach -- Posted via http://www.ruby-forum.com/.