Skip to content
Browse files

Updated instructions for amqp installation. Require version >= 0.6.0.

+ Its preferable to install amqp gem from RubyForge
+ Minor update to README.rdoc related to --token

Signed-off-by: ezmobius <ez@engineyard.com>
  • Loading branch information...
1 parent b4b3fe2 commit 51d4185f12d7c7a1501a273caafb2d2c81f538b2 @grempe grempe committed with ezmobius Jan 19, 2009
Showing with 11 additions and 8 deletions.
  1. +10 −7 README.rdoc
  2. +1 −1 Rakefile
View
17 README.rdoc
@@ -105,6 +105,10 @@ Installing the gem gives us access to the various Nanite commands in the default
=== Install AMQP Ruby Gem
+ # install version >= 0.6.0 from RubyForge
+ sudo gem install amqp
+
+ # or install from source
cd <SRC>
git clone git://github.com/tmm1/amqp.git
cd amqp && rake gem && sudo gem install amqp-<VERSION>.gem
@@ -182,6 +186,9 @@ You can learn more about RabbitMQ admin here: http://www.rabbitmq.com/admin-guid
You can test that all the moving parts are working end-to-end by running one of the AMQP example programs. There are a number of example tests provided with AMQP but the one we will try simply queues and prints two messages immediately, and another one five seconds later.
+ # this test can only be run if you made a local clone
+ # of the amqp repository during the amqp installation above
+ # (it does not matter however if the gem was installed from src or rubyforge)
cd <SRC>/amqp
ruby examples/mq/simple-get.rb
@@ -211,14 +218,10 @@ Now run a mapper. Mappers can be run from within your Merb or Rails app, from a
cd examples
./cli.rb
-Which should soon return something like the following. Note that the '55a7f300c454203eacc218b6fbd2edc6' in this example is the identifier for the agent that ran the task for you. This is auto-generated.
-
- {"55a7f300c454203eacc218b6fbd2edc6"=>"hello nanite"}
-
-Note : If you want the agents to run with a name you specify instead of the auto-generated id
-you can run them with something like the following (where bob is our unique id):
+Which should soon return something like the following.
- nanite -t bob
+ {"bob"=>"hello nanite"} # where the '--token bob' parameter was passed
+ {"55a7f300c454203eacc218b6fbd2edc6"=>"hello nanite"} # where no '--token' was passed. auto-generated identity.
Now if you want to make this interesting, you can issue a Ctrl-c in one of the agent's windows to kill it. And then run cli.rb again. You should see that you still get a result back since the mapper is finding the remaining agent to do its work.
View
2 Rakefile
@@ -27,7 +27,7 @@ spec = Gem::Specification.new do |s|
s.executables = %w( nanite nanite-mapper nanite-admin )
s.add_dependency "extlib"
- s.add_dependency "amqp"
+ s.add_dependency('amqp', '>= 0.6.0')
s.require_path = 'lib'
#s.autorequire = GEM

0 comments on commit 51d4185

Please sign in to comment.
Something went wrong with that request. Please try again.