The following seems to do what I want except for including the directory 
from which the script is run (in this case my home directory).

def link_targets
  music_destination = "/sdcard/Music/"
  music_source = "#{Dir.home}/.ANDROIDMUSIC"
  def push(source, destination)
    `adb push #{source} #{destination}`
  end
  Dir.foreach("#{music_source}") { |entry| push 
"#{File.realdirpath(entry, "#{music_source}").to_s }", 
"#{music_destination}"}
end

link_targets

If anyone can suggest a way to modify the File.realdirpath command so 
that it does not in fact return the home directory I would appreciate 
it.  I cannot, in fact, understand why it is doing this to begin with.

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