简体   繁体   中英

Set up RubyMine2 to run and debug a Sinatra app

任何人都可以提供在Rubymine中运行和调试sinatra应用程序的设置说明吗?

Not sure if you found your answer on the JetBrains forum, but if not, here's what works for me in RubyMine 3.2.4.

My config.ru looks like:

require './app'
run Sinatra::Application

In a simple app.rb file, put a break point on the "Hello World" line below:

get '/' do
  "Hello World"
end

Just right-click on the app.rb or config.ru file, and select 'Debug "app"' from the context menu. You should hit your break point when you load the page.

Hope this helps.

使用当前的RubyMine(5.4),您可以通过创建Rack Run / Debug配置并在其中指定config.rb文件的路径来运行它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM