title: Twitter Gem for Ruby on Rails not working. What am I missing?
body: <p>I'm trying to get the <a href="https://github.com/sferik/twitter" rel="nofollow">Twitter gem</a> version 5.1.1 to work in my application, but I'm having trouble with the configuration. I am running rails 4 and Ruby 2.0.0.  In my Gemfile I have "gem 'twitter'" listed and have installed it via the bundler.  As per the documentation, I created an initializer file in config/initializers/twitter_credentials.rb.  That file looks like this (though I have the key's and secrets filled with my information from twitter):</p>
  
  <pre><code>require 'twitter'
  
  client = Twitter::REST::Client.new do |config|
    config.consumer_key        = "YOUR_CONSUMER_KEY"
    config.consumer_secret     = "YOUR_CONSUMER_SECRET"
    config.access_token        = "YOUR_ACCESS_TOKEN"
    config.access_token_secret = "YOUR_ACCESS_SECRET"
  end
  </code></pre>
  
  <p>When I try to use the client in the rails console, this is the error message I receive:</p>
  
  <pre><code>2.0.0p353 :001 &gt; client.update("I'm tweeting with @gem!")
  NameError: undefined local variable or method `client' for main:Object
  from (irb):1
  from /Users/user_name/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/commands/console.rb:90:in `start'
  from /Users/user_name/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/commands/console.rb:9:in `start'
  from /Users/user_name/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/commands.rb:62:in `&lt;top (required)&gt;'
  from bin/rails:4:in `require'
  from bin/rails:4:in `&lt;main&gt;'
  </code></pre>
  
  <p>Any idea what the issue is?</p>