Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
undefined method `name' for nil:NilClass
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Werner Strydom  
View profile  
 More options Jan 24 2011, 1:26 am
From: Werner Strydom <bloudr...@gmail.com>
Date: Sun, 23 Jan 2011 22:26:18 -0800 (PST)
Local: Mon, Jan 24 2011 1:26 am
Subject: undefined method `name' for nil:NilClass
I install the ActiveMessaging gem under OS X Snow Leopard 10.6.5 and
created a rails application to send messages to an Amazon SQS queue
and process them. I followed the 10 minute quick start on the website,
but chose to create a processor called "Simple".

Using the AWS tools I can see that messages are sucessfully added to
SQS, but when I run the poller, it fails with a message
"NoMethodError: undefined method `name' for nil:NilClass". See the
stack trace below.

I created several rails applications, switched between plugin and gem,
tried different queue names, but with no luck. I even tried to send
various types of data, but still no luck.

Any ideas?

My config/messaging.rb looks as follows:

ActiveMessaging::Gateway.define do |s|
  s.destination :simple, "simple_queue"
end

The processor looks as follows:

class SimpleProcessor < ApplicationProcessor
  subscribes_to :simple
  def on_message(message)
      data = YAML.load message
      logger.debug "#{Time.now} SimpleProcessor received:
#{data[:message]} on #{data[:time]}"
    end
end

and config/broker.yml looks as follows:
development:
    adapter: asqs
    access_key_id: XXXXX
    secret_access_key: XXXXX
test:
    adapter: asqs
    access_key_id: XXXX
    secret_access_key: XXXXX

production:
    adapter: asqs
    access_key_id: XXXX
    secret_access_key: XXXXX

The stacktrace  for "poller run" is as follows:

DEPRECATION WARNING: require "activesupport" is deprecated and will be
removed in Rails 3. Use require "active_support" instead.. (called
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/gems/1.8/gems/activesupport-2.3.5/lib/activesupport.rb:2)
ActiveMessaging: adapter beanstalk not loaded: no such file to load --
beanstalk-client
ActiveMessaging: adapter wmq not loaded: no such file to load -- wmq/
wmq
ActiveMessaging: Loading /Users/werners/Development/sqs/app/processors/
application.rb
ActiveMessaging: Loading /Users/werners/Development/sqs/app/processors/
simple_processor.rb
poller: process with pid 1155 started.
=> Subscribing to simple_queue (processed by SimpleProcessor)
NoMethodError: undefined method `name' for nil:NilClass
        /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/activesupport-2.3.5/lib/active_support/whiny_nil.rb:
52:in `method_missing'
        /Library/Ruby/Gems/1.8/gems/activemessaging-0.7.1/lib/activemessaging/
adapters/asqs.rb:66:in `subscribe'
        /Library/Ruby/Gems/1.8/gems/activemessaging-0.7.1/lib/activemessaging/
gateway.rb:386:in `subscribe'
        /Library/Ruby/Gems/1.8/gems/activemessaging-0.7.1/lib/activemessaging/
gateway.rb:127:in `subscribe'
        /Library/Ruby/Gems/1.8/gems/activemessaging-0.7.1/lib/activemessaging/
gateway.rb:127:in `each'
        /Library/Ruby/Gems/1.8/gems/activemessaging-0.7.1/lib/activemessaging/
gateway.rb:127:in `subscribe'
        /Library/Ruby/Gems/1.8/gems/activemessaging-0.7.1/lib/activemessaging/
gateway.rb:28:in `start'
        /Library/Ruby/Gems/1.8/gems/activemessaging-0.7.1/lib/
activemessaging.rb:111:in `start'
        /Users/werners/Development/sqs/lib/poller.rb:24
        /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:
145:in `load_without_new_constant_marking'
        /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:
145:in `load'
        /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:
521:in `new_constants_in'
        /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:
145:in `load'
        /Library/Ruby/Gems/1.8/gems/daemons-1.1.0/lib/daemons/application.rb:
203:in `start_load'
        /Library/Ruby/Gems/1.8/gems/daemons-1.1.0/lib/daemons/application.rb:
292:in `start'
        /Library/Ruby/Gems/1.8/gems/daemons-1.1.0/lib/daemons/controller.rb:
73:in `run'
        /Library/Ruby/Gems/1.8/gems/daemons-1.1.0/lib/daemons.rb:143:in `run'
        /Library/Ruby/Gems/1.8/gems/daemons-1.1.0/lib/daemons/cmdline.rb:
112:in `call'
        /Library/Ruby/Gems/1.8/gems/daemons-1.1.0/lib/daemons/cmdline.rb:
112:in `catch_exceptions'
        /Library/Ruby/Gems/1.8/gems/daemons-1.1.0/lib/daemons.rb:142:in `run'
        script/poller:25
Cleaning up...
=> Unsubscribing from simple_queue (processed by SimpleProcessor)
=> END
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/activesupport-2.3.5/lib/active_support/whiny_nil.rb:
52:in `method_missing': undefined method `name' for nil:NilClass
(NoMethodError)
        from /Library/Ruby/Gems/1.8/gems/activemessaging-0.7.1/lib/
activemessaging/adapters/asqs.rb:66:in `subscribe'
        from /Library/Ruby/Gems/1.8/gems/activemessaging-0.7.1/lib/
activemessaging/gateway.rb:386:in `subscribe'
        from /Library/Ruby/Gems/1.8/gems/activemessaging-0.7.1/lib/
activemessaging/gateway.rb:127:in `subscribe'
        from /Library/Ruby/Gems/1.8/gems/activemessaging-0.7.1/lib/
activemessaging/gateway.rb:127:in `each'
        from /Library/Ruby/Gems/1.8/gems/activemessaging-0.7.1/lib/
activemessaging/gateway.rb:127:in `subscribe'
        from /Library/Ruby/Gems/1.8/gems/activemessaging-0.7.1/lib/
activemessaging/gateway.rb:28:in `start'
        from /Library/Ruby/Gems/1.8/gems/activemessaging-0.7.1/lib/
activemessaging.rb:111:in `start'
        from /Users/werners/Development/sqs/lib/poller.rb:24
        from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:145:in `load_without_new_constant_marking'
        from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:145:in `load'
        from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:521:in `new_constants_in'
        from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:145:in `load'
        from /Library/Ruby/Gems/1.8/gems/daemons-1.1.0/lib/daemons/
application.rb:203:in `start_load'
        from /Library/Ruby/Gems/1.8/gems/daemons-1.1.0/lib/daemons/
application.rb:292:in `start'
        from /Library/Ruby/Gems/1.8/gems/daemons-1.1.0/lib/daemons/
controller.rb:73:in `run'
        from /Library/Ruby/Gems/1.8/gems/daemons-1.1.0/lib/daemons.rb:143:in
`run'
        from /Library/Ruby/Gems/1.8/gems/daemons-1.1.0/lib/daemons/cmdline.rb:
112:in `call'
        from /Library/Ruby/Gems/1.8/gems/daemons-1.1.0/lib/daemons/cmdline.rb:
112:in `catch_exceptions'
        from /Library/Ruby/Gems/1.8/gems/daemons-1.1.0/lib/daemons.rb:142:in
`run'
        from script/poller:25

The following gems are installed:

actionmailer (2.3.5, 1.3.6)
actionpack (2.3.5, 1.13.6)
actionwebservice (1.2.6)
activemessaging (0.7.1)
activemodel (3.0.3)
activerecord (2.3.5, 1.15.6)
activeresource (2.3.5)
activesupport (3.0.3, 2.3.5, 1.4.4)
acts_as_ferret (0.4.3)
arel (2.0.7)
authlogic (2.1.6)
aws-s3 (0.6.2)
builder (2.1.2)
capistrano (2.5.2)
cgi_multipart_eof_fix (2.5.0)
daemons (1.1.0, 1.0.10)
diff-lcs (1.1.2)
dnssd (0.6.0)
exifr (1.0.3)
fastthread (1.0.1)
fcgi (0.8.7)
ferret (0.11.6)
gem_plugin (0.2.3)
haml (3.0.25)
highline (1.5.0)
hpricot (0.6.164)
i18n (0.5.0)
json (1.4.6)
less (1.2.21)
libxml-ruby (1.1.2)
macaddr (1.0.0)
mime-types (1.16)
mongrel (1.1.5)
mutter (0.5.3)
mysql (2.8.1)
needle (1.3.0)
net-scp (1.0.1)
net-sftp (2.0.1, 1.1.1)
net-ssh (2.0.4, 1.1.4)
net-ssh-gateway (1.0.0)
nifty-generators (0.4.4)
paperclip (2.3.8)
polyglot (0.3.1)
rack (1.2.1, 1.0.1)
rails (2.3.5, 1.2.6)
rake (0.8.3)
RedCloth (4.1.1)
reliable-msg (1.1.0)
right_aws (2.0.0)
right_http_connection (1.2.4)
rspec (2.4.0)
rspec-core (2.4.0)
rspec-expectations (2.4.0)
rspec-mocks (2.4.0)
rubigen (1.5.5)
ruby-openid (2.1.2)
ruby-yadis (0.3.4)
rubynode (0.1.5)
sinatra (1.1.2)
sqlite3-ruby (1.2.4)
stomp (1.1.7)
termios (0.9.4)
tilt (1.2.1)
treetop (1.4.9)
tzinfo (0.3.24)
uuid (2.3.1)
xml-simple (1.0.12)
xmpp4r (0.4)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions Older topic »