Joel VanderWerf wrote:
> Max Williams wrote:
>> One problem with the second approach (i like the first approach) is that 
>> i don't want every gem on my local machine to also be on my server - 
>> just the ones required by the app.  So, i guess that whatever the 
>> solution is it has to involve some file(s) in my app where my requires 
>> are listed.
> 
> You could log $" from your program to capture the list of libraries in
> use. That will need some parsing to come up with a list of gem names.
> 
> Maybe rubygems has a command to list the currently loaded gems?

hmmm.  eg (this is run in irb inside my app)
puts $".collect{|s| 
s.split("/").first.gsub(/\..*/,"")}.uniq.sort.join("\n")
English
abbrev
abstract
active_support
activesupport
base64
benchmark
bigdecimal
...etc


I could output this into a text file, and have a task which does the 
same into a different file, and bitches if a diff between the files 
reveals any differences.  It's crazy enough to work, but seems like a 
roundabout (and unreliable) sort of an approach.

-- 
Posted via http://www.ruby-forum.com/.