Brian Carpenter


2,330 Experience
8 Lessons Completed
2 Questions Solved


Posted in How to use Uppy with ActiveStorage Discussion

I built a stimulus controller for this but ran into some issues getting the uppy stylesheets to load. I spent a lot of time trying to figure it out. Putting details here so I don't lose them or perhaps they can be helpful for somebody else. This solution is using an, as of now, unmerged request to excid3/uppy-activestorage-upload so you may/may not want to use it as a dependency.

Found this video which figures out a working solution using an unmerged pull request from excid3/uppy-activestorage-upload by puglet5/uppy-activestorage-upload.

For me relevant parts are at 1:20:26

let uppy = new Uppy({
autoProceed: false,
allowMultipleUploads: true,
debug: true,
logger: Uppy.debugLogger


package.json changed:

"dependencies": {
"@excid3/uppy-activestorage-upload": "",

"@excid3/uppy-activestorage-upload": ""

yarn install

Posted in Tracking Metrics with Ahoy and Blazer Discussion

Anyone using Ahoy on rails 7? Server side is working fine but getting errors on client side that "ahoy is not defined"

gem file

gem "ahoy_matey"


class Ahoy::Event < ApplicationRecord
  include Ahoy::QueryMethods

  self.table_name = "ahoy_events"

  belongs_to :visit
  belongs_to :user, optional: true


class Ahoy::Visit < ApplicationRecord
  self.table_name = "ahoy_visits"

  has_many :events, class_name: "Ahoy::Event"
  belongs_to :user, optional: true

console output

player.js:23 Uncaught ReferenceError: ahoy is not defined
    at togglePlay (player.js:23:7)
    at HTMLAnchorElement.<anonymous> (player.js:14:9)


ahoy.track("Played Audio", audio_detail)


class Ahoy::Store < Ahoy::DatabaseStore

  Ahoy.api = true

  Ahoy.geocode = false

Typing ahoy.track("test") directly in console also return the same error.

Any help/thoughts?

Found this link on how to reference a blob for use with another model.

I'd like to access a file object that already exists in active storage and re-attach it to another model. Something like

Is this possible?

Variations of rails_blob_path and url_for methods produce invalid signature errors.

Posted in Go Rails' Stripe lesson and strong params


Very helpful, thanks.

I have a situation where I'm generating N post requests for given table in a vuejs app, but sending them to the rails controller one by one. I'd like to batch them all up in the app as a JSON object, then send one request over and let rails parse it out.

Would this be as simple as writing a custom controller action?

Wondering if rails has a framework/method for handling batch requests or if there's some standard approaches I should be using.


Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2023 GoRails, LLC. All rights reserved.