# Problem with tmm1's amqp and mechanize

**URL:** <https://www.ruby-forum.com/t/problem-with-tmm1s-amqp-and-mechanize/181885>\
**Category:** Ruby\
**Created:** [January 19, 2010, 6:50pm UTC](https://www.ruby-forum.com/t/problem-with-tmm1s-amqp-and-mechanize/181885 "2010-01-19T18:50:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuri\_Lapitsky](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8491ac/32.png) [@Yuri\_Lapitsky](https://www.ruby-forum.com/u/Yuri_Lapitsky)\
**Post date:** [January 19, 2010, 6:50pm UTC](https://www.ruby-forum.com/t/problem-with-tmm1s-amqp-and-mechanize/181885/1 "2010-01-19T18:50:57Z")

</div>

Hello,

I have standalone Ruby application that subscribes for messages AMQP  
queue (RabbitMQ). It’s supposed to visit some site when message is  
received. Everything works ok with Ruby’s standard http client.  
However when I just put  
require ‘mechanize’  
in the file then  
AMQP.start do  
does not get blocked on this line. Everything just stops working after  
putting require for mechanize.

Any ideas are highly appreciated.

Thanks in advance,  
Yuri

---

<div class="post-metadata">

**Author:** ![Yuri\_Lapitsky](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8491ac/32.png) [@Yuri\_Lapitsky](https://www.ruby-forum.com/u/Yuri_Lapitsky)\
**Post date:** [January 20, 2010, 12:13am UTC](https://www.ruby-forum.com/t/problem-with-tmm1s-amqp-and-mechanize/181885/2 "2010-01-20T00:13:48Z")

</div>

> ```
> require 'mechanize'
> 
> ```
> 
> in the file then  
> AMQP.start do  
> does not get blocked on this line. Everything just stops working after  
> putting require for mechanize.

it blocks within the call to require ‘mechanize’?  
you could use tracer to see where it is at.  
You could also try beanstalk as a messaging queue.  
-r

---

<div class="post-metadata">

**Author:** ![Yuri\_Lapitsky](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8491ac/32.png) [@Yuri\_Lapitsky](https://www.ruby-forum.com/u/Yuri_Lapitsky)\
**Post date:** [January 20, 2010, 12:48pm UTC](https://www.ruby-forum.com/t/problem-with-tmm1s-amqp-and-mechanize/181885/3 "2010-01-20T12:48:28Z")

</div>

On Jan 20, 1:16 am, Roger P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> –  
> Posted viahttp://www.ruby-forum.com/.

It does not block and this is the problem.  
I have something like this:

AMQP.start do  
log(“Creating message queue object”)  
amq = MQ.new  
log(“…started”)  
amq.queue(QUEUES[queue\_name]).subscribe { }  
end

Everything works ok until I just add require ‘mechanize’ in the first  
line of the file. I do not see “Creating message queue object” message
