troubleshooting Question

Where do I run RUBY?

Avatar of bpfsr
bpfsrFlag for United States of America asked on
5 Comments1 Solution1475 ViewsLast Modified:
I am reading the book Programming Amazon Web Services by James Murty. In the book he says "In this book we will demonstrate how to parse and create XML documents using the Ruby library called REXML." Then says "To demonstrate how to use this XPath in Ruby, we have saved the XML document to a file named example.xml, and we will use the REXML Ruby library to parse and query this document in an interactive Ruby session." And starts giving the following commands:

# Load the XML document text from a file
irb> xml_text ='example.xml', 'r').read

# Load Ruby's XML handling library REXML
irb> require 'rexml/document'

# Parse the XML text in to a document object using REXML
irb> xml_doc =

# Define an XPath query string
irb> xpath = '/ListAllMyBucketsResult/Buckets/Bucket/Name'

# Perform the XPath query on the document and print the results
irb> xml_doc.elements.each(xpath) do |result|
irb>    puts result
irb> end

What I can't figure out is where I am running RUBY! I have RUBY 1.86.26 loaded on my computer cannot figure out where I'm entering the commands to get the thing to do the above. I wanted to program Amazon AWS, not learn RUBY! Any clue where I run this thing...???

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros