Help with Twitter4r

  • Thread starter Eduardo Goncalves
  • Start date
E

Eduardo Goncalves

Hi everybody... This is my first post where with a doubt in the first
application that i am developing in ruby... I'm using Twitter4r library
and Ramaze instead of Rails.

I think the problem is this bit of code:

def generate
@content = ''
client = Twitter::Client.new:)login => 'myuser', :password => 'mypass')
received_messages = client.messages:)received)
received_messages.each do |f|
@content = @content + f.text + ', '
end
end

The error message is:

Errno::ETIMEDOUT at /generate
A connection attempt failed because the connected component does not
respond properly after a period of time or established connection failed
because connected host has not responded. - Connect (2)

Ruby /lib/ruby/1.8/net/http.rb: in initialize, line 564
Web GET localhost/generate

Thanks!

Edward.
 
J

James Britt

Eduardo said:
Hi everybody... This is my first post where with a doubt in the first
application that i am developing in ruby... I'm using Twitter4r library
and Ramaze instead of Rails.

I think the problem is this bit of code:

def generate
@content = ''
client = Twitter::Client.new:)login => 'myuser', :password => 'mypass')
received_messages = client.messages:)received)
received_messages.each do |f|
@content = @content + f.text + ', '
end
end

Can you get this code to work as a stand-alone script?


James

--
James Britt

www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff
www.neurogami.com - Smart application development
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top