What's the correct way to import ahoy with current JSP Rails 7 template?
What's the correct way to import ahoy using JSP with rails 7 template?
Watched the gorails ahoy & blazer video and went through the steps at https://github.com/ankane/ahoy.
Server side event creation is working from rails controllers, but I can't get client side to work in my javascript files.
Getting error
config/initializers/ahoy.rb
class Ahoy::Store < Ahoy::DatabaseStore
# set to true for JavaScript tracking
Ahoy.api = true
Ahoy.geocode = false
end
/app/javascript/application.js
/* eslint no-console:0 */
// Rails functionality
import Rails from "@rails/ujs"
import { Turbo } from "@hotwired/turbo-rails"
...
import 'ahoy'
...
Watched the gorails ahoy & blazer video and went through the steps at https://github.com/ankane/ahoy.
Server side event creation is working from rails controllers, but I can't get client side to work in my javascript files.
Getting error
" Could not resolve "ahoy"
when starting the server.config/initializers/ahoy.rb
class Ahoy::Store < Ahoy::DatabaseStore
# set to true for JavaScript tracking
Ahoy.api = true
Ahoy.geocode = false
end
/app/javascript/application.js
/* eslint no-console:0 */
// Rails functionality
import Rails from "@rails/ujs"
import { Turbo } from "@hotwired/turbo-rails"
...
import 'ahoy'
...
Notifications
You’re not receiving notifications from this thread.