在安装 Ahoy Gem 并添加
ahoy.trackAll();
到我application.js
的/undefined
. 我试过卸载并重新创建数据库,但没有运气。
这是服务器日志。
SQL (0.3ms) INSERT INTO `ahoy_events` (`id`, `visit_id`, `name`, `properties`, `time`) VALUES (x'438ffd6f7d4c4291876441fa2b5dcdf0', x'61671132b25b4f169a54ece65dc524b3', '$view', '{\"url\":\"http://localhost:3000/\",\"title\":\"Title\",\"page\":\"/\"}', '2015-08-10 20:12:57')
(30.7ms) COMMIT
Completed 200 OK in 161ms (Views: 0.2ms | ActiveRecord: 68.8ms)
Started GET "/undefined" for ::1 at 2015-08-10 16:12:59 -0400
ActionController::RoutingError (No route matches [GET] "/undefined"):