Found a similar post here but I am running a Mac so the first solution does not exactly apply and the second didn't work for me.
Running Mac OS 10.7.2, Xcode 4.2.1, rvm 1.10.1 using ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]
I believe the issue to due with rvm, however I do not know how to fix it
$ rails new dispatch_me $ rails generate controller demo index $ rails console Loading development environment (Rails 3.2.0.rc2) 1.9.3-p0 :001 > env = {} => {} 1.9.3-p0 :002 > env['REQUEST_METHOD'] = 'GET' => "GET" 1.9.3-p0 :003 > env['PATH_INFO'] = '/demo/index' => "/demo/index" 1.9.3-p0 :004 > env['rack.input'] = StringIO.new => #<StringIO:0x007f946db0ece0> 1.9.3-p0 :005 > ActionController::Dispatcher.new.call(env).last.body NameError: uninitialized constant ActionController::Dispatcher from (irb):5 from /Users/rudolph9/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0.rc2/lib/rails/commands/console.rb:47:in `start' from /Users/rudolph9/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0.rc2/lib/rails/commands/console.rb:8:in `start' from /Users/rudolph9/.rvm/gems/ruby-1.9.3-p0/gems/railties- 3.2.0.rc2/lib/rails/commands.rb:41:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' 1.9.3-p0 :006 >
I am following with the The Rails 3 Way
Again, I believe the issue to due with rvm, however I do not know how to fix it?
UPDATE: Maybe it doesn't have something to do with rvm, running native Ruby 1.8.7 and Rails 3.1.3 I run into the same issue:
>> ActionController::Dispatcher.new.call(env).last.body NameError: uninitialized constant ActionController::Dispatcher from (irb):6