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.
Writing Smart Migrations: References, Reversible, And Indexes
Building a new feature usually means having to restructure the architecture of your application. In other words: writing a lot of migrations to modify your schema. This blog post looks at how to use references, reversible, and indexes to write smart migrations, and make things easier for developing your application in the long run.
Migrating a test suite from RSpec to Minitest
Over the weekend I migrated the test suite of a gem from RSpec to Minitest. Here’s how it went.
What's your Rails default stack?
You could create a custom Rails template that meets your preferences to speed up your setup. Or you can use another stack that’s not an exact match, but get’s the job done.
Creating generators and executables with Thor
Thor is an amazing library for creating generators and executables. It gives you methods for creating and copying files and directories, defining symbolic links, reading remote files, and more. And is the perfect companion for gems that need to generate a project structure, just like Rails. Check it out.
Butter: A modern blog alternative for Rails
Butter is a modern blog alternative to help save companies built on Rails from Wordpress and Tumblr. Butter (also a Heroku add-on) comes packed full of SEO goodness and allows your blog to live on your main domain. Read more
JSON-less JSON schemas with rspec
Writing test’s to ensure that your end points and serialiser’s return the correct response can feel cumbersome and verbose. In this article I stand on the shoulder of giants and leverage the beauty of ruby to make Json Schema’s nice to write and work with. Check it out at Pursuit of Clean
Handmade Rails presenters
The presenter pattern is one possible way to move logic from your views into a place where it’s not only better suited, but can also be reused. In this article, I want to offer a lightweight implementation that both explains some specialties when used with Rails helpers and doesn’t need any external dependencies.
awesome-websockets - A collection of Ruby websocket servers @ Planet Ruby
Hello, I’ve started (yet) another awesome list on Planet Ruby. The new awesome-websockets page collects Ruby websocket servers e.g. em-websocket, faye-websocket, actioncable, etc. Anything missing? Contributions welcome. Cheers. PS: You might also check the related awesome-webservers page.
Level-up `rescue` with dynamic exception matchers
When you use a rescue clause in Ruby, you can specify what kinds of exceptions you want to rescue. But what if you want to rescue exceptions by severity? By message? By time of day? In this post we’ll discuss how you can create dynamic exception matchers that use your logic to decide if an exception gets rescued. http://blog.honeybadger.io/level-up-ruby-rescue-with-dynamic-exception-matchers/
Xorcist
Blazing-fast-cross-platform-monkey-patch-free string XOR. Yes, that means JRuby too.
Enumerated Types with ActiveRecord and PostgreSQL
A walkthrough of how to integrate ActiveRecord::Enum with PostgreSQL Enumerated Types, and get the best of both worlds. more.
Debugging your Ruby Programs
When your code is not working it’s time to start debugging ruby. In this tutorial you will learn a variety of techniques to help you find the problem.
Bringing the best of Bash scripting to Ruby
I just published a post about using Ruby in place of Bash for scripting with the aid of the docopt and scriptster gems. Check it out here.
New Transproc Released
A short announcement about Transproc v0.3.0
Implementing TinyMCE in Ruby on Rails
TinyMCE is an excellent platform-independent web-based Javascript/HTML editor control, which is highly useful for those who want to allow their users to edit HTML documents online. It is mainly designed to integrate with Content management systems, including WordPress, Drupal etc easily. It is a rich text editor that outputs HTML, making it really easy to add rich content using rails application. Read more
Clean PBKDF2: Feedback Request
Here’s a dead-simple, RFC-compliant PBKDF2 implementation that I hope to release in v1 by the week’s end. I’d really appreciate feedback from the community before I cut a gem release. Thanks!
Rails 5's ActionCable and Websockets Introduction
ActionCable is finally out and DHH just posted an example. Let’s take a look and see how everything gets wired up.
Rails Tricky Timezones
Configuring timezones in rails can be tricky if one doesn’t understand the actual config settings and their use. Read more
dataTables Column Search with Rails
dataTables is a nifty jquery plugin for displaying large sets of data. However, we need to do smarter column based searching. article
rubyconf.json - A Free Ruby Conference Calendar Dataset - New event.db Format
Hello, I’ve updated the Ruby Conference Calendar machinery. What’s new? A free rubyconf.json dataset for easy (re)use now gets (auto-)generated including all Ruby Conferences listed on the /awesome-events page at Planet Ruby. The event.db gem that reads in the event page now supports a new format that includes the event link/url in plain text for easy printing. Finally, the (auto-) generated Ruby Conference Calendar page moved to the Planet Ruby site. Anything missing? Contributions welcome. Cheers.
Comments or Social plugins - What is better for you?
I wondered if I need (and can) use my own comment management engine on my rails blog but decided to implement DISQUS. Here is Why.
Ruby: Auto-generated dynamic nested blocks wrappings for Ruby and its performance
It’s not really often that you don’t know what will be in a block. Especially when you plan to nest blocks multiple times. However things like this happen and when they do it’s worth seeing how to deal with it and how much it might cost us. Read more
Feature testing with RSpec
In this post we talk about how we’ve adapted the way we write tests to use RSpec for both unit and feature testing, leaving Cucumber by the wayside.