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.
Build sequences using Ruby's Enumerator
The Enumerator class is one of my favorites, and in this post I take a quick look at using it to build sequences of numbers.
Paste text from Vim when it's suspended (ctrl+z)
I’m using Ubuntu and terminal vim and I have this workflow that I would yank something in Vim, suspend it (ctrl+z) and then paste the yanked text on command line usually to do a search with ack. For some reason when I suspend Vim, X Window clipboard gets empty and it will paste nothing. Here is a small vim function that will fix that by using xsel.
another automatic redis master/slave failover solution for ruby
The most popular redis failover solution for ruby is redis_failover based on ZooKeeper, I implemented another automatic redis master/slave failover solution, called redis-sentinel, which is based on Redis Sentinel.
Simple Ruby Wrapper for the Bit.ly Social Data API
Just open sourced a Ruby wrapper for the Bitly Social Data API. Check it out on Github: https://github.com/sharethrough/bitly-social-data-api
How to decrease coupling in your controllers & views with decent_exposure for better maintainability
I wrote up a detailed post about the decent_exposure gem. It goes into how controllers and views have strong coupling due to the passing of instance variables. The rest of the post details how you can use decent_exposure to cleanup your controllers.
Waza 2013 Registration Open
Last year Heroku’s developer conference, Waza, sold out in hours. February 28th, 20 speakers grab your ticket while you still can.
JRuby and vlcj - A Simple Full-Screen Media Player
A simple JRuby script showing how to use the vlcj library to play back full-screen video on a Linux machine.
Asset pipeline internals, Sprockets and rake-pipeline
I just published an article about asset pipeline internals covering how they work, and how to build your own with Sprockets or rake-pipeline.
Updating Rails
Hopefully all Rails developers are now aware they should immediately upgrade to Rails 3.2.11 because of a recently announced security vulnerability. If you’re reading RubyFlow, you likely know how to update Rails. However, for part-time and hobby developers, here’s an article Updating Rails that offers instructions and advice.
Long Live Padrino (and Sinatra)
After the last release of Padrino several months ago, we have had a long hiatus of new releases. Well, in the spirit of the new year we have a renewed commitment to Padrino and a couple of announcements. First, we have a new core team member Darío Cravero. Second, we have a Padrino meetup in San Francisco on the 24th which we would love for anyone interested in the area to attend. Finally, we have a new release soon with a whole host of important changes and bug fixes. If you have any questions or feedback for us, please let us on on twitter @padrinorb.
Evidence-based software development
I’m thinking of starting up a community funded project to do some scientific experiments that would be focused on answering questions that everyday programmers might benefit from. I’d love to hear your feedback on my initial ideas about this project, so please check out this gist.
Understanding New Relic Queuing
Most of us have all seen that dreaded seafoam green graph when using New Relic. You know the one - request queueing. Sending a cold shiver up your spine, it depicts a slow application struggling to serve your users and an increasing probability that those users will “bounce” away from your app and into the arms of another. [more inside]
Gem Badge - the new way to identify RubyGems on Github
Just wanted to share my latest project for the Ruby community. Gem Badge is an image to be embedded into the README file for your RubyGem source, that helps your visitors to find the latest version of your Gem from Github.
ActiveResource XML bug fix for Rails 3.0.19
There’s a current issue with ActiveResource raising the error Hash::DisallowedType: Disallowed type attribute: "yaml" when requesting XML from Rails v3.0.19. It should be fixed soon in v3.0.20. You can find more information in our blog post.
RubyConf Uruguay 2013 - Call for Proposals
Hello!, the new RubyConf Uruguay site is live!. We are accepting Talk Proposals and early bird tickets are available!
Rails PoC exploits for CVE-2013-0156 and CVE-2013-0155
I finished developing Proof-of-Concept (PoC) exploits for Rails vulnerabilities CVE-2013-0156 and CVE-2013-0155. Read the write up or read the exploits: rails_dos.rb, rails_jsonq.rb, rails_sqli.rb, rails_rce.rb. If you haven’t already upgraded Rails, DO IT NOW!
Auto-reload require files in Rails without restarting server
Here’s my findings on how to auto-reload require files in Rails without restarting server. The solution is now released as require_reloader gem, with Rails 3+ support including 3.1 and 3.2. Feedbacks are welcomed.
Checkout this awesome API Generation Platform!
We just launched EmergentAPI, API Generation on the fly for Mobile and Web Apps. Rack Based Platform.
When One Second Isn't: Tracking EventMachine Latency
A quick method using Instrumental to gauge when your EventMachine server is over capacity.
Ditch YAML and Embrace Ruby's Lisp Heritage
Ruby (Rails database configuration, I’m looking at you) should embrace its Lisp heritage move to using Ruby instead of YAML for configuration. Let me know what you think.
Foreman as process manager, Pow as DNS server
In development Foreman manages output streams, responds to crashed processes, and handles user-initiated restarts and shutdowns. One downside to Foreman is typing http://localhost:3000, http://localhost:3100, etc. into the web browser, incrementing the port number for each app, forgetting which port is which app. Pow has a DNS server, capable of port proxying to Rack apps. So, we can use Foreman as process manager, Pow as DNS server.
SocialStream the social network framework has reached 1.0
Social stream Has reached the 1.0 milestone. Social Stream is a solid framework for building any type of contact and content-oriented social network. It is divided into components that provides developers with flexibility to use what they need. Built in functionality include basic functionalities of contacts, streams and walls, files, events and even XMPP based chat support.
Simple Passive Code Generation
Code generation isn’t beyond any developer capable of writing the simplest script.
A collection of Ruby books compiled by a Rubyist of 7 years
As a side project, I’ve put together a site with collections of books from Amazon. I hope you all find the books useful. While the links are affiliate links, I hope I’m providing the community with something of value by collecting these resources in one place and adding little notes on why they’re useful to Rubyists. I’d love any suggestions!