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.
Why the Ruby community encourages Duck Typing
rubycademy.com/duck-typing-in-ruby
Intro to Docker for Ruby developers
The simplest thing you can do with Docker is to fire up an IRB session in Docker.
Dockerized development environment for hacking Ruby MRI
This is how I’m hacking Ruby itself: github.com/palkan/ruby-dip. [more inside]
Fast JSON API Serializer by Netflix in Ruby On Rails
Want better performance in Ruby on Rails? Here’s how Fast JSON API Serializer can help you by exposing more information as compared to Active Model Serializer. https://www.botreetechnologies.com/blog/fast-json-api-serializer-by-netflix-in-ruby-on-rails
To ERB and Beyond! What’s New in Bridgetown 0.16 “Crystal Springs”
It’s the height of summer, and we’re here with a real treat for Rubyists everywhere! At last you can have your cake and eat it too with the release of Bridgetown 0.16 “Crystal Springs”—write site templates in your choice of ERB, Haml, or Slim all while enjoying the benefits of Bridgetown’s Jekyll-inspired ease of configuration and rapid content development process. Read the announcement post for all the details.
Objects are functions! Treat any Object or Class as a Proc (like Enum
https://github.com/delonnewman/invokable - A function is a mapping of one value to another with the additional constraint that for the one input value you will always get the same output value. So, conceptually, Ruby Hashes, Arrays, and Sets are all functions. Also, there are many one method objects out there (e.g. Service Objects) that are essentially functions. Why not treat them as such?
Charge Customers Later Using Stripe With Ruby on Rails
Confused about how to integrate STRIPE for online payments? Here’s a quick guide that outlines the process in a few simple steps - https://www.botreetechnologies.com/blog/charge-customers-later-using-stripe-with-ruby-on-rails
11 Most Asked Questions About RuboCop
Check out these 11 most asked questions about RuboCop. https://thedevpost.com/blog/11-most-asked-questions-about-rubocop/
How to fix `DEPRECATION WARNING: Dangerous query method` on `pluck`?
Problem might look silly but…. [more inside]
Behind-the-scenes tour of a Rails app running for 10+ years
Are you ever curious about how other people structure their Rails apps? What their code quality is like? What pragmatic decisions they make? In this screencast, I give a guided tour of Oxbridge Notes, my little ruby on rails baby (~14k LOC) [more inside]
Make API payloads generic
Just published the sixth chapter of the API-only ruby on rails course: Introduce renderer module. This time, we generalized API payloads with adding data and metadata information of the resources.
https://github.com/AndyObtiva/puts_debuggerer
Debuggers are great! They help us troubleshoot complicated programming problems by inspecting values produced by code, line by line. They are invaluable when trying to understand what is going on in a large application composed of thousands or millions of lines of code. [more inside]
Shared contexts in RSpec
On a recent project, I experimented with shared contexts to see if they could reduce boilerplate in the tests and was generally satisfied with the results, but also found a sneaky gotcha. [more inside]
Rails and React: Fixing "Module not found" errors for JSX files
We’re just getting started with Webpacker and React in our Rails apps. Recently, we hit a problem getting started with React on Rails giving Module not found errors for JSX files. This is a brief post on the issue and what we did to fix it: https://chrisblunt.com/rails-and-react-fixing-module-not-found-errors-for-jsx-files/
Why doesn't Webpacker use my test config when running Rails tests?
When running Rails system or integration tests, you might be surprised to learn that Webpacker will load your development webpack config. What’s the deal? https://rossta.net/blog/why-doesnt-webpacker-use-my-test-config-when-i-run-rails-tests.html