Using Twitter4R on Mac OS X
Was playing around a bit with the Twitter4R library the other day and realized that in order to make it to work on Mac OS X (Leopard) you need to also require ‘time’. Or you will get an error similar to lib/twitter/model.rb:268:in `init’: undefined method `parse’ for Time:Class (NoMethodError).
A small snippet to display my public tweets:
require 'rubygems'
gem('twitter4r', '0.3.0')
require 'twitter'
# Required on Mac OS X Leopard
require 'time'
twitter = Twitter::Client.new
hallski_timeline = twitter.timeline_for(:user, :id => 'hallski')
hallski_timeline.each do |status|
puts status.text
end
Thanks for that. Didn’t have a clue why I couldn’t get it to work.
You can now download the development release of Twitter4R (v0.3.1) from the GitHub gem repository. It contains newer features than those available at the time 0.3.0 was released.
See the following GitHub wiki page for more information:
http://github.com/mbbx6spp/twitter4r/wikis/howto-install-github-development-releases
HTH
Susan
@S. Potter. Thanks a lot for notifying!