Dependency injection != Inversion of Control David Heinemeier Hansson, the creator of Rails, recently posted his thoughts on dependency injection. The post is written in an unhelpful inflammatory style, and it’s inaccurate in its use of the terms involved. In particular, there is a confusing conflation of the ideas of dependency injection, a simple programming pattern I use every day, and Inversion of Control (IoC) containers, which are sometimes called “Dependency Injection containers”. These are a heavyweight implementation of dependency injection wrapped around the whole application.
How to Wire Up Ruby on Rails and AngularJS as a Single-Page Application (Gulp Version) - Angular on Rails Why this tutorial exists I wrote this tutorial because I had a pretty tough time getting Rails and Angular to talk to each other as an SPA. The best resource I could find out there was Ari Lerner’s Riding Rails with AngularJS. po-ru.com: Destructuring assignment in Ruby My post on underscores in Ruby attracted quite a lot of interest, particularly on the topic of destructuring assignment, so I thought I’d go into a bit more detail. As mentioned previously, Ruby supports destructuring assignment. You can assign an array to multiple variables both in direct assignment: a, b, c = [1, 2, 3] and in block parameters:
Ruby Programming/Syntax/Control Structures Control Structures Conditional Branches Ruby can control the execution of code using Conditional branches. Recursive Descent Parser for Ruby Sometimes strange things happen. I've been developing a small, basic recursive descent parser for Ruby called RDParse. Just before writing this post I decided to Google that name, and lo and behold the first result is a Ruby recursive descent parser called RDParse, created by Dennis Ranke, that I posted to Code Snippets for posterity several months ago. Since both of these libraries are unlikely to be used at once and that Dennis doesn't seem to be maintaining his version, I've decided to stick with RDParse as the name of mine for now. You can download my RDParse as rdparse.rb.txt, just rename it at your end if you want to use it.
Ruby Version Manager - Installing RVM ∞Quick (guided) Install Before any other step install mpapis public key (might need gpg2) (see security) gpg --keyserver --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 **Note: can sometimes timeout you may want to use different keyserver -