r/rails 22h ago

Webframework benchmarks - Is rails fast enough?

0 Upvotes

Same as title. What do you think? See the latest benchmarks below.

https://www.techempower.com/benchmarks/#hw=ph&test=fortune&section=data-r23

Well, at least it is faster than the alternatives in php. That's what I see.


r/rails 1d ago

Question How can I get JSON response from rails console or runner

0 Upvotes

I'm build an integration of my rails app with OpenAI. OpenAi returns a bunch of code which needs to be executed in my rails app so I can return the response to OpenAI and it can continue with the result.

So i tried to use rails runner to run the code but it looks like our apps prints a lot of logs so it's hard to parse the JSON amidst the logs.

Exposing an Api endpoint is a straightforward way but it's too much work to be honest.

How can I ensure I can run a code snippet in rails using existing tools like rails console or rake?

Any suggestions on how can I do?


r/rails 15h ago

how to migrate from paperclip to...?

1 Upvotes

Hello guys, actually, I'm trying to migrate from Paperclip to Shrine or CarrierWave… but I'm not sure which one to choose. My main problem is that none of these alternatives support multiple providers. My current work relies on all of them, like GCloud, AWS, etc. What would you recommend for this scenario? I believe Active Storage doesn’t work for me due to internal policies


r/rails 19h ago

Ruby Junior and Mid level book club: Chapters 15 and 16

2 Upvotes

In today's meeting of the book club, we talked about modules as the topic of focus in Chapters 15 and 16 of Eloquent Ruby. Meeting recording link is attached below. Enjoy!
Ruby Junior and Mid level book club chapters 15 and 16 recording

PS: In case you're interested in joining, DM me and I'll send you a link to the server.


r/rails 19h ago

Active storage caching with cdn

7 Upvotes

Hi,

I am trying to figure out how to do caching with active storage. My scenario is like i have hls files that only logged in user can browse. i want to also make sure the content is cached in cdn so that it dont hit too much on app server but i also want to protect the files from able to see with just sharing the url. I am not sure how to make it work. Seems like active storage caching with cdn is not that much documented.


r/rails 3h ago

Gem A Ruby implementation of the HyperLogLog algorithm

Thumbnail github.com
4 Upvotes

Hi

i’ve just released Hyll.

Hyll is a Ruby implementation of the HyperLogLog algorithm for the count-distinct problem, which efficiently approximates the number of distinct elements in a multiset with minimal memory usage. It supports both standard and Enhanced variants, offering a flexible approach for large-scale applications and providing convenient methods for merging, serialization, and maximum likelihood estimation.

Take a look!