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.
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. [more inside]
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. [more inside]
Naming is the key!
The blog post about my sanity and naming things: http://codingwithaxe.com/naming-is-the-key/
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. [more inside]
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. [more inside]
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!
Shack: if you like it then you should have put a sha on it.
Shack, a small Rack middleware that makes it easy to retrieve the sha of the currently deployed application. It can also show a small banner with the sha in it. No more figuring out what version is deployed.
Rails open source apps deployed
Open’d is deploying number of open-source Rails apps for free, so everybody can use them. (Errbit, Spree, Redmine etc.)
gem-compare: Releasing a new gem version with confidence
What do you usually do when releasing a new version of gems? Running test suite? Something more? I like to use my tool on tracking changes in RubyGems gem-compare as it gives me a little bit more confidence on what am I actually releasing. Here’s how I do it.
Apache Spark 1.4 in RubySpark
Ruby-spark gem now supports the latest version of Spark.
Securing Environment Variables
Just how safe is it to store secrets in environment variables? How can you make it more safe? http://blog.honeybadger.io/securing-environment-variables/
Game Of Life in Rails
my little implementation of Conway’s Game of Life https://github.com/davidesantangelo/gameoflife in Rails. Live at https://golife.herokuapp.com .
Introducing Lotus Form Helpers
New feature for the upcoming v0.4.0: form helpers. HTML5 form generators with automatic values, CSRF protection, method override, infinite nested fields and ORM agnostic. [more inside]