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 create your own Rails 5.2+ Active Storage Previewers
ActiveStorage only comes with the ability to preview PDF and video files, but what if we want to support other file types? Check out how to create an Active Storage Previewer where we’ll use Powerpoint presentations as our example file type.
Metaprogramming: Ruby Hook Methods
Ruby comes with a bunch of hook methods that allow you to manipulate classes, modules and objects on the fly.. see more
How to use Rails Webpacker with NPM instead of Yarn
Webpacker is an awesome tool but it comes with Yarn. If you prefer to use NPM here is a guide how to use it with webpacker.
4 cool but less popular Rails features – part 1: ActiveJob, ActiveModel, command line
I never read the whole Rails guides and now when I’m translating them to my native language I discovered some cool features that I didn’t know about before. I hope this will be also useful for you! READ MORE
fugit 1.1.0 released
fugit is library for parsing cron, duration, and at time strings. It will be used by future version of rufus-scheduler. fugit 1.1.0 has been released. It now understands cron strings with time zones, like “0 0 * * sun Europe/Berlin” (every sunday at 00:00, Berlin time).
Ruby benchmarking basics and example case
As folks work towards a faster performance with Ruby 3X3 I dig a bit deeper into Ruby Benchmarking showing the basics, and diving into a specific example case.
base32-kai - New CryptoCollectibles Gem - 5-Bit Kai Notation/Alphabet Encoding
Hello, do you have (crypto) collectibles on the blockchain? Encode / decode your binary bits in 5-bit groups in the base32 / kai notation with the new base32-kai library /gem. What’s it for!? Use it for (crypto) kitties, copycats, and friends. Happy collecting and encoding / decoding bits & bytes. Cheers. Prost.
Private & Protected: a matter of Message
As a Ruby method is, behind the scene, a message handler associated with a block of instructions that returns an object, the private and protected policies are strongly correlated with the Ruby message concept.. see more
More yield_self awesomeness
The second yield_self-praising blogpost investigates some approaches to code that the new method brings. And also proposes better name for the method :)
Code editors for Mac
I am currently developing with Ruby on Rails, and my favorite editor is TextMate 2. In this article, I will explain my reasons for this by comparing it with other well-known editors: Sublime Text 3, Atom, Visual Studio Code and Brackets. https://medium.com/@davidmles/code-editors-for-mac-747fe90334d
Method Driven Development with the new 'interesting_methods' gem
I’ve created a new gem called interesting_methods that gemifies what some developers already do (add an interesting_methods method to all their objects).
http://smallcity.ca/2018/03/23/interesting-methods-gem.html [more inside]
webpacker & less & Semantic UI Theming
Some copy&paste instructions on how to make less and semantic ui theming work nicely with webpacker.
Bitcat - Bit catalog browser for digital bit(s) collections eg (crypto) kitties etc.
Hello, I’ve put together - bitcat - a little sinatra web app / server in ruby packaged up as a command line tool that lets you browse your digital bits(s) eg. crypto kitties and friends unchained (offline) using a single-file SQLite database eg. kitties.db. Note: Bitcat includes the gene reader from copycats in base32/kai notation and more. Happy collecting. Cheers.
RVM Gemset as a Freelancer
As a Ruby on Rails Freelancer since few years now, I have been worked in a bunch of projects. For each mission, the environment setup is very important as I’ve to be efficient quickly. This is where RVM Gemsets are important.. see more
Measuring what matters with SimpleCov
100% test coverage is an admirable goal, but it’s not the only measure of an effective test suite. Here’s how I use SimpleCov to guide my Rails application development.
Ameba - a static code analysis tool for Crystal
Ameba is a static code analysis tool for the Crystal language heavily inspired by Rubocop. It enforces a consistent Crystal code style, also catches code smells and wrong code constructions.
RuboCop-based static code analyzer for enterprise Rails applications
After everyday PR code reviews, I tried to automate it as much as I can. When Rubocop is more about code style, Ducalis is aimed at application logic and follow-up code support. [more inside]
How to add React JS to your Ruby on Rails App with Webpacker!
This tutorial will guide you on how to create a Ruby on Rails application and add the power of webpacker and React JS to it. [more inside]
How Kajabi Got to a 10-minute CI Build for 100k Lines of Rails Code
Kajabi has a 10-minute CI build for 100k lines of Rails code. Find out how they run Rails tests in parallel with Semaphore Boosters: https://semaphoreci.com/blog/2018/03/21/kajabi-10-minute-rails-ci-build.html
How to win friends and open-source your software
Traveling Ruby, one of Phusion’s open source projects, gets a massive overhaul. Find out how to make your work pull request-ready: https://blog.phusion.nl/2018/03/21/how-to-win-friends-and-open-source-your-software/
Octopod Updated - Build Podcast / Radio Talk Show (Static) Websites 'n' Feeds
Hello, Thanks to Stephan Haslinger et al for pushing out a new update for Octopod that lets you publish / build (static) websites incl. feeds (in xml and json) for your podcasts and radio talk shows with Jekyll (and Ruby) and (structured) text in kramdown for your show notes etc. Find out more @ https://rubygems.org/gems/jekyll-octopod and https://jekyll-octopod.github.io. Happy publishing with Jekyll and friends (in ruby).
Ruby Object Model - Part 1
Ruby is a fully object-oriented programming language. But what does that really mean ? In this series of articles, we’ll try to demystify the Ruby Object Model.. see more
SOLID Principles #3 - Liskov Substitution Principle
Five-part series of blog posts about SOLID Principles. This one is about the third of them - Liskov Substitution Principle: [more inside]
3 things that slow down and make your RSpec tests worse
Find out why some of the RSpec matchers are bad and why you should avoid using FactoryGirl.build READ MORE
Interactive diagramming application for Rails
Hello, I created an open source project that helps people familiarize themselves with a new Rails database. I provided the link to the Github page below for anyone interested in reading more about the project or for anyone looking to contribute. Thanks! [more inside]