RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 
November 17, 2014
Last week, we released the activerecord_sane_schema_dumper gem (extracted from an initializer we’ve been using for months) in order to generate a clean db/schema.rb file with Rails. It strips useless (and harmful) alignment whitespace from the file so changes to your DB columns doesn’t affect irrelevant lines.
Build a Ruby Gem is 25% off until the end of RubyConf. Hope you enjoy!
Today I'm Open-sourcing Aloo - my Rails Rumble 2014 submission. Aloo is GIST for data - uses Rails and Redis.
I've just released a new version of stream-rails. A gem to create activity feeds and newsfeeds with Ruby on Rails. The gem comes with a very basic example app that you can deploy to Heroku.
November 16, 2014
finite_machine gets better with alias_target method and log_transitions option. Please see documentation for full interface.
The last post in the intro series on Rubinius 3.0 talks about some exciting changes to the language.
November 15, 2014
I'm an avid user of Forwardable from Ruby's standard library. My latest article explains why you can make shorter, simpler code with Forwardable and hide the noise of boilerplate Ruby code.
I just released tty-spinner for drawing spinning animations in terminal emulators.
November 14, 2014
Here Brian introduces the subsystems of Rubinius: GC, JIT, Metric, UI, and CodeDB.
Clojure Loops in Ruby  sitepoint.com
An article that builds Clojure style loops in Ruby using continuations. Not recommended for pregnant women or individuals with pre-existing heart conditions.
Action Access is an access control system for Rails that provides a modular and easy way to secure applications and handle permissions. It works at controller level focusing on what actions are accessible for the current user instead of messing with models and their attributes. Read more »
Using spring with pow!  dev.mikamai.com
The other day I was a bit sad for I was aware that pow (the web server) wasn’t leveraging spring (the Rails preloader) with its fast load times. Read more »
I just launched a new gem named Scribble.

Scribble is a client facing template language similar to Liquid. Scribble was written in Ruby and can be used in any Ruby or Ruby on Rails project. It takes a template file, consisting of text and Scribble tags and transforms it into text. Scribble can be used to transform any plain text format like HTML, Markdown, JSON, XML or plain text. Client facing means that it is safe to use Scribble to run/evaluate user provided templates.
Check out Hemant Kumar's post about preventing MySQL deadlocks in Rails...
Sometimes you need to save a SQL query or query parameters for the future use. Here's a flexible solution allowing you to save & use it every week.
Sometimes you need to save a SQL query or query parameters for the future use. Here's a flexible solution that allows you to save it and reuse every week
Maxitext
- Ctrl+c stops tests and prints failures
- pastable rerun snippet for failures
- multiple before & after blocks
- around blocks around { |t| Dir.chdir(...) { t.call } }
- red-green output
- mtest executable to run by line number and by folder
and more goodies :)
November 13, 2014
Checkout the v0.3.0 changelog of themes_on_rails .
Look over our shoulder as we refactor and optimize a set of queries.
Starting to dive a bit deeper about improvements in the Rubinius instruction set.
Interesting thoughts and some welcome improvements planned for Rubinius 3.0.
One of my first tasks as NY Tech Meetup’s newly minted hacker-in-residence was migrating our application from Heroku to Ninefold. Scary! Or at least it sounded like it would be. But it turned out to be a pretty straightforward and painless process. Here’s what you do...
November 12, 2014
I just launched Services - A nifty service layer for your Rails app and blogged about it. Let me know what you think!
Over last couple of months, our team has helped further develop a unique video distribution platform. Finally, the big launch day has come and we’d love to introduce you to Uscreen: here's a little cast study about the platform.
Ru brings Ruby's expressiveness, cleanliness, and readability to the command line. It lets you avoid looking up pesky options in man pages and Googling how to write a transformation in bash that would take you approximately 1s to write in Ruby.

For example, to center a file's lines, use: ru 'map(:center, 80)' myfile.
Hone Your Craft with RubyMine 7  blog.jetbrains.com
RubyMine 7 is out with support for Chef, Puppet, EditorConfig, and much more
Step by step guide for deploying your first sinatra application to VPS running nginx/passenger [Ubuntu 14.04 LTS].
A blogpost showing a Faster Way to Source Map DOM Elements for Rails apps.
Hello, I've put together a small Sinatra sample web app that shows all the world's country codes (so far alpha 2, alpha 3, internet top level domains and motor vehicle license plates codes are included.) All code and datasets are public domain. See a live country code page on Heroku or check the world.db.codes source on GitHub. Cheers.
November 11, 2014
There are plenty of reasons users will want to sort and reorder lists, but implementing such a feature when using the has_many :through association isn't so obvious. In this post I'll show you how this is possible using the ActsAsList gem, and along the way show you how to load seed data, create a has_many :through relation, and use the great table_print gem. Read the post.
Almost every SaaS product has a free trial period. Why? At first, I thought it's to get as many people to try the product, but that doesn't make sense. The real reason is to create an "endowment effect."
Have you ever wanted to pass a method to a function that only takes a block? Or figure out which of your object's superclasses broke the method you're trying to call? Those things are easy to do with the method method. Use it well, and you can learn about your dependencies, save yourself hours of debugging, and get your code to the places it needs to be.
rb_import adds an import method to the Ruby VM so one can do foo_class = import './foo.rb'.
Eventually name-clashing class/module definitions can now be prevented with this gem.
November 10, 2014
Say hi to the Rubinius Team! News on Rubinius 3.0 coming soon too.
Raptor is a new Ruby web server that's up to 4x faster than Unicorn, and up to 2x faster than Puma and Torquebox. The most recent blog post describes in high detail how it has been made so fast. It's the first post from a series that will elaborate on Raptor's implementation.
Tail call optimization is an optimization where tail recursive functions are transformed into loops by the compiler. A tail recursive function is one where the final statement is a call to the same method. In this post, we will look at what tail recursive functions look like, how tail call optimization helps them, and how to enable TCO in Ruby. [Continue reading]
Let Austen Ito show you how he builds a basic infrastructure with Docker, Chef, and Rails!
Location-based web applications calculate distance between objects using the latitudinal and longitudinal coordinates and the Haversine formula. But how does one determine an object's coordinates given a street address or IP address, let alone calculate the distance between two sets of coordinates? Fortunately the Geocoder gem turns these otherwise complex tasks into a fairly trivial matter. In this post I'll show you to to integrate Geocoder into your Rails application.
Get a smaller Rails app footprint with two commands. A 36% boot time memory savings for free. Also learn how to benchmark and optimize your own application's boot size.
Pakyow v0.9 Release  pakyow.com
Pakyow, the view-first app framework for Ruby, dropped over the weekend. Release notes + upgrade guide.
liquid-rails allows you to render .liquid templates with layout and partial support. It also provides filters, tags, drops class to be used inside your liquid template.
assets-rails allows you to require javascript and stylesheet libraries with the exact version so that your frontend stuffs will continue to work as times passed by. You can use different versions for different templates in a single Rails application.
November 09, 2014
tty-progressbar now includes estimated time token, a frequency option to throttle repainting and ability to log during display. Please check it out and let me know your thoughts.
Some ideas about how to create configurations for ruby programs.
November 08, 2014
Reform 1.2 Is Out!  nicksda.apotomo.de
The popular form object for Ruby and Rails, Reform, got some new amazing features. It now allows dynamic syncing and saving, got a 85% speedup, a dirty tracker and more.
Pastel v0.3.0 released  rubygems.org
pastel got even stabler and faster. Fixed bugs concerned with nested styles, improved speed and added ability to alias colors at runtime through environment variable and library interface. This is a component that will be part of tty toolkit
I've just released v0.19 of image_optim with improved gif optimization and new optional lossy worker for jpeg files which uses jpeg-recompress.
I just launched activerecord-after-transaction which provide a function to execute a proc after the transaction.
I wrote a blog post about considerations on Daylight Saving Time when using time zones.
November 07, 2014
Check out your app's stats. The tool is here. The blog post here has example output.