RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 
December 09, 2014
I posted the first ruby scripts I ever wrote, look at them and the motivation to do so. Want to share your first ruby scripts? Tweet them out with #myfirstrubyscript
What happens when you have a bad abstraction? You have to dig out the API reference every time to understand what that method that clearly should have been named leaderboard is actually called. And whenever you touch the code, something breaks, and you blow the rest of your day trying to debug it (because you tweaked position, but didn’t update score at the same time). So how do you build good abstractions, while staying far away from the bad?
I’d like to share with you “the switch” I made from PHP to Rails, summarized in 5 points.
Learn how to properly configure a Ubuntu 14.04 server to deploy Ruby on Rails 4.1.
I just wrote a simple example of using routes constraints link. It's really helpful when we can update one object in many places.
Continuing my articles about forwarding and object responsibilities, I just released a new post about the benefits of managing change using a common interface.
I wasn’t at Ruby Conf, but I followed it vicariously via various social media channels.
There is a huge amount of action in Ruby at the moment, including a ton of focus on performance.
Continue reading The Vibe.
A new post up at the blog about data sets with FactoryGirl.
December 08, 2014
After several months in production, Gemnasium is getting back to the auto-update feature, and explains why it is way more difficult than expected. Read the article here.
mina_maintenance is a maintenance mode for mina deploy. Heavily inspired by Capistrano::Maintenance. Feel free to try it and share your thoughts!
Introducing Traveling Ruby  phusion.github.io
Traveling Ruby lets you easily ship Ruby apps to end users. Use Traveling Ruby to create self-contained Ruby app packages for Linux and OS X. Completely open source, MIT licensed.
Figuring out how to use Ember-style computed properties in Ruby Gamebox.
December 07, 2014
I've released necromancer for the purpose of ruby core types conversion. Hopefully API will convince you of it's ease of use, flexibility and composability(you can build custom conversions out of simpler ones). Please give it a try and let me know your thoughts.
I've uploaded a new beerdb gem update. What's news? The beerdb gem that lets you load datasets (e.g. beers, brewpubs, breweries, etc.) in plain text into your SQL database of choice now includes a new build system. Use the new Datafile - a mini language a.k.a. domain-specific language (DSL) that lets you setup your database in minutes. For example, to setup a beer.db for all Austrian beers n breweries use the at.rb quick starter template. Type $ beerdb new at to download the datasets (as zip archives), setup all tables, indexes, etc. and read in all fixtures. Cheers. Prost.
Yesterday ROM 0.4.0 was released along with updated rom-sql, rom-mongo and rom-rails.
December 06, 2014
Debugging I18n lookup in Rails  developingandstuff.com
Here's a way to output the I18n lookup chain to debug translation strings on your Ruby on Rails app .
December 05, 2014
This post explains how Fastly works and how to set up Fastly in a Rails application to cache dynamic content (not only assets).
Check our new blog about rails validations:

https://redbooth.com/engineering/technical/valid-valid-valid
Hey pips, i just launched the x-ray-machine which is a zero configuration logging/profiling tool for rails.

Think this, ever wanted to log your external API calls (or heavy processing tasks) in the rails logs the same way rails does natively for active record? Well, that's what the x-ray machine is for!
You can run Minitest directly from the Ruby interpreter to target single test cases or specific tests. This post calls attention to a few of the framework's own command line options that aren't well publicized but which can be useful for these scenarios.
I've just released my book Learn Ruby on Rails on Amazon (it was only available with a RailsApps subscription before today). Even if you already know Rails, you might want this book. You can get Learn Ruby on Rails for only 99 cents for the next seven days (it's a launch promotion). And, please... write some 5-star Amazon reviews?
December 04, 2014
We recently launched an all new version of the Forward gem. Now you can forward a static sites, view requests as they come over the tunnel, use multiple accounts, and auto copy/open your tunnel URL.

We also completely redesigned the website and launched a Chrome client so you can forward right from the browser.
Learn how to setup your Ruby on Rails development environment to use git and github in this video tutorial.
Read about DRYing up Rails Views with View Carriers, why use carriers, when and when not to use rails helpers, overcoming double dot and simplifying complex views.
Testing and Environment Variables  robots.thoughtbot.com
Learn how to test code using data in environment variables with Climate Control.
Last week I wrote a gem to begin playing with an idea for melding Functional ideas with OOP. The result is the Renewable gem. The code is on Github and I'd love feedback and use cases to target. Right now this is a solution in need of a problem; so, please help me vet it.
I looked at one of my recent Rails Gemfiles for 2014. Here's my Rails Gemfile Teardown. Hope you enjoy!
TheViking 1.0 - Akismet anti-spam service for Ruby and Rails.

TheViking is repack of Viking gem without support of Defensio anti-spam service.
There are half a dozen JavaScript snippets/projects out there that let you click on some text and an editor appears in place. Well now we have one built for Rails with minimal setup and minimal clutter. Built with Bootstrap in mind it provides elegance with simplicity. If it's text connected to the database, it can be dynamically updated.

http://github.com/danielpclark/dynaspan
Why do I need to know about threads?
My main purpose to discuss threads is not for the audience to start writing multithreaded code but to have a good idea of what is happening to their application when they are using multithreaded gems in their codebase.

Nowadays a good number of us are using Sidekiq for background processing or Puma as an efficient web server and I’m sure there will be more of such gems soon enough so I believe this makes it essential for us to know how our applications behave when we use such gems and how we can get the most out of them. Learn More About Threads in Ruby..
I wanted a way to see production S3 assets in development when using a production database export without hacking Paperclip. My solution.
December 03, 2014
Recently, nVisium made SecCasts free to subscribe. It's got a ton of application security tips in screencast format, and most recently we've been on a Rails kick, releasing Rails-specific screencasts. Check them out for some easy fixes to security issues we regularly see in Rails apps.
When you want to reach a fragmented customer base, marketing becomes a challenge. I've outlined an approach you can use to reach your target customers with Google display ads for any product or service, using developers as an example.
TheActualLocales is a way to actualize yours i18n locale files and remove legacy keys into multilingual projects
We just added a short article about rails timezones . It will explain how rails handles that.
I've just created gem that makes easy to block unwanted ads at DNS level - think of lightweight replacement of AdBlock/Ghostery, with addition of blocking scam websites etc. Check it out - it's called hosts_updater. Feel free to report any bug or suggest a feature.
December 02, 2014
If you missed RubyConf 2014, or just couldn't take it all in while in San Diego, don't worry. Confreaks has RubyConf presentations coming online right now.
I've just created a gem that makes easy to use the Browser Geolocation API to track the current visit location with Rails. Check out Spyme Also feel free to report any bug or suggest a feature.
This short post demonstrates the utility of overriding your Rails models' to_s method if you find yourself repeatedly outputting a specific model attribute (or outputting a compound attribute).
Why is referential integrity important to your Rails apps?
This blog post talks about 4 different ways of doing software deployment. The text describes the pros, the cons and the quirks of each one option.

http://blog.plataformatec.com.br/2014/12/the-pros-and-cons-of-4-deployment-process-techniques/
In Rails, you might set data once during a request, but use it in every layer of your app. Which user is making the request? What permissions do they have? Using a Ruby global variable or class variable for this would be bad -- multiple threads could overwrite it, and you'd end up with a huge mess. Instead, you need something that's global, but for just that request.
I wrote about how sending a message as a command leads to flexibility in Forwarding Messages With Tell, Don't Ask.
December 01, 2014
Learn how to setup a Ruby on Rails 4.1 development environment on Ubuntu 14.04 in this video tutorial.
Register now for a workshop on Rails Advanced Techniques or a Rails introductory class, scheduled for January in Cape Town, South Africa.
November 30, 2014
Here's a quick overview of what Chef does for you when you use it from the very beginning. It's easy to think of Chef as "automation that I'll get to when it will save me enough time." Here are several reasons you might not want to do that.
November 29, 2014
Rails 5 development has started!

This commit on Github doesn't have much details about the upcomming features but it does tell that they drop the support for ruby 1.9.
November 28, 2014
I've uploaded a new sportdb gem update, that is, v1.9.14. What's news? The sportdb gem that lets you load datasets (e.g. teams, leagues, matches, etc.) in plain text into your SQL database of choice now includes a new build system. Use the new Datafile - a mini language a.k.a. domain-specific language (DSL) that lets you setup your database in minutes. For example, to setup a football.db for all World Cups 1930-2014 use the worldcup.rb quick starter template. Type $ sportdb new worldcup to download the datasets (as zip archives), setup all tables, indexes, etc. and read in all fixtures. Cheers.
November 27, 2014
Humanity and community was omnipresent at RubyConf 2014. Guess what? I wrote a blog post about it!
I share some tips, I used to fight memory leaks when manipulating images with RMagick.