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.
How to Deal with 1,000 Failing Specs in a Rails App
Are you staring down the face of a Rails app with a multitude of failing specs? Here are some strategies to chip away at failing specs during an upgrade – and keep your sanity in the process. Read the post.
[Podcast] Interview with Mike Perham from Sidekiq
This week on the Maintainable podcast, Robby Russell speaks with Mike Perham, Founder and CEO at Contribsys and author of Sidekiq and Faktory. They discuss the pros and cons of using external dependencies, how Mike built a business off of his open source project, Sidekiq, and the dIfference in maintaining Ruby vs Go software projects. [more inside]
[Screencast] Emojis from Scratch
In this episode, we look at attaching emojis to our comments model, allowing them to fill in some emotional cues. https://www.driftingruby.com/episodes/emojis-from-scratch
Error handling with Monads in Ruby
Many modern languages, including Ruby, use Exceptions as the primary method of error handling. [more inside]
tty-exit: terminal exit codes for humans and machines
The tty-exit is here to provide human friendly and standard way to use exit status codes in command-line applications. Instead of saying exit(64), you can say exit_with(:usage_error). It is so much nicer! Wouldn’t you agree? That’s why tty-exit gathers a list of all the most common exit codes as used by POSIX-compliant tools on different Unix systems for you to use. Enjoy!
All the different ways to set attributes with Active Record on Rails 6
I put together a handy guide comparing all the different ways you can set attributes on an Active Record object in Rails 6. At a glance the cheat sheet shows you which methods save to the database, run validations, run callbacks, update timestamps, etc.
Open Dota API Ruby
Gem is now extended with Players Endpoint - https://github.com/vergilet/open_dota_api
A guide to NPM version constraints for Rubyists
Now that more Rails projects use NPM to manage JavaScript dependencies, I thought it would be useful to provide a reference guide to NPM version constraints in comparison with similar conventions used to specify Ruby dependencies in a Gemfile. https://rossta.net/blog/npm-version-constraints-for-rubyists.html
SimpleCov v0.18 released with support for branch coverage
At long last SimpleCov has received a major update with support for the branch coverage added to the Coverage standard library module introduced in Ruby 2.5
Ruby on Rails project RuboCop setup with RSpec
RuboCop is the most popular Ruby static code analyzer and code formatting, code linter in short. Linting is the process of running a program that analyzes the code for programmatic and stylistic errors. [more inside]
A Rubyist's Introduction to Character Encoding, Unicode and UTF-8
Have you ever dealt with a unicode bug? Where plain text — the substance you work with all day — can no longer be trusted? It can be disorienting to say the least! This article will help prepare you so that the next time that happens you’ll be able to spend less time hyperventilating and more time troubleshooting. Check it out on our blog: https://www.honeybadger.io/blog/the-rubyist-guide-to-unicode-utf8/
screen-recorder v1.4.0 released with support for audio and screenshot capture.
Ruby gem to video record or take screenshots of your computer screen - desktop or specific window. Works on Windows, Linux, and macOS. https://github.com/kapoorlakshya/screen-recorder
planet.rb quick starter script v1.0 - (auto-)add blog posts to your (static) website
Hello, I’ve updated (and un-gemified) the planet.rb quick starter script v1.0 that lets you add articles & blog posts to your static (jekyll & friends) website via feeds (and planet pluto). Happy planet! Prosit 2020! PS: You can find a live sample “Planet Ruby” website built with the planet.rb quick starter script (and jekyll / github pages) online @ http://feedreader.github.io/jekyll.planet.sample. For a great real-world example / setup see the “Planet OpenSUSE - Linux OS” @ https://github.com/openSUSE/planet-o-o.