5

I have built my API using the Grape API, would like to know how to debug it...

4

3 に答える 3

2

RackまたはRailsのいずれかを使用してGrapeAPIのテストを作成できます。これは、出力が期待どおりであることを確認するのに役立ちます。

https://github.com/intridea/grape#writing-tests

Sinatra / Grapeで動作するかどうかはわかりませんが、 Simplecovを追加して、ベースをカバーしていることを確認することもできます。

すでにテストを作成しても問題が解決しない場合は、発生しているエラーの詳細を教えてください。

于 2012-09-28T16:43:56.340 に答える
1

1.Install RubyMine and go to 'run'-> 'edit configurations'. 2.Click on the plus sign on the left corner of the window and select the configuration you want. 3. Name your configuration in the 'Name' textbox at the top and edit any default settings you want to change. 4. Apply breakpoints and run your server using the debugger mode. You are good to go :)

于 2012-10-15T06:18:30.777 に答える
0

Take a look at the racksh gem. It allows you start a development console similar to bundle exec rails console in Rails.

于 2020-07-28T18:38:29.357 に答える