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.
Rails and DynamoDB How To
In this walkthough I will show you how to save data in a NoSQL database like Amazon DynamoDB, using Ruby on Rails framework. To make this example as useful as possible I’ve created the project using the following steps: 1. created a new rails application and a NoSQL database in Amazon DynamoDB 2. included the aws-sdk gem 3. created a config file with the credentials 4. implemented a method that connects to the DynamoDB table 5. created a form and processing data in POST More:
Liquid water pouring puzzles solver
Water pouring puzzles (also called water jug problems or measuring puzzles) are a class of puzzle involving a finite collection of water jugs of known integer capacities (in terms of a liquid measure such as liters or gallons). Initially each jug contains a known integer volume of liquid, not necessarily equal to its capacity. Puzzles of this type ask how many steps of pouring water from one jug to another (until either one jug becomes empty or the other becomes full) are needed to reach a goal state, specified in terms of the volume of liquid that must be present in some jug or jugs. [more inside]
find vs exists?
How about if we try to find a document with the given criteria in Mongoid but it was not found and an error got raised? We just wanted to the return to be either true or false. We should not change any configuration, instead we should change our query itself. Lets find out. [more inside]
45 Ruby Blogs
45 Ruby Blogs On Honeypot, Ruby is the second most popular language, following JavaScript. Ruby is part of our own tech stack and the following list is an ode to Matz and our favourite Ruby blogs, forums and newsletters.
London Ruby Unconference Registration Now Open (Oct 22)
Get your ticket for this event taking place on Saturday, Oct 22, 2016 in Holborn, London, Uk. [more inside]
Karafka framework - Ruby + Kafka made easier
Karafka provides a higher-level abstraction for building Ruby Apache Kafka based applications. Instead of focusing on single topic consumption, it provides developers with a set of tools that are dedicated for building multi-topic applications similarly to how Rails applications are being built. You can read more about Karafka here: Karafka (Ruby + Kafka framework) 0.5.0 release details
Concurrency in Ruby 3 with Guilds
After reading and watching Koichi Sasada’s proposal for Guilds in Ruby 3 at Ruby Kaigi earlier this month, I decided to try to summarize his proposal in a blog post to help everyone understand the concept.
Notes On Sane Monkey-patching
Here are (semi)random notes, trying to outline a system of views on controversional “monkey-patching” topic—the views I myself consider sane and reasonable. It may seem other way for you, but it could be a start for rational discussion. (discuss on reddit)
Using Phoenix with Legacy Rails Applications
Wrote a blog post about how to leverage the power of Elixir and Phoenix in your existing legacy Rails applications today. Read it Here.
Embrace your inner Project Manager
Wrote a blog post about the skills an engineer needs to manage their own Technical Upgrades
Minitest Cheat Sheet
This Minitest cheat sheet covers basic test structure, the default assertions, class-level options, and writing custom assertions.
Rails Dev. Environment based on Vagrant, VirtualBox and Ubuntu 16.04
Check out this Ruby/Rails Development Environment based on Vagrant, VirtualBox and Ubuntu 16.04 (Xenial Xerus). Tested on Windows and Ubuntu 16.04 hosts, should also work on OSX hosts.
Thoughts on Templates and Helpers
Wrote a few thoughts regarding templates and usage of helpers. Always appreciate other viewpoints.
How To Determine If An Array Contains Any Value From Another Array In Ruby
Quick tip on a couple methods to determine the interference of two arrays.
Rubocop for your favorite text editor
Have you ever wondered if your favorite code editor examines your Ruby code just like rubocop gem does ? [more inside]
Resolving Web Application Resource Bottlenecks with Concurrency
We wrote a general introduction to the bottlenecks of web applications and how application servers can deal with them to improve request throughput and response times. Good read for both the new and the experienced, read it here!
Easily View Postgres Query Plans from Active Record with pg-eyeballs
pg-eyeballs is a ruby gem that gives you detailed information about how the SQL queries created by the active record code you write are executed by the database. It gives you an easy, ruby friendly way to see the output of the Postgres EXPLAIN command and integrates with the popular query analysis tool gocmdpev. [more inside]
Be a better ruby backend developer – watch Java conferences
A short list of links to valuable Java/.Net conference recordings. More here
Check My Code: Tips to Keep Ruby Code Smell-Free
Let’s walk through a few common Ruby code smells and how to best deodorize them. Code smells are symptoms of a deeper problem, and by eliminating them, we can leave our code elegant and odor free! [more inside]
Stabilizing Your Test Suite Settings
We had recurring issues in our test suite when developers changed global settings without setting them back. This post describes how we prevented that from happening. [more inside]
Dynamic breaking points in Ruby
Being inside a breaking point, you can create more breaking points! An interesting approach that can save you some time when debugging a codebase that is new for you. Read more
My Last Rubyconf Brazil
I was the organizer of Rubyconf Brazil until this year, when I finally completed a personal goal I have set to myself 10 years ago. [more inside]
[Screencast] Version Control with Git Flow
Using Git Flow, learn how to work with branches and organize your changes. Once you have completed features, learn how to merge them back into a develop branch and prepare for a release to your master branch. https://www.driftingruby.com/episodes/version-control-with-git-flow
The Safest Way to Constantize
A look at the constantize method in Rails, how it can be exploited, and how to use it safely within your code:
Decoding Rails Magic: How Does ActiveJob Work?
Executing background jobs is quite a common feature in many of the web applications. Switching between different background processing frameworks used to be quite painful as most of them had different API for enqueuing jobs, enqueuing mailers and scheduling jobs. One of the great addition in Rails 4.2 was a solution to this problem: ActiveJob, which provides extra layer on top of background jobs framework and unifies the API regardless of the queue adapter you use. But how exactly does it work? What are the requirements for adding new queue adapters? What kind of API does ActiveJob provide? Let’s dive deep into the codebase and answer these and some other questions. [more inside]