title: expecting keyword_end, but -w flag says "Syntax OK"
body: <p>New to rails. I'm getting the dreaded "syntax error, unexpected $end, expecting keyword_end"</p>
  
  <p>but when I run it through   </p>
  
  <pre><code>ruby -wc sessionscontroller.rb
  </code></pre>
  
  <p>it says "Syntax OK". What am I missing?   </p>
  
  <p>Here is the code:</p>
  
  <pre><code>class SessionsController &lt; ApplicationController
    def create
      auth = request.env["omniauth.auth"]
      user = User.find_by_provider_and_uid(auth["provider"], auth["uid"]) || 
                                User.create_with_omniauth(auth)
      session[:user_id] = user.id
      redirect_to root_url, :notice =&gt; "Signed in!"
    end
  end
  </code></pre>
  
  <p>This is copypasta direct from a railscast, and I am confused why it does not work. Thanks!</p>
  
  <p>EDIT 2: Exact message:</p>
  
  <p>SyntaxError in SessionsController#create</p>
  
  <pre><code>C:/Users/xxx/Sites/test.yyyy/app/models/user.rb:8: syntax error, unexpected $end, expecting keyword_end
  
  Rails.root: C:/Users/xxx/Sites/test.yyyy
  Application Trace | Framework Trace | Full Trace
  
   app/controllers/sessions_controller.rb:4:in `create'
  </code></pre>
  
  <p>EDIT: The stack trace:</p>
  
  <pre><code>activesupport (3.1.1) lib/active_support/dependencies.rb:456:in `load'
  activesupport (3.1.1) lib/active_support/dependencies.rb:456:in `block in load_file'
  activesupport (3.1.1) lib/active_support/dependencies.rb:640:in `new_constants_in'
  activesupport (3.1.1) lib/active_support/dependencies.rb:455:in `load_file'
  activesupport (3.1.1) lib/active_support/dependencies.rb:342:in `require_or_load'
  activesupport (3.1.1) lib/active_support/dependencies.rb:489:in `load_missing_constant'
  activesupport (3.1.1) lib/active_support/dependencies.rb:181:in `block in const_missing'
  activesupport (3.1.1) lib/active_support/dependencies.rb:179:in `each'
  activesupport (3.1.1) lib/active_support/dependencies.rb:179:in `const_missing'
  activesupport (3.1.1) lib/active_support/inflector/methods.rb:124:in `block in constantize'
  activesupport (3.1.1) lib/active_support/inflector/methods.rb:123:in `each'
  activesupport (3.1.1) lib/active_support/inflector/methods.rb:123:in `constantize'
  activesupport (3.1.1) lib/active_support/dependencies.rb:528:in `block in initialize'
  activesupport (3.1.1) lib/active_support/dependencies.rb:550:in `yield'
  activesupport (3.1.1) lib/active_support/dependencies.rb:550:in `default'
  activesupport (3.1.1) lib/active_support/dependencies.rb:550:in `[]'
  actionpack (3.1.1) lib/action_dispatch/routing/route_set.rb:61:in `controller_reference'
  actionpack (3.1.1) lib/action_dispatch/routing/route_set.rb:46:in `controller'
  actionpack (3.1.1) lib/action_dispatch/routing/route_set.rb:25:in `call'
  rack-mount (0.8.3) lib/rack/mount/route_set.rb:152:in `block in call'
  rack-mount (0.8.3) lib/rack/mount/code_generation.rb:96:in `block in recognize'
  rack-mount (0.8.3) lib/rack/mount/code_generation.rb:75:in `optimized_each'
  rack-mount (0.8.3) lib/rack/mount/code_generation.rb:95:in `recognize'
  rack-mount (0.8.3) lib/rack/mount/route_set.rb:141:in `call'
  actionpack (3.1.1) lib/action_dispatch/routing/route_set.rb:532:in `call'
  omniauth (1.0.1) lib/omniauth/strategy.rb:366:in `call_app!'
  omniauth (1.0.1) lib/omniauth/strategy.rb:330:in `callback_phase'
  omniauth-oauth (1.0.0) lib/omniauth/strategies/oauth.rb:57:in `callback_phase'
  omniauth (1.0.1) lib/omniauth/strategy.rb:204:in `callback_call'
  omniauth (1.0.1) lib/omniauth/strategy.rb:166:in `call!'
  omniauth (1.0.1) lib/omniauth/strategy.rb:148:in `call'
  omniauth (1.0.1) lib/omniauth/builder.rb:34:in `call'
  sass (3.1.10) lib/sass/plugin/rack.rb:54:in `call'
  actionpack (3.1.1) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.3.5) lib/rack/etag.rb:23:in `call'
  rack (1.3.5) lib/rack/conditionalget.rb:25:in `call'
  actionpack (3.1.1) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.1.1) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.1.1) lib/action_dispatch/middleware/flash.rb:243:in `call'
  rack (1.3.5) lib/rack/session/abstract/id.rb:195:in `context'
  rack (1.3.5) lib/rack/session/abstract/id.rb:190:in `call'
  actionpack (3.1.1) lib/action_dispatch/middleware/cookies.rb:331:in `call'
  activerecord (3.1.1) lib/active_record/query_cache.rb:62:in `call'
  activerecord (3.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:477:in `call'
  actionpack (3.1.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (3.1.1) lib/active_support/callbacks.rb:392:in `_run_call_callbacks'
  activesupport (3.1.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.1.1) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
  actionpack (3.1.1) lib/action_dispatch/middleware/reloader.rb:68:in `call'
  rack (1.3.5) lib/rack/sendfile.rb:101:in `call'
  actionpack (3.1.1) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
  actionpack (3.1.1) lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
  railties (3.1.1) lib/rails/rack/logger.rb:13:in `call'
  rack (1.3.5) lib/rack/methodoverride.rb:24:in `call'
  rack (1.3.5) lib/rack/runtime.rb:17:in `call'
  activesupport (3.1.1) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.3.5) lib/rack/lock.rb:15:in `call'
  actionpack (3.1.1) lib/action_dispatch/middleware/static.rb:53:in `call'
  railties (3.1.1) lib/rails/engine.rb:456:in `call'
  railties (3.1.1) lib/rails/rack/content_length.rb:16:in `call'
  railties (3.1.1) lib/rails/rack/log_tailer.rb:14:in `call'
  rack (1.3.5) lib/rack/handler/webrick.rb:59:in `service'
  C:/Users/dps42/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
  C:/Users/dps42/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
  C:/Users/dps42/RailsInstaller/Ruby1.9.2/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
  </code></pre>