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.
Faster TDD in Rails with Bundler's 'require: false'
This post explains why the Rails default behaviour of requiring all your gems automatically will lead to a slow TDD feedback cycle. Learn how to speed this up by avoiding loading gems unnecessarily, and also why using Spring may not be a good approach. [more inside]
Extracting SEO data the easy way
Do you need to extract data from web pages as input for other Ruby programs? It turns out the Nokogiri gem scrapes html fast. You’ll use it to extract SEO data in this short tutorial.
Announcing Rails Rumble 2015!
I’m really happy to announce Rails Rumble 2015. Hope to see you in a few months!
Use a fake DB adapter to avoid connection errors with rails assets precompile
If you are using docker for your rails deploys you might have run into the issue of compiling your assets before you database container is available. The usual solution is to precompile the assets on your local machine and track them within you version control system. There is, however, an alternative: use a fake DB adapter during asset compilation. [more inside]
Handling Bugs in your Cucumber Test Suite
Cucumber is quite a cool tool to build a test suite. Maybe you know the situation: You are the developer of some ruby library and support JRUBY and MRI-Ruby on Windows and Linux. You might have gotten into a pretty pickle adding a new feature whose tests only fails if you run them with JRuby. If the reason for this failure is a bug in the platform, you may need to work around this bug. This article describes a technique, how you can do that with cucumber.
IDs, Please!
Or the easiest way to get all the info you can get on a person from his social account link https://github.com/gazay/ids_please
Write One-Liner RSpec Tests In Rails With Shoulda-Matchers
Learn how to write robust, shorter and less complicated tests with shoulda-matchers, one-liners that provide an easy way to simplify Test::Unit and RSpec tests.
RubySeeds -- an opionated repository of core_exts
RubySeeds is a repository (not a gem!) for storing easily copied and frequently useful extensions to Ruby’s core classes.
drj/drjekyll - the missing static site theme package manager - jekyll command tool
Hello, I’ve put together the drjekyll gem that includes a command line tool that lets you manage static site theme packages. For example, use $ drjekyll list or $ drj ls to list all 100+ themes. To download and unzip a theme archive use the “installation code”, for example, use $ drjekyll new starter or $ drj new starter to dowload and unzip the Planet Jekyll’s Starter (Minimal) theme and so on. For more see the drj/drjekyll project site. Cheers.
We have Markov noodles for dinner
A story about Markov chains, how they work and why I decided to write a new gem for generating text. http://dabrorius.github.io/2015/08/markov-noodles.html
InlineTranslation
I’m happy to announce the first iteration release of InlineTranslation, a ruby gem which wraps the Bing translator (same as used on Facebook / Twitter), and provides a quick and easy way to allow users to read user-generated content in other languages.
Updated Case When section in I Love Ruby
Grab the book here http://is.gd/rubybook
How to Process Large Data Sets with Ruby
The need for data migrations in mature systems is real. At times, requests for these migrations can appear at random. One minute, a system is behaving as specified, happily fulfilling requests, and then bam! All the user objects suddenly need an extremely crucial attribute. Find out how to do such a data migration in a fast and efficient way.
FactoryFactoryGirl
Hi guys, recently I created a gem called FactoryFactoryGirl. The mission of this gem is helping people generate their factory file more quickly. Check it out on github or my blog post!
Rolling Out the Redcarpet for Rendering Markdown
It’s the little things in an application that matter the most. But small details like rendering markdown can be tricky to figure out if you’ve never done it before. This blog post rolls out the redcarpet gem and walks through how to render markdown content in your application.
i18n-tasks v0.9.0.rc2
i18n-tasks, the gem that helps you find and manage missing and unused translations, has come a long way since its initial release 2 years ago. If you work on a multilingual project, check it out! If you already use the gem, please try the latest release candidate that adds an AST scanner and many features with it.
How to develop a social network using Rails?
A tutorial on developing a social networking platform using Ruby on Rails. Here is the Blog post and demo. And if you want to check out the source code https://github.com/sudharti/socify. Comments are welcome!
Prefer Header now available on rack with rack-prefer
We released a gem a month ago: parsing Prefer Header for rack with rack-prefer. Prefer header should be used mostly on APIs when client wants to pass options to the server. Check the RFC for more info and please don’t re-invent the wheel when building REST APIs, we already have pretty good RFCs on most things :)
Leading a Team at Ruby For Good
A little insight into what it’s like to lead a team at the annual hackathon/charity event/conference held at George Mason University: http://www.blrice.net/blog/2015/08/10/leading-a-team-at-ruby-for-good/
Using lazy enumerators to work with large files in Ruby
Files are just large collections of lines or characters. Lazy enumerators make it possible to to some very interesting and powerful things with them. http://blog.honeybadger.io/using-lazy-enumerators-to-work-with-large-files-in-ruby/
On the Fly Image Processing in Ruby
I take a look at popular Ruby file upload gems and point out the problems of upfront image processing. Then I proceed to explain on the fly image processing and its advantages.
Running and Destroying with Rails
I’ve been developing with Rails for years, and only recently discovered the rails destroy command. Like magic, it allows you to undo a previous rails generate command, for example when you make a typo or forget a column when generating a model or scaffold. In this post I explain how to use rails destroy, as well as another lesser-known command, rails runner.