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.
Reporting from ephemeral containers in production
Walkthrough of a vim/tmux workflow to report from Rails production environments https://withatwist.dev/reporting-on-the-fly.html
Announcing Pakyow v1.0
I’m happy to announce the v1.0 release of Pakyow! Years ago we set out to design a better way to build for the web. The result is a full stack of open-source frameworks that bring a simpler, design-first approach to let you create more with what you already know. Read the announcment.
How environment check works in Ruby on Rails?
In this article, we’re going to explore the following topics:
SudoRails - New release v0.5.0
A new version of SudoRails (https://github.com/markets/sudo_rails) v0.5.0 has been published 🚀. Mainly, includes a new feature to allow “infinite” sudo sessions and more styling customizations. See examples here.
Continuous Integration Explained
This guide is for you if you’re getting started with CI, or looking to level up with best practices.
Smuggle v0.6.0 released (gem for CSV imports and exports)
Smuggle helps you manage exports and imports with ease, separating the logic from the models.
Private Key, Public Key & Address - (Elliptic Curve) Crypto Programming w/ Ruby Notes
Hello, I’ve put together some notes and code samples / scripts about (elliptic curve) crypto programming w/ ruby that covers private key, public key and address. Enjoy the crypto summer. Cheers. Prost.
Adding devise_token_auth to an existing Rails app
If you want to introduce devise token authentication to your existing rails app which is already using devise this is for you [more inside]
GraphQL on Rails: A Three-Part Guide
The ultimate beginner-friendly walkthrough guide on creating GraphQL applications on Rails with React and Apollo by Evil Martians is now complete.
Different Ways to Set Attributes in ActiveRecord (Rails 5)
A cheat sheet outlining the different ways to set ActiveRecord attributes in Rails 5 https://scottbartell.com/2019/07/15/set-attributes-in-active-record-rails-5/
Tips for writing fast Rails
Minor adjustments in the code can lead to major performance improvements. In this article I talk about the use of ActiveRecord::Batches#find_each [more inside]
Debugging MySQL lock errors in Ruby on Rails
New week new bug to hunt down! A day after our last deployment at work, a new type of error started rising like a great wave. Random SQL update queries started failing at random with the following error: ActiveRecord::StatementInvalid: Mysql2::Error: Lock wait timeout exceeded; try restarting transaction: UPDATE users SET … [more inside]
Automatic HTTP interception & debugging for Ruby
Open a terminal, run a Ruby command, immediately see & debug everything your Ruby code is sending: https://httptoolkit.tech/view/ruby/
6 things missing from Rails
This is my list of patterns or types of objects you will see in Rails applications. http://kenglish.co/blog/2019/5/6-things-missing-from-rails
Why should you choose Ruby on Rails for your MVP?
The ever-growing worldwide community (around 4,000 contributors on GitHub) and the availability of gems are what still makes Ruby on Rails an suitable, fast and cost effective way to build MVPs in the eyes of startup owners. https://prograils.com/posts/why-should-you-choose-ruby-on-rails-for-your-mvp?utm_source=rubydaily&utm_medium=referral&utm_campaign=rails-mvp-1
How to take over a Ruby gem and what to do with it
Using Ruby gems is safe, right? We’re a nice community of friendly beings that act towards the same goal: making Ruby better. But is that true? Can we just blindly use libraries, without making sure, that they are what they are supposed to be? During this talk, I’ve wanted to present how you can take over a gem, what you can do with it once you have it and what you can do to protect yourself against several types of attacks you’re exposed to on a daily basis. Let’s exploit the Ruby gems world, and its data together.
Easy way to generate random strings following patterns
Generate strings supplying a simple pattern. Perfect to be used in test data factories. Validate if a text fulfills a specific pattern. Also you can use regular expressions (Regexp) to generate strings: /[a-z0-9]{2,5}\w+/.gen. Generate words in English or Spanish. https://github.com/MarioRuiz/string_pattern
3 Awesome Ways To Use Ruby’s Gsub Method
Did you know that you can use regular expressions with gsub? Ok, maybe you know that, but how about using a regular expression AND a block? That’s when it starts to get interesting. Read this article for examples: https://www.rubyguides.com/2019/07/ruby-gsub-method/
How to TDD when TDD is hard
Sometimes, test-driven development gets in the way, does more to confuse than guide, or generally just slows development to a monotonous crawl. Here’s a set of five go-to strategies I use to get out of test-fueled frustration, and back to productivity.