Using Twitter4R on Mac OS X
Posted in: Programming, Tips
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
Return to: Using Twitter4R on Mac OS X
Social Web