RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 
June 13, 2014
Short introduction to Solr, Sunspot and typeahead.js. Part1.
Have you ever needed to test something like this?

- Hit URL A
- Wait (how long?)
- Find results at URL B

The ideal is to wait "just long enough" before getting the results. This short post shows a simple way to do that.
The internals of Phusion Passenger are thoroughly documented in the new Design and Architecture document and the Code Walkthrough video. Take a look inside one of the fastest and most advanced Ruby application servers. With these new documents, we hope to make Phusion Passenger more transparent and we hope to encourage contributions.
An overview how to easily start using C/C++ libraries in Ruby code. Case studies of most common gems with their basic set-up.

http://www.amberbit.com/blog/2014/6/12/calling-c-cpp-from-ruby/
I just published an article about Rails' Fixtures Fixtures in Rails.
Flexkey is a Ruby gem for generating unique, random strings for use as product keys, redemption codes, invoice numbers, etc. Check out Flexkey on Github or read the blog post for more info.
I've used a lot of Todo applications, but I never really liked any of them. Really, what I like to use is a text editor and just create a simple list manually. However, I like having notifications. Thus, TODO Notifier

The code is kinda buggy and unorganized, but the daemon basically works.
We recently open sourced SeedMigration, one of our internal gem at Harrys. Here is a blog post explaining why we love it, and why you might enjoy it too.
June 12, 2014
The Ruby gem Rattler is designed to make language design and recognition as simple and fun as possible. It's nearly ready for a 1.0 release, but unfortunately I have so little time to work on it that progress is slow.

I'm looking for a few good Rubyists to join the team and help take this over the finish line, and beyond!

If you've ever wanted to design your own programming language, or even just implement a parser for an existing language in Ruby, and found other tools to be difficult to understand and use, Rattler is for you!

If you'd like to be part of making Rattler the language design tool of choice, message me on twitter: @jarhart

Thanks!
Which Ruby implementation is right for your project? While the reference implementation (Ruby MRI) remains the interpreter of choice, an alternate Ruby implementation may be right for your project, depending on your operational goals and constraints. This article showcases the Ruby interpreter implementations and runtimes available today, discussing the advantages and disadvantages of each.
Developers who are well versed in Ruby on Rails (or other MVC implementations) and start learning Ember.js may find it surprising that, even though there’s shared vocabulary, denoted concepts are sometimes very different.

The first and obvious difference comes from the fact both are web frameworks. Rails facilitates the creation of web apps that offer mainly an HTTP interface to interact with. On the other hand, Ember helps creating web apps that interface directly with humans (through clicks, taps, key presses, etc). They are both web application frameworks, but the former is server side and the latter client side.

A look into their workflows will shed light over the main differences.
I just wrote a new article on 5 Reasons Why Rubyist Will Love Swift. I hope you like it.
June 11, 2014
We show you how to turn your rails console into a powerful tool! ~ 5 minutes youtube video
Link to Article

I recently found that despite appearances, all your controller-specific asset files (i.e. assets generated with "rails g controller blah") are actually loaded into every page.

This post explains how to change this behaviour and get the assets loading where you expect.
I gave a talk recently about working with an old codebase (particularly an old rails codebase, though the ideas are applicable more broadly). Here is a video! This is the abstract:

Sometimes you get to start fresh, with the latest version of ruby, the latest web server, the latest database, and your choice of dependencies. But sometimes, you have to work with an old codebase. This codebase might have been started years ago, by tens or hundreds of people, many of whom no longer work for the organization. This talk is the story of one such codebase, and how to work with it every day.
The initial beta of Rails 4 Test Prescriptions by Noel Rappin from Pragmatic is now on sale.

Rails 4 Test Prescriptions is a comprehensive guide to how tests can help you design and write better Rails applications. In this completely revised edition, you’ll learn why testing works and how to test effectively using Rails 4, Minitest 5, and RSpec 3, as well as popular testing libraries such as factory_girl, Capybara and Cucumber.
I wrote a new post on Using Rails 4.1 Secrets for Configuration. Hope you enjoy!
We aim to make microservices more easily available for our Rails and virtual server customers by allowing them to utilize Docker containers running on the same network. We have made the process of getting a machine up and running with Docker super simple. You can get started in a matter of minutes.
Learn more here: https://ninefold.com/news/docker-100/.
June 10, 2014
New service Teatro.io for automatic rails stage.
I just published an article that covers open source security libraries, web services, and reads that any developer should consider before implementing their next Ruby app.
Angular vs Ember. RSpec vs Minitest. Haml vs Slim vs ERB. You have so many choices to make when you start a new project. There are vocal defenders on each side. And soon you realize that you could have started your project in the time you’ve wasted reading that fourth tutorial or 30-comment thread about whether Sass is better than Less. How can you choose the right library, so you can start writing actual code?
We just released Invoker version 1.2.0, which adds support for Linux, https and many other bug fixes. Find more on Invoker website
modular_migration
gem 'modular_migration'
$ rails g model core/user name:string
invoke active_record
create app/models/core/user.rb
create app/models/core.rb
create db/migrate/core/user/20140324105328_create_core_users.rb

modular_migration



modular_migration
Include the gem in your Gemfile:
gem 'modular_migration'

This release fixes a pesky bug where inheritance was broken for column colors. Check out the wiki to see examples of nicely formatted tables. As always the gem is available on rubygems.org with source on github. For those not familiar with "the reporter", it provides a ruby DSL for writing reports with built in features for progress reporting and table formatting. It is very handy for system level and data reporting scripts.
Container controllers, such as UINavigationController or UITabBarController are the core navigation mechanism for many of our applications. The UIKit framework provides us with mechanisms and direction to create our own custom container controllers, which we'll be covering in this episode.

https://motioninmotion.tv/screencasts/30
June 09, 2014
Reorganizating a Rails data model  thomasleecopeland.com
Here are a few things I learned while reorganizing a data model for a web app that had been running for over five years.
A few days ago Aaron Patterson wrote a interesting article about composition vs inheritance with Ruby.
Composition should be preferred, but beware of the unexpected behaviors. This is my personal experience: Three Things To Know About Composition.
Hello, I've created a new GitHub org, that is, wikiscript, that collects (Ruby) scripts that let you turn free-style or semi-structured wiki text into open structured data. A first example is the new football squads reader that reads in a wikitext page and outputs all squads files in the football.db format - so you get an up-to-date World Cup 2014 squads list including all 736 player (32 teams x 23 players). (By the way, three days to kick-off and counting!) Cheers.
June 08, 2014
Just released rufus-scheduler 3.0.8. The scheduler will now fall on its paws during ambiguous DST transitions. Thanks to @junhanamaki for spotting the problem and helping resolve it.
We show you how to get up and running with the writefully gem ~ 13 Minute Video
I compiled a guide to debugging Rails. Included are techniques such as referring to the C debugger, using Gmail's search features to find information in archived exception reports, analysing Memcached usage stats, and setting up log based alerts.

The entire document is broken into sections and contains approximately 30 pages of original content. Hope you find it useful.
I just published DuckPond - a gem for getting around some of the shortcomings of duck typing in a weakly typed language such as ruby.
"swift-ruby" is designed to bring over some good features from Apple's new Swift language to Ruby:

https://github.com/galori/swift-ruby

I implemented only one thing, the ? Optional method operator..please jump in and submit some Pull Requests!

Background:

I just came from Apple's WWDC and watched their introduction of the new Apple Swift programming language.

From Chris Lattner, a Swift developer at Apple personal site: "Of course, it also greatly benefited from the experiences hard-won by many other languages in the field, drawing ideas from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list."

The ? Optional operator is equivalent to ActiveSupport's "try":

The active support version would look like this:

e = Employee.new
e.try(:transfer)


The Swift-Ruby version:

e = Employee.new
e.transfer?


So, clone the repo: https://github.com/galori/swift-ruby, see Apple's reference: https://developer.apple.com/swift/, and submit some PR's.
Claws is a command line based AWS (Amazon Web Services) console that provides a direct interface to ssh into your hosts. Check out a screenshot example of how it works along with other information on github. This release is a simple bug fix that was introduced with the latest version of the Command Line Reporter gem.
June 07, 2014
GemWorld: Knod  kavinder.com
A lighthearted story about how the gem Knod works. Check it Out.
June 06, 2014
In this episode we’ll look at pre-Rails 4.1 and post-Rails 4.1 ways of selecting different views based on the current request. These can be useful for returning mobile views for smart phones or other custom views.

http://www.metacasts.tv/casts/rails-view-variants

* Subscription required.
I've created first part of my guide to creating links aggregation website in rails
June 05, 2014
I just released a tutorial to show you how to configure hourly database and file backups on your server.
Have you ever wondered how rails boots from rails server to a fully working webserver?

I wrote about it!
Some time ago, we decided that we needed to improve the tool that manages our team work in a better way. A a result - we created a "People App". Then we though - if it help us to manage our devs within projects - why not to share it with other? Introducing - People App - hope you'll find it useful guys.
Universal Ruby Gems in 20 Lines of Code  blog.crossplatformruby.com
New article on Cross Platfrom Ruby Blog. It explains how to make your gems run universally in Ruby, RubyMotion and Opal.rb. It literally takes 20 lines of code.
June 04, 2014
The culture of testing is one of the best things about the Rails community. But if you’re coming from a place where you weren’t testing at all, TDD can be especially hard to learn. It’s clear that you can’t really go from zero to TDD in a single step. So, what do you do? How can you learn TDD without being overwhelmed?
We show you why and how you would use enum in your app Rails 4.1 Enum (~ 6 minutes)
Data listing gem for Rails  showcase.sology.eu
Easily create AJAX-enabled data lists
with out-of-the-box support for sorting, filtering and in-place editing. Check our gem SmartListing.
I am collecting feedback on the intro to a Ruby book I am working on...

My own history

I have been coding since I was thirteen, when my Father came home with old IBM clone that he traded for during the 80’s barter craze. Being nearly forty years old now, I have stubbed my toe and left it bleeding in more than a dozen languages now. If I were a construction worker instead of a knowledge worker, I would probably be missing fingers, toes, and possibly a hand or leg.

Continue reading
Docker seems like it's going to change the way we deploy Rails applications and an essential step in taking advantage of this is using it in both development and production. This Rails and Docker Tutorial covers setting up quick and repeatable development environments using Vagrant and Docker.
My post on Client side SSL Certificate Authentication with Rails and Nginx.
June 03, 2014
Ruby on Rails strives to simplify and streamline the web application development process. But while Rails is easy to use, it is also not hard to misuse. This article looks at 10 common Rails pitfalls, including how to avoid them and the problems that they cause.

Link: Top 10 mistakes Ruby on Rails programmers make
I’ve been seeing a lot of tweets from people saying that Swift has basically killed RubyMotion, which is extremely far from the truth, and I’m going to explain why quickly and without much fuss, because people seem to just be saying it without thinking.

Why Swift Will Never Replace RubyMotion