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.
Common Table Expressions in ActiveRecord: A Case Study of Quantiles
An in depth look at how to perform statistical calculations using PostgreSQL and AREL.
Using Codeship for Ruby Application Deployments
The second part in this two-part series covers how to take a simple todo API using Ruby on Rails and PostgreSQL with Docker Compose - from part 1 - and creating a CI/CD pipeline using Codeship Pro. Link here
Using Docker Compose for Ruby Development
The first in a two-part series covers the development and testing of a simple Ruby API with Docker Compose. Link here
Validate plain old Ruby objects with Active Model Validations
A while ago I wrote about creating a landing page with Sinatra, Google Spreadsheets and Ruby. The app had a flaw though, any user data was valid and would post through to the spreadsheet. So here’s how to validate user data in plain old ruby objects using ActiveModel::Validations.
Screencast: Ruby on Rails development environment using Docker and docker-compose
I just published my very first screencast (yay). Watch it on YouTube: Read more
Sidekiq Unique Jobs: don’t waste your time waiting – reschedule if busy
Sidekiq Unique Jobs is a great gem for ensuring execution uniqueness across multiple jobs and for providing jobs locking strategies. However it has a weakness that can result in workers clogging. In this article I explain what are the downsized and how to eliminate them. Sidekiq Unique Jobs: don’t waste your time waiting – reschedule if busy
feedtxt v1.0.0 gem - adds metadata readers for JSON and INI to Feed.TXT
Hello, the new feedtxt v1.0.0 gem for reading web feeds in the new Feed.TXT format now includes metadata readers / parsers in JSON and INI formats (in addition to YAML). The INI reader uses the INI.load reader from the props gem (ConfUtils). Use Feedtxt.parse for all formats or Feedtxt::YAML.parse, Feedtxt::JSON.parse or Feedtxt::INI.parse for metadata format-specific parsers. Cheers. PS: Feed.TXT is also known as RSS (Really Simple Sharing) 5.0 ;-).
7 ways to evaluate gems, and 1 crazy idea
Choosing a pre-made solution should take more thought that checking the number of stars on GitHub.
Cut Development Time in Half with these 5 API-based Tools
Cut Development Time in Half with these 5 API-based Tools Read more
There Is No Magic in Ruby
Magic code? I don’t think so! Today you will learn why there is no magic in Ruby :)
5 hard-earned lessons from a decade of Rails performance work
The last 3,650 days of my professional life have been focused on making Rails apps faster. Five lessons I’ve learned the hard way.
Rails Helper Testing Made Simple
View helpers are often a focal point for all the chaos and miscellaneous code in Rails applications, but that shouldn’t scare you away from testing them. This post provides a basic guide to testing the various sorts of helper methods.
Speed up bundle install with this one trick
Did you know bundler can download and install gems in parallel? Find out how to take advantage of this bundler option and speed up your gem installations forever.
Thread parent and ancestors with thread_ancestors
Tiny gem to get thread ancestors.
Implementing Linear Regression using Ruby
A quick guide that shows how to use linear regression machine learning algorithms in Ruby. Using existing Ruby gems we will setup a linear regression model, train the algorithm and make predictions in minutes. For this example we will use historic house prices in Staten Island to predict the values of houses. Read more
Helpful Resources for Your Rails App Upgrade
Need to update your Rails app version? These resources will help the process go smoothly. Read more
Reading Ruby Code: ROM - Domain Specific Languages
Reading Ruby Code is an on going series on code reading that explores the ROM library. In this post we explore domain-specific language (DSLs). There is a focus on how this influences code reading and how DSLs are implemented in ROM.
UI controllers in Rails
Adapting Rails controllers in modern needs :)
Design Patterns & Ruby - The Template Method
An introduction to the concept of design patterns in ruby world, with an overview of one of the most commonly used ones: the Template Method pattern. Read more
Deploy Rails App with Puma and Nginx on EC2 Ubuntu 14.04 LTS instance
Did you forget important step while deploying your app to AWS EC2 server? Here is the checklist for the deploying rails app to EC2 server:
Yet another guide to permission management using Pundit
Security is an important aspect of application development. Two main components of security are Authentication (Who are you?) and Authorization (are you supposed to be here?). Authentication verifies the user’s identity while authorization verifies whether that user has access rights on certain resources to perform actions on them.
[Screencast] Geocoding, Places and Maps
Using the Geocoder gem and Google APIs, learn how to add some geolocation functionality to your application.