ruby - Loaded async_sinatra gem, but my program is not finding a method in it -
the gem in question async_sinatra. have installed, , ran bundle install in gemfile, keep getting same error:
nomethoderror: undefined method 'aget' main:object
anyway fix this?
notes: running latest sinatra, , using thin webserver, , running jruby 1.6.7.
the example code using is:
require 'sinatra/async' class asynctest < sinatra::base register sinatra::async aget '/' body "hello async" end end run asynctest.new
- rename file
config.ru
- make sure
require 'sinatra'
@ top of file - run
rackup config.ru
works me on osx 10.7 mri 1.9.3p125, thin 1.3.1, sinatra 1.3.2 , async_sinatra 1.0.0.
Comments
Post a Comment