astaire-old icon indicating copy to clipboard operation
astaire-old copied to clipboard

Astaire is unable to route requests due to missing _routes method.

Open postmodern opened this issue 13 years ago • 0 comments

I attempted to use Astaire edge with actionpack 3.0.0.rc.2, with the following hello world app:

require 'bundler'

Bundler.setup

require 'astaire'

class MyController < ActionController::Base

  include Astaire::DSL

  get '/hello' do
    render :text => 'Hello'
  end

end

run MyController

I received this exception when sending the app requests:

NameError: undefined local variable or method `_routes' for MyController:Class
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.0.rc2/lib/action_controller/metal/url_for.rb:23:in `action_methods'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.0.rc2/lib/abstract_controller/base.rb:141:in `action_method?'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.0.rc2/lib/abstract_controller/base.rb:189:in `method_for_action'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.0.rc2/lib/action_controller/metal/hide_actions.rb:19:in `method_for_action'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.0.rc2/lib/action_controller/metal/implicit_render.rb:14:in `method_for_action'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.0.rc2/lib/action_controller/metal/compatibility.rb:63:in `method_for_action'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.0.rc2/lib/abstract_controller/base.rb:111:in `process'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.0.rc2/lib/abstract_controller/rendering.rb:40:in `process'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.0.rc2/lib/action_controller/metal.rb:133:in `dispatch'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.0.rc2/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.0.rc2/lib/action_controller/metal.rb:173:in `block in action'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.12/lib/rack/mount/route_set.rb:148:in `call'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.12/lib/rack/mount/route_set.rb:148:in `block in call'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.12/lib/rack/mount/code_generation.rb:93:in `block in recognize'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.12/lib/rack/mount/code_generation.rb:68:in `optimized_each'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.12/lib/rack/mount/code_generation.rb:92:in `recognize'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/rack-mount-0.6.12/lib/rack/mount/route_set.rb:139:in `call'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.0.rc2/lib/action_dispatch/routing/route_set.rb:492:in `call'
/home/hal/.rvm/gems/ruby-1.9.2-p0/bundler/gems/astaire-c7f693d/lib/astaire.rb:105:in `call'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/lint.rb:48:in `_call'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/lint.rb:36:in `call'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/showexceptions.rb:24:in `call'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/commonlogger.rb:18:in `call'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/content_length.rb:13:in `call'
/home/hal/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/handler/webrick.rb:52:in `service'
/home/hal/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/home/hal/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/home/hal/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

postmodern avatar Aug 25 '10 01:08 postmodern