我试图使用 rollbar gem 来监视错误消息。我跟着它的文件。
添加gem 'rollbar'
, 和rails generate rollbar POST_SERVER_ITEM_ACCESS_TOKEN
.
(我确实改变了POST_SERVER_ITEM_ACCESS_TOKEN
我的钥匙)
但是在我运行之后rake rollbar:test
,它只扔Test error from rollbar:test
在仪表板中。
更新
初始化器/滚动条
Rollbar.configure do |config|
if Rails.env.test?
config.enabled = false
end
在控制台中
rake rollbar:test 16:21:14
Testing manual report...
[Rollbar] Scheduling item
[Rollbar] Sending item
[Rollbar] Success
[Rollbar] Details: https://rollbar.com/instance/uuid?uuid=1f4c4e35-df5f-4606-916d-d97341b01dc7 (only available if report was successful)
Setting up the controller.
Processing...
Started GET "/verify" for at 2016-12-02 16:21:21 +0800