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.
DRY up your structured plain-text files with ERB
I had a huge Markdown file (used to generate a presentation) that had many repeated elements. It was getting hard to keep those repeated elements consistent. So I slapped a method to output the formatting I need in ERB tags directly within the file, threw an .erb extension on the file name, and used the “erb” command-line tool to render it. You can make managing your plain-text files easier, too, with the details in this blog post!
Host a Secure Private Gem Server
Host a Secure Private Gem Server With LDAP Authentication and Authorization https://medium.com/better-programming/hosting-a-private-gem-server-2288249caf77
TrianglePattern Gem
https://github.com/hendrixfan/triangle I made a Gem to generate colorfull triangle patterns. You can use the resulting SVGs as background image for your Project. [more inside]
How we migrated from Timecop to built-in Rails 5.2 helpers
If you use Timecop to freeze time in your Ruby on Rails application you may not need it anymore. There have been handy helper methods since version 5.2. https://frontdeveloper.pl/2020/03/how-we-migrated-from-timecop-to-built-in-rails-5-2-time-helpers/
Ruby's Bitwise Toolbox: Operators, Applications and Magic Tricks
How often do you think about the bits – the ones and zeroes – that make up your app’s data? If you’re doing web development in Ruby there’s rarely any need to. But what if you want to interact with the operating system or a piece of hardware? What if you’d like to understand network protocols or databases? In that case, a solid understanding of bitwise operators is foundational. In this article José M. Gilgado will introduce you to bitwise operations in Ruby, give practical examples of how they can be useful, and finish big with with some fun math tricks. https://www.honeybadger.io/blog/ruby-bitwise-operators/
tablesmith 0.5.0 released
Yet another console table tool, focused on minimal config. [more inside]
How to properly monkey-patch a Ruby Class in Ruby on Rails?
Sometimes, when we use an existing Ruby Class from a third-part gem, we need to monkey-patch it to fit our project’s needs. Will you use class_eval or Module#prepend ? Hint: Not the first one :) [more inside]
Using Active Storage in Rails 6
A step-by-step guide to setting up Active Storage in a Rails 6 app, encrypting credentials, and uploading files to Amazon S3 in production.
opmlparser gem - read / parse outlines (incl. feed subscription lists) in OPML
Hello, I’ve bundled up a new alternate opmlparser gem that lets you read / parse outlines (incl. feed subscription lists) in the OPML (Outline Processor Markup Language) format in xml. Use OPML.load or OPML.load_file to get back a “plain standard vanilla” hash table or use Outline.parse or Outline.read to get back outline struct(ure)s. Cheers. Prost.
Integration of Google BigQuery in Rails
checkout my latest blog post about how to integrate Google BigQuery in Rails application and sync data in-between. https://kushalmistry.wordpress.com/2020/03/09/google-bigquery-integration-into-rails/
How lucky I am to have a chance to work with a well written Rails app
Some personal observations on how different development approaches can be and a few opinionated code-organization tips https://link.medium.com/e2QHQ7C6G4
How to run System Specs in DockerContainers with RSpec, Capybara, Chrome, & Selenium
Rails makes system specs easy to configure in a standard environment, but configuring them in a containerised environment can be a little trickier, and more so if you are using RSpec rather than Rails’ default minitest framework. [more inside]
CKEditor 5 + Rails app
https://new-ckeditor-demo.herokuapp.com/ Demo of CKEditor 5 + Rails (and some other my gems which I put on a single demo app). [more inside]
barcharts gem: print barcharts in your terminal in ascii or w/ unicode block elements
Hello, I’ve bundled up a little barcharts gem / library that lets you print barcharts in your terminal in ascii (e.g. use *) or with unicode block elements (e.g.use ` ▏▎▍▋▊▉`). Happy number crunching and visualizing with ruby. Cheers. Prost.
🐐 Herding files – and goats – with git
When refactoring Rails apps, it’s common to rename the file at the same time to follow Rails’ conventions. It’s pretty easy to accidentally lose git history this way, so I wrote some tips about how to deal with it. Plus, bonus goats! 🐐 [more inside]
What's new in Kiba ETL v3 (visually explained)
Kiba ETL is an open-source data processing framework for Ruby, now available in v3. In this new article (with animated SVG), I detail the changes and explain how they improve the way you will write data pipelines with Kiba. Hope you’ll enjoy it! [more inside]
What does API really mean?
API has become one of those catch-all terms that developers throw around without really considering the context. Let’s dive into what is really an API?