ruby - What goes in config.ru for a non-rails app on heroku? -
i have simple ruby (non-rails) app uses resque, , won't start without config.ru on heroku. when add config.ru file following error when running rackup
locally:
/usr/local/cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:133:in `to_app': missing run or map statement (runtimeerror) /users/nickkarrasch/dropbox/coding/ruby/smsnotifyv2/config.ru:in `<main>' /usr/local/cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval' /usr/local/cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string' /usr/local/cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file' /usr/local/cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config' /usr/local/cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:199:in `app' /usr/local/cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app' /usr/local/cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:250:in `start' /usr/local/cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:141:in `start' /usr/local/cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>' /usr/local/cellar/ruby/1.9.3-p194/bin/rackup:23:in `load' /usr/local/cellar/ruby/1.9.3-p194/bin/rackup:23:in `<main>'
what need put in config.ru?
the content of file (config.ru), depend on you're trying , framework you're using since used configuring rack applications, tells rack::builder
middleware should used , in order. these of examples offered in heroku documentation for deploying rack applications.:
sinatra:
require './hello' run sinatra::application
ramaze:
require ::file.expand_path('./../hello', __file__) ramaze.start(:file => __file__, :started => true) run ramaze
camping
require './hello' run rack::adapter::camping.new(hello)
Comments
Post a Comment