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.
Finnaly figured out how to run single example easily with Guard Minitest/Spec
EDIT Looks like minitest-focus is the way to go here. Can’t believe that I haven’t heard of this until now! Read more
Docker Basics : Connecting Containers
In this tutorial, you will learn how to run a simple Rails app with PostgreSQL database by linking database container and the Rails app container Docker Basics : Connecting Containers
A simple way to check your gems' memory usage
I just posted a brief intro to the derailed gem, which is a nice collection of profiling tools: http://blog.honeybadger.io/profile-your-gem-memory-usage-with-derailed/
Crows, microlibrary for authorization in Ruby classes
I’ve written a micro library for authorization in Ruby classes, Crows provide you with a few helpers to check if current_user can make operations into some records. This gives you the freedom to build your own plain Ruby classes to make authorization works easily, without the painful of bigs DSLs. Hope you enjoy it!
Ruby World-Wide Conference Calendar (Sorted by Year, Month, etc.) @ Planet Ruby
Hello, I’ve created a little Ruby script that reads in the awesome-events page @ Planet Ruby and (auto-)generates a calendar page listing Ruby conferences sorted by date (year, month, etc.). Anything missing? Contributions welcome. Cheers.
Getting accurate code coverage metrics from SimpleCov in a Rails project
We use SimpleCov to track code coverage of our tests in Rails projects. For coverage to be in any way useful as a metric it needs to be accurate. We noticed that files for which we had no tests were not being tracked and not included in the coverage. Read more
How to get more value out of your Heroku dynos, and speed up your Rails application
We found ourselves going over and over the same optimisations when deploying new sites on Heroku, so we’ve tried to compile them all in one place.
Setup Ruby On Rails on Mac OS X 10.11 El Capitan
We will be setting up a Ruby on Rails development environment on Mac OS X 10.11 El Capitan. Read more
Buidling Spydec (PDF Download)
A few days ago, I built a simple command-line app that uses the built-in OptionParser library to parse command-line arguments, called Spydec. And then I wrote a minicourse about it for you. Spydec makes it simple to compile data about industries/markets for competitive analysis. It makes it super easy to gather the most important data such engines use to rank websites. Find out how to build such an app, and distribute it as a gem.
A little reproduction for the jquery-rails vulnerability
For the sake of improving my understanding, I created a reproduction for the jquery-rails CVE-2015-1840 vuln. Sharing it here in case other find it useful. Read more
Top 6 Ruby Links for Busy Developers
Top 6 Ruby Links for June 17, 2015
Naming is the key!
The blog post about my sanity and naming things:
Rack: First Principles
I just published a blogpost about understanding what Rack is and what it is used for, with examples. Also, I am planning on publishing couple of more posts about Rack and how to write Rack middleware. You can read the first part of the series here.
Understanding the rails-jquery CSRF vulnerability (CVE-2015-1840)
Yesterday there was a new vulnerability disclosed in jquery-ruby and jquery-ujs. Learn how you can fix it, and how it works in this blog post
Introducing Lotus Database Migrations
New feature for the upcoming v0.4.0 (Jun 23): database migrations. Fast operations for schema: create, drop, migrate and prepare database. Keep migrations healthy with experimental feature. Read more
A guide to the best beginning Rails resources
There are a ton of books, videos, podcasts, and courses for learning Rails. There’s no way you’d have time to go through them all! So what’s the best way for an absolute beginner to learn Ruby and Rails? Which resources should you start with, and when?
Pluralsight: Building Ruby Gems
I created a Pluralsight course on Building Ruby Gems. This course could be helpful to anybody new to Ruby, or to Ruby devs who haven’t built their own gems.
Splat goes Ruby
The spoils and tricks of using * in your code. I’ll bet there’s things you didn’t know.
Avoid race conditions in Rails with Postgres locks
Earlier this year a programmer reported that he discovered a race condition bug in the Starbucks system which allowed him to essentially have an unlimited giftcard balance. It’s obviously a problem that can have some serious financial implications. In this article we explore how to handle race conditions in Rails.
Rails application.rb Recommendations
I just wrote up a short list of things I always want in my config/application.rb that you might also consider helpful.
Subscribing for events in rails_event_store
Subscribe for domain events explicitly, avoid magic, avoid implicit assumptions. All with code samples explaining why and how. Read more
Using Lambdas in Ruby
If you’re like me then you never paid much attention to lambdas. As it turns out, they offer some pretty interesting features: http://blog.honeybadger.io/using-lambdas-in-ruby/
Rails Model Translations
Rails gives you a nice way for translating model files with Model.model_name.human and Model.human_attribute_name(attribute). This blog post shows how it works, how form_for is using it and introduces a small gem to generate those files automatically from all of your models.
Error aggregation with RSpec 3.3
Ever wondered, if it is possible to catch all errors from a spec at once? With a new option introduced in RSpec 3.3, you can do this. Check out my blogpost to see how to make this happen!
Recapping RedDotRubyConf 2015
Didn’t get a chance to make it to RedDotRubyConf in Singapore this year? Fear not! This blog post has gotcha covered! It recaps some of the best talks from the conference, and highlights some of the coolest gems you should be using!