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.
Pronto v0.7.0 released
Pronto keeps getting better at providing a quick automated code review of your changes. The biggest features of this release: [more inside]
RJGit gem 4.4.1.0 released
Version 4.4.1.0 of RJGit was just released on RubyGems. RJGit is a JRuby wrapper around the Java JGit library for manipulating Git repositories. RJGit wraps much of JGit’s core functionality; it has classes for all important Git objects, i.e., Repo, Blob, Tree, Commit, and Tag. It allows parsing and manipulation of these objects in an intuitive manner, and supports both bare en non-bare repositories. For example code, please refer to the project’s README.
Rake gem explained
Let’s see how we can better automate our tasks. Rake gem explained
A case for decorators in Rails
I didn’t believe in decorators (or really know what they were) until I needed them. Here’s the story
Beginners Video: Rails Project Directory
Each week I’m creating a new video for beginners with help from Daniel Kehoe, the author of Learn Ruby on Rails. This week the free video from Fullstack Videos is an introduction to the Rails Project Directory.
Using RSpec Nested Transactions to speed up tests touching the database
This article explains how to speed up some tests touching the database by using nested transactions. Specially useful for those running Sequel and PostgreSQL (or other server supporting savepoints) and testing with RSpec as the rspec_nested_transactions gem I released a few hours ago would help a lot.
Cleaner preprocessing of data when parsing CSV files
Wrote a post about how to use converters to pre-process CSV data while importing: http://kgrz.io/ruby/2016/08/05/better-csv-preprocessing-in-ruby.html
Different ways how to do Rails validations contexts
In This Article we will have a look on how to enable different Rails validatorn on different scenarios. [more inside]
Meet larry, the pry plugin that keeps track of wall clock time.
Larry is a plugin for Pry. He keeps track of elapsed wall-clock time and tells you how long code or a Pry command you ran took to complete.
RubyMine 2016.2: Enhanced Support for Ruby, YAML, RSpec, and More
RubyMine 2016.2, the second update in the 2016 series of releases, is now ready to use. RubyMine team has focused on better code intelligence for Ruby, YAML, and RSpec. The 2016.2 also inherited all the new features and improvements from IntelliJ Platform, bringing better support for JavaScript and TypeScript, an enhanced UI, and improved VCS and database tools. Read more…
Advanced SQL in Rails - Part 1
Turbocharge your Rails workflow by taking advantage of advanced SQL, right from within Rails. In Part 1 I cover window functions and views; in Part 2 I’ll discuss how to nicely integrate those into your Rails app. Enjoy! [more inside]
The Minitest Dilemma
If you were to start a new open-source Ruby project today, what testing library would you choose: rspec or minitest? Perhaps you have a strong opinion on this topic and the answer is obvious. For me, it presents a dilemma. Read the post →
Todo list using a Sinatra REST API
I wrote a post showing how to create a simple Sinatra REST API - deployed on Heroku and using ActiveRecord and Postgre. Source code on Github.
Using Rails 5 ActionCable and RethinkDB to build a Reactive WebSocket App
In this article we will demonstrate how to build a WebSockets driven application using Rails 5’s ActionCable. By using RethinkDB’s active changefeeds feature we can eliminate the need for a separate event broadcasting service like Redis, resulting in elegant and succinct code. Read it here!
Update the book 'Learn Ruby on Rails 5'
Help me update the book that is called, “The best Rails book for beginners.” The book is free on Leanpub or Softcover with 5 star reviews on Amazon. Michael Hartl says it is, “geared more toward complete beginners than the Ruby on Rails Tutorial.” I’m offering an Ultimate Rails Learning Bundle for Kickstarter backers. Please, if you can, help with the Kickstarter for ‘Learn Ruby on Rails 5’.
Moving to Gitlab! Yes, it's worth it!
How about cutting down your Repository + CI costs from 4 up to 10 times, and have fun doing it? You will be very surprised to know about how far Gitlab-CE and Gitlab-CI are right now. It’s definitely ready for prime time and you should at least try them. In this post I will do the math for you and explain how to set up a complete auto-scalable CI environment as well.
[Video] Multi-threading in Ruby Explained
How does multi-threading work? What do you need to know? Watch this video to find out :) http://www.blackbytes.info/ruby-threads-video/
Merging Query Strings when Redirecting in Rails
The Rails router provides a convenient redirect method, but it doesn’t include the request query string parameters by default. This post addresses that in a few ways.
How to auto calculate a collection of associated attributes
attribute-depends-calculator The gem will auto calculation and save a collection of depends attributes
Install Rails 5 on Windows
A short and sweet guide to getting Rails 5 running on Windows, with the bare-minimum number of dependencies.
Separation in a Rails monolith: layouts, assets, and controllers
Consider introducing separation in your Ruby on Rails monolith with some simple techniques.
An Introduction to Crystal: Fast as C, Slick as Ruby
Ruby is awesome, but it is not necessarily known for its speed. Sometimes it is not the right tool for demanding applications. Learn about Crystal here.
The Pros and Cons of Ruby Refinements
The purpose of Ruby refinements is to scope changed behavior to a very specific area of code. Here is how to use them, as well as pitfalls to avoid.