Cool Ruby gem from the team at Stripe which makes it easy to run multiple copies of a single long-lived process. From their announcement post:
Einhorn makes it easy to have multiple instances of an application server listen on the same port. You can also seamlessly restart your workers without dropping any requests. Einhorn requires minimal application-level support, making it easy to use with an existing project.
I’m going to take a seriously look at Einhorn before deploying my next app.
Deploy & host your Rails app on Ninefold’s production grade hosting for free!
Ninefold will waive the first $50 of your monthly invoice to host your Rails app, forever!
RightScale recently unveiled their new Ruby framework. They call it Praxis and it takes a unique approach to building APIs. From the announcement:
With Praxis you create an API by going through the design, review and implementation phases and iterating over them as necessary. Each phase is done independently, and possibly by disjoint sets of people. For example architects could design it, developers implement it and both can review it alongside the customers.
Intrigued? Check out their Getting Started guide to see what this process would look like.
Brilliant ideas can be painfully obvious in retrospect. They’ll leave you thinking, “Why didn’t we I think of that before?!” Docopt is that for parsing CLI arguments.
I used to be a big fan of rack-throttle for rate limiting HTTP requests to Rack applications, but it appears to be abandoned.
Kickstarter’s Rack::Attack looks like a worthy replacement. Gotta love when the explanation of how it works is longer than the code it describes.
Adam and Andrew talked to Postmodern about his open source projects chruby, ruby-install, chgems, ronin and more.
Our good friend Jesse Wolgamott has a great passion for teaching Ruby! That’s exactly why he’s giving our members an exclusive 50% off discount for 6 months to learn Ruby the effective way on any of his plans at Ruby Off Rails.
minicron is a web interface to manage and monitor scheduled tasks across a series of servers. It’s still in early development, but the tool sets out to solve a pain that anybody with more than a few servers has probably felt. I know I have.
minicron is pre-semantic-1.0 and has a roadmap in the readme. Looks like a great time to get involved.
Priscilla is a new Ruby gem from Ju Liu that is a rare combination of hilarious and useful.
The problem Priscilla sets out to solve is the hardship of identifying your own output in a wall of text while print debugging. And she does it with style…
Pakyow sounds like it was named while watching Batman re-runs.
What is it? A Ruby web framework where views are created in isolation from the back-end app. Pakyow’s developers say it:
gives the designer complete control over the front-end through the entire development process.
They have a nice warmup page if you want to see how it all fits together.
One of WordPress’s strengths is the ability to give non-coders a way to generate custom data with the use of shortcodes. Shortcode elegantly brings that classic feature to the Ruby community.
The gem notes using Parsing expression grammar instead of regular expressions to improve the readability and testability of the code. It supports both block tags and self-closing tags, and adding shortcodes is as easy as adding a partial.
- if @attributes[:author]
Shortcode also supports custom presenters for more complex tasks like image galleries. Take a look at the documentation on GitHub.
Promise Anti-patterns, Ansible, npm, CSON is JSON for CoffeeScript, Linuxbrew, Hyper, Dude!, KidsRuby, and more.
Read Weekly – Issue #26
The README to Jorge Manrubia’s Forceps library asks:
Have you ever needed to copy a given user from a production database into your local box in order to debug some obscure bug?
One hundred times: YES!
You just built an API, and want to make sure everyone can use it. Building libraries in every language isn’t only going to be hard, its going to take a lot of time. Time you don’t have. This is where Alpaca can help.
You define your API according to the format, alpaca builds the API libraries along with their documentation. All you have to do is publishing them to their respective package managers.
In Episode #90 we talked with Avdi about pair programming, distributed teams, workflows, and of course, Ruby! Needless to say, we’re big fans of Avdi and his work — and we’re happy to have him sponsor the RSS feed this week.
Don’t just take our word — Avdi has shared an exclusive, Changelog-only, freebie of episode #72 for you to check out (the video above). The episode is called “Random Access” and it kicked off a short mini-series for Avdi where he takes his subscribers on a journey to reimplement a small subset of the UNIX “tail” command in Ruby.
Neat idea from Dan Mayer at Living Social: Coverband is a rack middleware which helps measure production code coverage.
Why would production code coverage data be useful? Because you can use it to find (and then purge) latent code paths in your app. How’d it go at Living Social? Dan says:
After running in production for 30 minutes, we were able very easily delete 2000 LOC after looking through the data. We expect to be able to clean up much more after it has collected more data.
Read more about Coverband on the Living Social Tech Blog.
Que is the new kid on Ruby’s job-backgrounding block.
It takes advantage of PostgreSQL’s advisory locks to provide concurrency, efficiency, and safety. Chris Hanks – Que’s author – in an email to us, says:
…in a benchmark on EC2′s biggest compute-optimized instance it’s capable of queuing and dequeuing almost 10,000 jobs per second, while DelayedJob and QueueClassic max out at around 500
Between that and its built-in support for transactions (for ActiveRecord and Sequel), Que looks pretty tantalizing to this long-time Resque user (and admitted Postgres fanboy).
Dashing is a framework from Shopify for building gorgeous dashboards that can be displayed on large TVs throughout your office.
It ships with pre-made widgets, is completely customizable, and can be deployed to Heroku in a breeze. See Dashing in action here and here.
For members only — Avdi wants you to start learning Ruby with a pro (him). He’s giving our members an exclusive 77% off discount to enjoy RubyTapas for 3 months. Normally a subscription to RubyTapas is $9 per month, but our members save $21 and pay just $6 to get access for 3 months!
Monocle is yet another link and news aggregation site with a tech focus. The site’s creator, Alex MacCaw, has just open sourced the code behind it.
This looks like a shining example of a well-factored Sinatra app powered by PostgreSQL. If you’re just learning Ruby or want to learn some new tricks, give it a read.
We would like to thank Chris Wilson of Bendyworks for contributing this post. Chris has some interesting ideas about the structuring of Rails applications and hopefully this post will get us all thinking and talking.