The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Should I add typing to my Ruby project?
I’ve spent a lot of time recently investigating if I should adopt gradual typing in my Ruby projects and I’ve summarised my research in this post where I’ve picked 5 key criteria which I’ve seen mentioned most often by people that are using gradual typing successfully: Should I add typing to my Ruby project?
Added support of Rails 7.1 to actual_db_schema
Good news everyone! Today a new version (0.5.0) of the actual_db_schema (https://github.com/widefix/actual_db_schema) gem was released - Rails 7.1 support added. Huge thanks to Arkadiy Zabazhanov who made that impressive work - https://github.com/widefix/actual_db_schema/pull/30
Microservices Fails | Rubber Duck Dev Show 107
In this episode, we discuss how bad microservices can be: https://www.rubberduckdevshow.com/episodes/107-microservices-fails/
Detect Spam with AI
We can create a small python service that uses a Large Language Model (LLM) to detect if a message is spam or not. Using this service, we can tie it into our Rails application so that any comment created will be evaluated for being spam or not. We explore a few different routes on handling any messages flagged as spam. https://www.driftingruby.com/episodes/detect-spam-with-ai
The anatomy of a Turbo Stream
Why and how does a Turbo Stream make the DOM change? What do Turbo Streams have to do with web sockets? This article goes into the answers to these questions.
uniswap gem v0.0.1 - core uniswap v2 (dumb) contracts for ruby (rubysol)
hello, another little update from the rubidity & rubysol universe. i started a new experiment to package up the uniswap (facetswap) contracts into a gem (and convert to “more ruby-ish” rubysol syntax for easier documentation / testing / etc.). for the auto-generated contract docu. see rubydoc.info/gems/uniswap and for a contract sample, see the (work-in-progress) UniswapV2Pair. as always questions and comments welcome. yes, you are invited to join the rubidity & rubysol coding (programming) club. let’s study and learn together how the (dex - decentralized exchange and amm - automated market making) magic works.
Montreal.rb 2023/10 Elevate Your RoR Views w/ ViewComponent & Lookbook
The video for our local Montreal.rb Ruby Meetup Talk for 2023/10 titled “Elevate Your RoR Views w/ ViewComponent & Lookbook” (by Parham Ashraf) has been posted! [more inside]
A Deep Dive Into LiteDB for Ruby on Rails
In the second part of this series on LiteStack, we’ll explore LiteDB in detail, including type affinity and flexible typing: https://blog.appsignal.com/2023/11/01/a-deep-dive-into-litedb-for-ruby%20on-rails.html
Hanami v2.1.0.rc1
A stylish new welcome screen, next level assets flexibility, and our last stop before 2.1.0! https://hanamirb.org/blog/2023/11/01/hanami-210rc1/
Some tricks for simplifying Capybara queries
Capybara’s find
method is a lot more powerful than it first appears. In this post, I show how the find(:element, ...)
variation can be used to simplify a common type of query. Capybara also has an interesting configuration option related to test IDs. Check it out! https://mattbrictson.com/blog/simplify-capybara-selectors
An experiment of fully adding both Sorbet and RBS to a side project
To test how effective they are at finding defects, I did an experiment where I added both Sorbet and RBS fully to a side project and I wrote up the results and findings in a blog post: Experiment: Fully adding Sorbet and RBS to a small project.
Rails Generate Mailer (quick breakdown)
a quick breakdown of the rails generate mailer command
rubidity gem - rubidity classic / o.g. dsl builder for rubsol contracts
hello, in the ongoing rubidity & rubysol series i packaged-up and published a new gem, that is, rubidity that tries the impossible and square the circle, that is, a rubidity “classic / o.g.” dsl builder generating rubysol “more ruby-ish” contract classes. happy blockchaining with ruby / rubysol. now available in the more classic “solidity-ish” rubidity o.g. and more modern rubysol “ruby-ish” syntax styles. you decide.
Stack Overflow vs ChatGPT & AI's Impact | Rubber Duck Dev Show 106
In this episode, we discuss the differences between using Stack Overflow and ChatGPT for finding software development answers. We also discuss what the overall impact of AI might be in the future: https://www.rubberduckdevshow.com/episodes/106-stack-overflow-vs-chatgpt-ai-impact/
Benry-UnixCommand v1.0.0 released
Benry-UnixCommand v1.0.0 released. (Document) [more inside]
Glimmer DSL for LibUI Custom Shapes
Glimmer DSL for LibUI 0.10.1 & 0.10.0 ship with support for building and scaffolding Area Canvas Graphics Custom Shapes (with optional Gemification). Custom shapes represent higher-order graphical concepts, like cube
, cylinder
, and uml_class
, that could be formed out of more rudimentary shapes like rectangle
, circle
, bezier
, and text
, to aggregate and simplify interaction with them as coarse-grained components in a desktop application. Custom Shapes improve productivity significantly through code reuse in graphical desktop applications that rely on Area Canvas Graphics, like UML Diagramming tools, Traffic Control Signalling apps, and games… https://andymaleh.blogspot.com/2023/10/glimmer-dsl-for-libui-custom-shapes.html
FactoryBot for Rails testing
Dive into FactoryBot to ensure your testing data is reliable and consistent. https://www.honeybadger.io/blog/factorybot-for-rails-testing-md/
Limiting Maximum Index Name Length in Ruby on Rails 7.1
Read more about limiting Maximum Index Name Length in Ruby on Rails 7.1 [more inside]