RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
April 24, 2014
I just launched gem capistrano-team_notifications which helps track deployments easily.
April 23, 2014
A reader had a question about getting started with TDD, so I answered it.
So I am in the middle of a lot of planning for “Ruby Workshops in the Tropics” this summer, where myself and a few other advanced programmers will be holding sessions to help you write tests, more concise, idiomatic ruby, and more….

Keep reading to sign up!
Why is a styleguide important and how can you make sure you stick to it? I have some thoughts on how a Ruby style guide can help you write better code.
Almost all the Ruby frameworks for the Model layer mix up business logic with database details. This kind of architecture leads to god classes, slow build times and to a general bad design. These problems are well known to legacy projects’s maintainers.

What if we assign these roles to smaller components that are able to collaborate together? Imagine how life changing would be to work just with objects, without worrying how to persist them. How easy and fast would be testing them? How small and well defined would be your objects?

Let me introduce Lotus::Model.
Don't you know that ActiveRecord comes with the powerful `serialize` class method that help you to serialize column value into YAML or JSON? What if you want to customise the serializer? In this article, the author walks you through how to create a naive encrypted JSON serializer.
I wrote a new post on Rails Reloader: A Lesser Known Rails Hook. Hope you enjoy!
Just prepared an example Rails 4 application with jasmine-rails. So, what special about it? It shows step-by-step (actually, commit-by-commit) how to approach different testing situations. One thing that was solved there is loading HTML fixtures from Rails.
I’ll be going over each of the Ruby IDE’s briefly, and if possible include a tutorial from someone who’s experienced with each platform more than I am. You can also submit your own, and I’ll consider adding it to the list.

→ Top 5 Ruby IDE's

We've all got our own favorites, you're more than welcome to suggest your own!
We would like to introduce you to a couple of cool new things we have added to our application logging:
iStats is a Ruby gem that displays information about your system. It currently supports CPU temperature, fan speeds and battery health. The gem is a Ruby wrapper for a small C library that interacts with Apple's IOKit library.
April 22, 2014
Ruby on Rails Introduction
Hi I was collecting data for my blog seaniea.I love to write on tech and developers story.During my research I found helpful post on Ruby on Rails Introduction and dazzling video on
Rails Coach Podcast.I'm Imran founder of Seaniea .
A Kata a Day: Hours
A Kata a Day
I've released v1.0.0 of IDs, please. Get social network IDs or screen names from links to social network accounts.
April 21, 2014
WiFi makes no latency promises; 4G incurs scheduling costs but offers more stable performance. To minimize latency, don't trickle data!
Popular development approaches don’t emphasize the design process. You may be familiar with the concepts of test-driven development and behavior-driven development, but let’s talk about the lesser-known concept of documentation-driven development.
By using local notifications you can remind your users about your application, notify them with reminders, and use the notifications for all kinds of creative ways of enhancing the user experience and engagement with your application. In this episode we round off the functionality of our Tasker application by implementing local notifications to remind them of due tasks.
April 20, 2014
Because this gem doesn't exist and I need to use it very often. Therefore, I extract the code from mongoid on my own. It's basically the same code from mongoid before it's removed. Try it out,
Do you want to use your existing Rails' layouts & business logic for your new Blog? Do you know and love Jekyll, but cant seem to get the two to play nice together?
Rails controllers are a mess. There's one relatively simple practice I've adopted that helps improve their code significantly: Never use ActiveRecord persistence methods in Rails controllers, and never, ever use ActiveRecord filters.
April 19, 2014
A few years ago there used to be a motto saying Skinny controllers, fat models. It was good at the time, because people thought all of the application code belonged into the controllers, and it helped them realize that it's good to have just a simple controller layer and push things down. The problem with this motto is that it's wrong. Continue reading
My instructions on how to configure Macbook Pro on Mavericks to work with ruby and rails.
I have been on a journey for some time now. It started when I was a 8 year old kid who decided to take his Dad’s Betamax apart to see how the movies got in there. It continued when I was 10 and I got a Commodore and played tape-drive games like Red Baron. My future was forever set in stone when I arrived at a new Jr. High School @ 13 and they had AppleIIes in my home room, math lab, and computer lab.

Continue reading @ rubylove.
Rake tasks from a Rubygem
Short blog post on exposing new Rake tasks to an application, through a gem.
April 18, 2014
While working on a client to consume an app, I needed to figure out how to test it. A little research and a little playing around led to this proof of concept.

In 43 sloc, it creates a Sinatra app. Creates a client to consume the app. Hooks into rack-test to test the client, going through rack and the app, but not needing a server or the internet. Then starts the app on a server and uses the same client to consume it over http.

Ultimately, a small skeleton that shows how pieces of a client could fit together.
Git hooks can be useful, but they're arcane and obscure... And written in Bash. OnLive has written a nice Ruby-based library to fix that...

But it's still nice to know the details of how they're broken, and how we fix it in Ruby.
I just published the article about usefull gems in development for Rails developers. Hope, you'll have fun reading it!
ActiveRecord extension to find out near by (proximal) records (previous and next) from the ActiveRelation scopes (tried to use AREL as much as possible).

The benefit of this gem, it can take any scope, and it does subquery for taking previous and next records. You don't need to add anything, just include module and use magic function that will do everything for you.

Currently supported adapters: mysql2 and postgresql.

Tested Ruby: 1.9.3, 2.0.0, 2.1.1
Tested ActiveRecord: 3.2, 4.0, 4.1

Current roadmap is to write more specs and add sqlite3 adapter.

Download proximal_records gem
Ubuntu 14.04 just launched and I released a new GoRails tutorial to cover installing Ruby 2.1.1 and Rails 4.0.4 on it.

Setup Rails on Ubuntu 14.04
We wrote a little something to help you getting started with QueueClassic. What is QueueClassic you might ask? It is a "simple, efficient worker queue for Ruby & PostgreSQL."

Read it over here.
Fragment caching with Rails
I just published a post about caching with Rails: Rails caching.
Fixed some important issues.
Fastly launches the fastly-rails plugin for easy dynamic edge-caching, an open beta EngineYard add-on, and updates on the CDN Sumo Heroku add-on. Full post here.
How to DRY Rails routes
Some large Rails app have many resources in their config/routes.rb, some are repeated and could be DRY up. In following tutorial How to DRY Rails routes, the author walk you through how to achieve that with both Rails 3 and Rails 4.
April 17, 2014
Users of MetaSearch/Ransack, have you seen Searchlight? It's a low-magic search gem that's powerful and easy to understand. It helps you map form options to methods you write, and inside those methods, you can do whatever you need, from `where(name: name)` to complex SQL queries.

As of the 3.0 release, it's also totally ORM-neutral, so whether you're using ActiveRecord, Sequel, Mongoid, or something else, you can build searches with Searchlight. Check it out!
In this episode we’ll learn how to use the Pundit gem to lock down access to objects in an API. Using TDD to drive the development of Pundit policies and scopes we’ll understand the basics of using this authorization library.

* Subscription required.
Now we can access models in the same way in every step definition, having confidence that it will never be nil More...
I wrote a guide about how to create calculator in Shoes
We wrote this blog post to explain reversible migrations with Active Record.
April 16, 2014
Invoicing is one step solution for all the invoicing needs of your application. Checkout release post for more information.
April 15, 2014
Is this a God Object?
God Objects in Rails
At some point in your Rails career, you’ll run into a controller that’ll make you want to give up programming forever. As great as it would be to just close your eyes and pretend it doesn’t exist, someday you’ll have to fix a bug in one of these controllers. And, being a good software developer, you want to leave the code better than you found it. But how do you refactor it, especially if you don't have good tests to rely on?
A nice read (hopefully!)about several approaches to responsive CSS and how Sass helps with it by RoR dev.
When Rails 4.1 was released Lucas Mazza from plataformatec blogged about 3 favourite features in Rails 4.1. I liked the idea, but some of my favourite things are different. So, here are my favourite things about Rails 4.1
Invoker version 1.1.0 released
We just released Invoker version - 1.1.0 now with support for:

* Ability to add any external process via .dev DNS
* Ability to tail one or more process.

Check Invoker Home Page for more information.
April 14, 2014
The keyword arguments falacy
Check out the pros and cons of keyword arguments in ruby: The keyword arguments falacy in GB's new blog post.
Bootstrap 3 support for Simple Form
Simple Form is the most popular form builder gem in the Rails community. One of the things that our users love the the most is its integration with Bootstrap.

A lot of users were already asking for integration with Bootstrap 3. We heard their requests and gave Simple Form more love. We just released a RC version with support for Bootstrap 3!

Check out the details in our blog post.
Software packaging is a kind of a dark art for many people, due in most part to packaging manuals and policies that are hard to understand for the busy developer. Here is how to package a Ruby on Rails app, and host the resulting debian package on S3, all without the need to know about any of the debian packaging rules.
Ruby Best Practices
I just was reading this post on Ruby Best Practices Ruby Best Practices that is written by Gregory Brown developer from Xaavo Don't miss this awesome article.
Ruby - the good parts
Kamil Bielawski from our team at AmberBit posted a blog post about what he think are good parts of Ruby language. Do not miss it!