开发者

Set up RubyMine2 to run and debug a Sinatra app

开发者 https://www.devze.com 2023-01-25 16:50 出处:网络
Can anyone provide setup instructions for running and debugging a sinatra app in Rubymine?开发者_C百科Not sure if you found your answer on the JetBrains forum, but if not, here\'s what works for me in

Can anyone provide setup instructions for running and debugging a sinatra app in Rubymine?开发者_C百科


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.


With the current RubyMine (5.4) you can run it by creating a Rack Run/Debug configuration and specifying path to your config.rb file in there.

0

精彩评论

暂无评论...
验证码 换一张
取 消