An in interview with O’Reilly, Rails creator David Heinemeier Hansson had an excellent response to the obligatory twitter question. To paraphrase, he says that the kind of person that users the A is B, B is C, therefore A is C logic that “Twitter runs on Rails, Twitter Can’t Scale, so Rails can’t scale” simply illustrates their shallow level of technical knowledge.
Amazon invests in Engine Yard to take Rails further into the cloud
Engine Yard has just closed a second round of funding for $15m, including contributions from Amazon, with the focus on increasing their hosting platform and community-driven open source projects. According to Ezra, “We’re going to use this money towards making Ruby the platform of choice for cloud computing and web development in startups and the enterprise alike.” Some of the exciting developments coming out of Engine Yard these days are the merb framework, which is a leaner/quicker Ruby framework insipired by Rails and Rubinius, a pure Ruby implementation of the Ruby virtual machine which aims to solve some of the current performance issues with Ruby. Perhaps most interesting is the yet to be unveiled Vertebra project that has been described as “a new application programming platform for building distributed cloud applications with XMPP”. Rails developers can sleep a bit easier knowing that EY has 80 employees and some of the smartest minds in the community cranking away on the remaining pain points in the Ruby platform (hosting, performance)
mod_rails for Apache - the end of an era?
At the end of last week Phusion, a Netherlands based IT company, launched the Passenger gem, which acts as a mod_rails for Apache. Without going into the technical details, this is as close as Rails has come to having an ‘ftp files to the server and it works’ deployment method. With deployment being one of the steepest learning curves in the Rails world, this announcement could potentially be huge.
So what does this mean for developers who have been using Rails for several years and those who have yet to pick it up? Many Rails developers, who have seen the progression from CGI to FastCGI to Mongrel, Mongrel Cluster, Thin, etc, have been forced to learn a good amount about unix, apache, nginx, monitoring servers, watching processes, etc. Unix command line skills have gone hand in hand with Rails development up to this point. In fact, entire businesses such as Rails Machine, Engine Yard, Planet Argon, etc. are built around the fact that Rails is hard for the average person to deploy (not to mention great open source tools like capistrano, vlad and mongrel itself).
Is this the beginning of a new era for Rails where the last barrier to entry has been removed? It will be interesting to see what kind of effect this has on the current Rails community as real-world data becomes available.
Review: Developing Facebook Platform Applications with Rails by Michael J. Mangino
I spent most of this past weekend working through Michael J. Mangino’s book “Developing Facebook Platform Applications with Rails“(DFPAWR) from the Pragmatic Programmers. I’ve been interested in the facebook platform for awhile but the resources have mostly fallen into two categories: 1) Overly simple Hello World programs in PHP or 2) Exhaustive api references.
DFPAWR, which is still in Beta, walks the reader through creating a full application from start to finish using Chad Fowler’s excellent Facebooker library for Rails. While this is definietly a Rails-centric book, the author provides the underlying FBML code first and then explains how to achieve the same effect using the simplified syntax of the Facebooker library.
It should be noted that the book assumes a strong understanding of the Rails framework. However, this assumption is one of the book’s biggest strengths. DFPAWR is a perfect example of how fast author and reader can hit the ground running when they already speak the same language. Michael Mangino clearly knows his subject matter and readily points out many of the common pitfalls, security concerns, and Facebook terms of use issues (i.e. you can’t store a username in a local database) that those new to the platform would have to stumble through themselves.
It’s a great resource for Rails developers looking to get started on Facebook apps, and with mod_rails on the way it’s never been easier.
Monitoring apache with god
According to the site: God is an easy to configure, easy to extend monitoring framework written in Ruby.
While god is mainly intended for monitoring mongrels it is also a great way to keep an eye on apache itself. Below is our config for watching apache.
%w{80}.each do |port|
God.watch do |w|
w.name = "apache"
w.interval = 30.seconds # default
w.start = "apachectl start"
w.stop = "apachectl stop"
w.restart = "apachectl restart"
w.start_grace = 10.seconds
w.restart_grace = 10.seconds
w.start_if do |start|
start.condition(:process_running) do |c|
c.interval = 5.seconds
c.running = false
end
end
end
end
The code is pretty self-explanatory. We’re just looking to make sure apache is up every 5 seconds.
After gem installing god, save the configuration file anywhere you want and kick if off with this command:
god -c /path/to/your_conf.god
That’s it. To test, kill apache and in less than 5 seconds it will be back up and running.
What makes Ruby so great?
Things you take for granted after using Ruby for awhile:
#This works: topic.posts.length > 0 #The Ruby way: topic.posts.any? #This works: topic.posts[topic.posts.length-1] #The Ruby way: topic.posts.last #This works: if!((foo != nil)&&(foo != '')) #The Ruby way: unless foo.blank?
Other nice things that I don’t care to come up with the harder version by hand for:
5.days.from_now 5.days.ago
note: day.* and .blank? only works in rails, not ruby out the box
Sending mail on a Mac
If you’re developing on a mac and need to send mail OSX comes pre-installed with Postfix. To start it up run:
sudo postfix start
IE Desktop Online Web Browser Live Professional Ultimate Edition for the Internet
So looks like the new version of IE is going to be called… IE8. Not very exciting but it’s funny to see someone at MS make fun of their confusing product names.
http://blogs.msdn.com/ie/archive/2007/12/05/internet-explorer-8.aspx