You can do what you want with this version of the twitter gem. You're using a version of the gem for < 4.8, based on your configuration options, so some of the doc has already been updated for version 5. Note that this call is deprecated in version 5, so in the future this code will have to be changed. For this version, this is how I do it:
controller:
Twitter.configure do |config|
config.consumer_key = consumer_key
config.consumer_secret = consumer_secret
config.oauth_token = oauth_token
config.oauth_token_secret = oauth_token_secret
end
@twitter_search = Twitter.search(params[:search], :count => 10, :result_type => "recent")
view (this is haml but erb or slim is similar):
%ul
= @twitter_search.results.map do |tweet| status.profile_image_url }
%li
.span2
%img{:src => status.profile_image_url}
#{status.screen_name}
.span4
#{status.text}