Marcus S

Joined

650 Experience
4 Lessons Completed
0 Questions Solved

Activity

Wow!

This episode is incredibly relevant to me! I manage littlebirdelectronics.com.au, an Australian distributor for brands like Adafruit, SparkFun, Pololu, etc. For years, I've been using Ruby to scrape information from Adafruit and others to update our internal inventory systems.

We share with our customers the details about our local stock levels and how many additional units we can source for them.

Our internal systems, named Koi, are built on Jumpstart (jumpstartrails.com) and we use hatchbox.io for deployment. We've now opened Koi for other e-commerce merchants to use as well.

Recently, we've been developing "mini apps" (see an example) within Koi that execute the scraping code on AWS Lambda. This approach allows us to run code from other merchants in a secure, isolated environment.

One challenge we faced with AWS Lambda was using native binaries required by Nokogiri. Our solution was to use Docker to create a Lambda Layer containing the Nokogiri gem. We then stream the data back to merchants using Hotwire.

Most of the knowledge I've acquired on this journey has come from Gorails!

Thanks Chris for showing me just how small this world is!

Posted in Rails 7.1 Authentication From Scratch Discussion

Are you planning on moving away from Devise in JSP?

I'm using Hatchbox to deploy my Rails 7 application.
However, occasionally during deployment, I encounter the ActiveRecord::PreparedStatementCacheExpired error.
How can I avoid this issue to ensure uninterrupted deployments?

Nice episode! I'd love to see an example where the virutal column on one table is using data from another table!

Posted in Searchkick and Anycable-rails hangs server

It is not just w/ Anycable, I also see the same thing w/ just searchkick + elastic...

Posted in Reopen ActionCable after login?

Fantastic, thanks for the tip Chris!

Cheers,

Marcus

Posted in Reopen ActionCable after login?

Hey Folks,

I'm currently using Jumpstart and Stimulus Reflex.

After logging in, I am getting an error in the Browser's JS console:

The ActionCable connection is not open! `this.isActionCableConnectionOpen()` must return true before calling `this.stimulate()`

If I refresh the page (after being logged in), the websocket opens and all is good.

Is there a way I can reopen the ActionCable websocket after logging in?

Cheers,

Marcus

Posted in Introduction to Stimulus Reflex Discussion

Will this work out of the box with Cancancan?

Posted in How do I change the actioncable default path?

Hi there,

I have an ecommerce website that sells cables, and as such I'd like to use /cable, /cables etc in my base routes.
Unfortunately activecable uses the '/cable' path by default. Is there any way I can change this?

So far I've tried changing in my application.rb:

config.action_cable.url = "ws://www.example.com/actioncable"

Any thoughts would be much apprecaited!

Cheers,

Marcus

Posted in SEEKING FREELANCER, Colorado Springs, remote: true

Have you considered bundling up id3v2 or eyeD3 and sticking it on AWS lambda. You can then use S3 events to trigger the lambda.

Posted in cloudflare vs cloudfront vs ?

If you are using S3 it is pretty trivial to use it as as origin for cloudfront.

On an aside, you should also look at using webp w/poly fills to speed up your images

.

Posted in Align Images with Text

have you tried using prawn tables ?

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

© 2024 GoRails, LLC. All rights reserved.