You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jo...@apache.org on 2010/11/17 21:13:16 UTC

svn commit: r1036193 - /qpid/trunk/qpid/ruby/README.txt

Author: jonathan
Date: Wed Nov 17 20:13:15 2010
New Revision: 1036193

URL: http://svn.apache.org/viewvc?rev=1036193&view=rev
Log:
Fixed README.txt to give correct instructions.

Modified:
    qpid/trunk/qpid/ruby/README.txt

Modified: qpid/trunk/qpid/ruby/README.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/ruby/README.txt?rev=1036193&r1=1036192&r2=1036193&view=diff
==============================================================================
--- qpid/trunk/qpid/ruby/README.txt (original)
+++ qpid/trunk/qpid/ruby/README.txt Wed Nov 17 20:13:15 2010
@@ -1,22 +1,26 @@
-= INSTALLATION =
+= Running hello-world.rb =
 
-Extract the release archive into a directory of your choice and set
-your RUBYLIB environment variable accordingly:
+The ruby client includes a simple hello-world example that publishes
+and consumes a message. You can find this in the examples
+directory. This example requires a running broker.
 
-  tar -xzf qpid-ruby-<version>.tar.gz -C <install-prefix>
-  export RUBYLIB=<install-prefix>/qpid-<version>/ruby/lib
+You can set RUBYLIB to the directories containing the Qpid ruby
+library and the SASL extension, then run the example from the command
+line. These are found in the ./lib and ./ext/sasl subdirectories.
 
-= GETTING STARTED =
+$ export RUBYLIB=/home/me/qpid/ruby/lib:/home/me/qpid/ruby/ext/sasl
+$ ./hello-world.rb
+#<Qpid::Message:0xb761c378 @headers=[#<struct Struct::Qpid_Message_properties content_length=nil, message_id=nil, correlation_id=nil, reply_to=nil, content_type="text/plain", content_encoding=nil, user_id=nil, app_id=nil, application_headers=nil, st_type=message_properties, id=nil>, #<struct Struct::Qpid_Delivery_properties discard_unroutable=nil, immediate=nil, redelivered=nil, priority=nil, delivery_mode=nil, ttl=nil, timestamp=nil, expiration=nil, exchange="", routing_key="test-queue", resume_id=nil, resume_ttl=nil, st_type=delivery_properties, id=nil>], @body="Hello World!", @id=#<Qpid::Serial:0xb76450fc @value=0>>
 
-The ruby client includes a simple hello-world example that publishes
-and consumes a message:
+Alternatively, you can specify the library paths using $ ruby -I:
 
-  cp <install-prefix>/qpid-<version>/ruby/examples/hello-world.rb .
-  ./hello-world.rb
+$ ruby -I /home/me/qpid/ruby/lib:/home/me/qpid/ruby/ext/sasl hello-world.rb 
+#<Qpid::Message:0xb7504a44 @headers=[#<struct Struct::Qpid_Message_properties content_length=nil, message_id=nil, correlation_id=nil, reply_to=nil, content_type="text/plain", content_encoding=nil, user_id=nil, app_id=nil, application_headers=nil, st_type=message_properties, id=nil>, #<struct Struct::Qpid_Delivery_properties discard_unroutable=nil, immediate=nil, redelivered=nil, priority=nil, delivery_mode=nil, ttl=nil, timestamp=nil, expiration=nil, exchange="", routing_key="test-queue", resume_id=nil, resume_ttl=nil, st_type=delivery_properties, id=nil>], @body="Hello World!", @id=#<Qpid::Serial:0xb752d548 @value=0>>
 
-= RUNNING THE TESTS =
+= Running the Tests =
 
 The "tests" directory contains a collection of unit tests for the ruby
-client. These can be run with the Rakefile provided:
+client. These can be run from the 'ruby' directory with the Rakefile
+provided:
 
-  rake test
+$ rake test



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org