Can't launch simple Sinatra app using rackup and jRuby (no response from web server)

前端 未结 4 1489
梦谈多话
梦谈多话 2021-02-05 17:52

I\'ve got a Sinatra \"hello world\" app that I am trying to run using jRuby. It works when I run the app, but not when I run rackup. Can anyone tell me what is going on here?

4条回答
  •  有刺的猬
    2021-02-05 18:24

    #config.ru
    require "./app.rb"
    
    set :bind, '0.0.0.0'
    set :port, 9292 #set your port!
    Sinatra::Application.run!
    

    try this code and type rackup

    Then you can get the results you want.

提交回复
热议问题