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.
Taskmanaging Your App, Part 2: Service Objects
Everything provides a service these days, including the software that we write! But sometimes, our own code needs a service to show up and handle a task. Enter service objects, a simple way to use Plain Old Ruby Objects to service your application. This blog post explains how and when to abstract and encapsulate your ideas into a service object and help you separate your concerns.
New feature in Rails 5: render views outside of actions
Ravil Bayramgalin writes about a feature he did for the upcoming Ruby on Rails version, rendering views outside of actions (such as, in background jobs or when producing email attachments). Read more
Scaling Applications with Multiple Database Connection
As a programmer, we can configure our application to work with multiple databases. In this document we are going to explain how we can achieve this in a Rails application. To read full visit : RailsCarma Blog
TTY v0.2.0 release
tty becomes even more modular with new components such as tty-which, tty-pager, tty-platform. Please see documentation for individual component or brief overview at tty project page under “searching executables”, “detecting platform”, “output paging”.
Using TracePoint to explore complex exception behavior in Ruby
Ever wanted to know which method caused an exception - even if the exception was swallowed before you could get your hands on it? You can do all this and more with the magic of TracePoint. http://blog.honeybadger.io/using-tracepoint-to-explore-complex-exception-behavior-in-ruby/
New RubyTapas freebie, and a birthday sale
Hi all! I’ve put up a new RubyTapas freebie video today. It’s about un-indenting strings. This is a solved problem, of course; but this video walks through the process of applying assorted handy Ruby features to take it from several lines of code to one very succinct line. You might learn something new along the way. See the episode, along with some celebratory birthday discounts, here.
Visualizing Garbage Collection in Ruby and Python
Are Ruby and Python implemented in a similar way internally? Pat Shaughnessy compares how garbage collection works inside of each language. Read more
Using Ruby Threads
Do want your Ruby app to take advantage of concurrency? Learn what are threads and how to use them -> Please share if you like it :)
User-facing string interpolation in Rails
If you’ve ever needed to allow users to insert their own variables into strings they provide, this gem will hopefully be of interest. It works with ActiveRecord to provide easy user-facing string interpolation.
Mina v0.3.6 release
Just released a new mina release. It includes some bugfixes, some cool new tasks and many more. Check out the changelog.
finite_machine v0.10.2 release
finite_machine bug fixes to callbacks and choice state feature - enjoy!
A Look at the Future by Looking at the Past
The UNIX has survived for almost 5 decades and will survive for another 5 decades or more. What if we could build Gems that could evolve and still provide useful unit of functionality for decades to come? The ‘What’ is found in the tests, the ‘How’ is found in the production code and the ‘Why’ is not found in any form of code. The ‘Why’ is the design decisions that developers make and it evolves over time. Some of the ‘why’s can be found in the form of comments, blog posts and as discussion threads between the developers on forums. How can we minimize the time spent on ‘Why?’. Can developers become more productive by developing Micro Gems that follow the UNIX philosophy? Read more about this topic : Micro Gem : A Look at the Future by Looking at the Past
Using presenters and decorators to clean up your templates in Ruby on Rails (VIDEO)
When developing a web application, templates usually need to implement some logic, especially conditionals. I’m going to show you two patterns which are commonly used in web development with Ruby on Rails: presenters and decorators. They are meant to move template logic to dedicated classes, so templates look cleaner and more object oriented.
Microlibrary for rescue exceptions declaratively
I’ve written a microlibrary for rescue exceptions declaratively in your Ruby classes. Rescata dry up your code from begin... rescue... ensure.... end It provides you a method for rescue methods using other methods, lambdas or blocks. Also, this gives you freedom to build any custom solution to rescue for specific error classes.. Hope you enjoy it!
Top 3 Links for the Busy Developers
Read the Top 3 Links for July 4th, 2015
Using Runners in the Volt Framework
In Episode 7 I cover how to seed your database and automate repetitive tasks using the volt runner command.
Customize your Ruby classes with to_s and inspect
You just did an “extract class” refactor, and now your program’s output is all wrong. How do you fix it? Customize your Ruby classes with to_s and inspect. - RubySteps
Integrating Ruby on Rails, sorcery and Google Calendar API
Dominika Mips from our development team just published a blog post on how she integrated Ruby on Rails, Sorcery and Google Calendar API (and how can you integrate with other Google APIs the same way).
Tutorial: Creating process workflow in Rails application
Here I am going to explain how to use rails_workflow gem to build complex business logic in your Rails application. I wanted to create one big tutorial but then decided to split it to several posts describing one demo application. Continue…
Colt Gem Released
Colt is a micro gem used to subscribe to a given plan using the Stripe API. The plans must already exist in your account. The current version can check Stripe credentials and Stripe API version. Read more
Ruby Basics
Do you know how the private keyword affects a class method? Read about it here:Hiding a Class Method
How to change the process name of your Ruby programs as shown by `top` and `ps`
Process names for Ruby programs can be noisy, making it difficult to figure out exactly which process is doing what. In this post I show how you can change them to not only make them more friendly, but also display useful status information.http://blog.honeybadger.io/how-to-change-the-process-name-in-ruby-for-top-and-ps/
Prevent broken builds from slowing your team down
mergeq is a set of scripts that makes it easy to get pre-tested commits/merges working in git with any CI server. Teammates can no longer break the build and prevent others from merging. Read more
Allowing similar searches in Postgres
Taking advantage of Postgres can make a huge difference in your Rails app. Here is an article I wrote about allowing for similar searches in Postgres, using the trigram extension. Think of Google when it says “Showing results for computer” when you searched “cmputer”.
awesome-webservers - A collection of Ruby web servers @ Planet Ruby
Hello, I’ve started (yet) another awesome list on Planet Ruby. The new awesome-webservers page collects Ruby web servers. Categories include: multi-threaded web server; simple single-threaded web server; async I/O, multi-plexed web server, and others. Anything missing? Contributions welcome. Cheers.