Bill Gilbert

Joined

630 Experience
6 Lessons Completed
0 Questions Solved

Activity

Posted in How to use Action Mailbox in Rails 6 Discussion

Little late to the party, but I'll add my voice to those hoping for a full gmail action mailbox example, especially in production.

Posted in Direct File Uploads to S3: Part 2 Discussion

Thanks to a kind soul on another site, I was informed that

mount ImageUploader::UploadEndpoint => "/images/upload"

must now be changed to:

mount ImageUploader.upload_endpoint(:cache), at: "/images/upload"

Hopefully this helps others with the same issue.

Posted in Direct File Uploads to S3: Part 2 Discussion

Hey there. Running into an issue when I first fire up the rails server. An error " A rack application must be specified (ArgumentError)" pops up. I checked my routes and everything looks to be the same as in the video.

 Rails.application.routes.draw do
   mount ImageUploader::UploadEndpoint => "/images/upload"

  resources :photos

  root to: "photos#index"
end

Is there something else I'm missing?

Update: The issue seems to be with the way the image uploader is mounted. I remove that line and the app fires up just fine, but of course can't upload an image. Is there a better way to write this or does the issue lie with something like the shrine.rb initializer?

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.