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.
WordpRSS - a simple gem to help with the RSS aggregation app creation
Have you ever thought about building an RSS aggregator app with Rails? If yes then I have some goods news for you. I created WordpRSS – a simple Ruby gem that will help you to pull the data from any WordPress RSS channel. READ MORE
Ruby Bitwise Operators
An operator is bitwise when instead of treating integers as whole numbers, it treats them as a sequence of bits. [more inside]
Turbolinks, Stimulus, and React living in harmony
I recently started porting our React SPA back to Rails where it made sense and found a nice way to use Turbolinks, Stimulus, and React together along the way. [more inside]
Full text searching Linux man pages with Elasticsearch
A post about playing around with the elasticsearch gem to index Linux man pages for full text searching. Ruby script on GitHub.
class_eval vs module_eval
Adding methods or attributes to a class/module “on-the-fly” is a pretty common pattern in Ruby (activerecord, activesupport, rake, rack, etc..). [more inside]
Ruby 2.5 supports measuring branch and method coverages
Ruby 2.5 has added many features to know precisely what line of code has been executed and how many times. This blog discusses all that and much more. [more inside]
Profiling Ruby’s Memory Allocation with TCmalloc
Everytime Ruby needs to request memory from the operating system it has to call the malloc function… https://www.rubyguides.com/2018/04/ruby-tcmalloc-profiling/
Microservices for Startups: An Interview with Oleksiy Kovyrin of Swiftype
Oleksiy Kovyrin of Swiftype offers great insights into thoughtfully extracting microservices from a monolith and the costs and benefits of doing so. Swiftype is the leading platform for Site Search and Enterprise Search that powers search for thousands of enterprises and websites.
Easily transform hash keys in API data
The hash_key_transformer gem makes it easy to deeply transform a JSON-like data structure from one style of key to another (from camelCase to snake_case, for example). Useful when providing JSON data to a JavaScript client or receiving JSON data in a Rails controller action. See more
Lies, Damn Lies, and the State of Testing in Rails
How much do Rails developers really write tests? Take a data-driven look into test coverage and CI speed of commercial Rails apps running on Semaphore. Read the report →
Hanami v1.2.0
HTTP/2 Early Hints, Unobtrusive JavaScript (UJS), new error page based on better_errors, CLI hooks, project middleware, enhanced support for plugins, custom repositories commands, coloured logging, bug fixes. Starting from tomorrow we’ll team with ROM and DRY teams to build Hanami 2, ROM 5, and DRY 1. http://hanamirb.org/blog/2018/04/11/announcing-hanami-120.html
The yield keyword
The yield keyword — in association with a block — allows to pass a set of additional instructions during a method invocation.. see more
Cache your assets with S3 for your Elastic Beanstalk
A few tips to improve the speed of deploying new instances of your rails application in an AWS elasticbeanstalk environment https://tomk32.github.io/2018/03/18/rails-on-elasticbeanstalk.html
Debug with Metaprogramming in Ruby
Have you ever been unable to reproduce a bug in development? Here are some ways to get insights from your staging console.
Ruby-Devscoop: Issue #7
Feel free to browse the issue #7 of the Ruby-Devscoop Newsletter here
The Missing Ruby Reference
Here is modern-looking, actual, comprehensive Ruby reference is compiled from Ruby source and other sources. And a blog post about it.
How to Migrate a Ruby on Rails App from Heroku to Dokku
Dokku is dev ops for dummies and a cheaper alternative to Heroku. Recently I’ve migrated a couple of my projects to it. In this blog post, I will describe how to setup and migrate a Rails app to Dokku with PostgreSQL, Sidekiq, Redis and Let’s Encrypt or Cloudflare for free SSL. [more inside]
Um pouco sobre IRB (A little bit about IRB)
Oi, como vai? O post de hoje fala um pouco sobre o IRB, vai lá dar uma olhadinha! https://merubygirl.wordpress.com/2018/04/06/manda-que-eu-faco/ [more inside]
Code editors for Mac (III)
In this last part of the series, I’m going to compare two of the features I use most in my work: project search and open quickly. https://medium.com/@davidmles/code-editors-for-mac-iii-3c40dd6986b9
persistent-💎: a ruby gem for beautiful immutable data structures
A gem with a simple objective: make programming with immutable data structures in Ruby as joyful and frictionless as using the built-in Array and Hash classes. So easy, in fact, that using immutable structures becomes the norm, rather than the exception.
Persistent-💎 gives you a very tidy syntax for creating immutable: arrays (my_array = a💎[1, 2, 3]; hashes (my_hash = h💎[key1: 'foo', key2: 'bar']; and sets (my_set = s💎[:sephiroth, :kills, :aeris]). See project website for more details!
4 levels of the data validation in a Rails application you should be aware of
If you receive a user input in your application, you need a validation – no doubt about it. When thinking about the validation in a Ruby on Rails application we used to think about a model validation in the first place. But how about other levels of the validation? READ MORE
Content Security Policy coming to Rails 5.2 - the full guide on how to introduce it
This header helps to reduce or completely remove Injection and information leakage vulnerabilities. A basic Content Security Policy is easy, but for an effective one you’ll need a CSP strategy.