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.
football-sources gem - get football data via web pages or web api (json) calls
Hello, I’ve put together the new football-sources gem / library that lets you get football data via web pages or web api (json) calls (and convert to Football.CSV format / datasets, for example). Happy data wrangling and enjoy the beautiful game with ruby. Cheers. Prost. PS: Do you know any good football data sources? Please, tell.
How Do I Update My Model from a checkbox?
Let’s say you have a Todo app, with a model Todo that has a string title, and a boolean field, completed. We are going to use Stimulus to update our model remotely on the server when we check off the todo. And we’re going to use a nifty JavaScript API called fetch() to make it all happen. https://onrails.blog/2020/11/09/updated-tutorial-how-do-i-update-my-model-from-a-checkbox/
How to GraphQL with Ruby, Rails, Active Record, and no N+1
You work on a mature web application that cleanly separates backend and frontend. The server-side code, written in Ruby, is mostly responsible for translating HTTP requests into SQL statements (with the help of an ORM) through rich and well-documented API. You choose GraphQL over REST to streamline your endpoints, but your database is not happy with all the extra queries. After much searching, you find an exhaustive hands-on guide on fighting N+1 from a fellow GraphQL-ing Rubyist at Evil Martians… Here it comes!
How to Dual Boot your Rails app
Running your app against two versions of Rails is easier than you might think. This is super handy for making sure your Rails app is prepared for the next version of Rails while still developing against the current stable version. Watch the screencast on How to Dual Boot your Rails app
Using ActionCable with ActiveJob in Rails 6 to execute OS commands
I recorded a video on how to use ActionCable with ActiveJob to execute OS commands & stream their result to the browser - https://www.youtube.com/watch?v=0aG4bzcAT0E [more inside]
From Editor to IDE
Visual Studio Code is a powerful editor by itself, but with the addition of a few extensions, we can turn it into a much more intelligent IDE. https://www.driftingruby.com/episodes/from-editor-to-ide
A Q&A with Nick Sutterer, creator of the Trailblazer framework
Nick is a developer, presenter, and lover of pubs who has created numerous tools and frameworks to scratch his itches with Rails. Full interview here.
Blockchain! - The blockchain-lite, ledger-lite, merkletree, centralbank moved...
Hello, I moved the blockchain-lite, ledger-lite, merkletree, centralbank, tulipmania, etc. gems to a new home / monorepo, that is, blockchain @ ruby code commons (coco). Happy blockchaining and growing money on (merkle) trees with ruby. Cheers. Prost.
Inserting from Datasets with Sequel
I wrote about different strategies for moving large amounts of data in your migrations, and how Sequel has your back when you want your database to to the work. https://janko.io/inserting-from-datasets-with-sequel/
First birthday for new ShinyCMS
Last year, I started a Ruby rewrite of ShinyCMS (an open source content management system, originally written in Perl). Recently I posted a short progress report on the project’s first birthday - including the current feature list, and some more general thoughts about the first 12 months.
Test automation based on Ruby stack and Gitlab CI
Hello. I’ve made a simple instruction if you want to start run integration tests, and would like to use some boilerplate. In article I tried to give explanations around all used libraries and bit about GitLab CI. Also in article you can find an example of using site_prism gem which is wrapper for Page Objects in ruby tests.
monofile gem - read monorepo / mono source tree definitions - a list of git projects
Hello, I’ve put together the monofile gem / library that lets you read in / parse monorepo / mono source tree definitions, that is, a list of git (and github) projects, and more. E pluribus unum. Make out of many, one. Cheers. Prost.
The Future of Bridgetown Today in v0.18 “Taylor Street”
We’re excited to announce the the release of Bridgetown 0.18, codenamed “Taylor Street”. This is an action-packed release which sets the tone for the future of Bridgetown and the broader Ruby web developer community. Check out the top highlights!
Split your Webpacker bundles to speed up the web
This is how we managed to reduce our main Webpacker bundle size by ~60% and raise the Lighthouse performance score by ~7 points on most pages, by splitting up the bundle. [more inside]
11 Terminal shortcuts that will make you Rockstar
Are you using mac book and still not feeling productive? Know these 11 terminal shortcuts that will make you the rockstar: https://blog.mayurkumar.info/11-Terminal-shortcuts-that-will-make-you-Rockstar/.