Double Shot #424
Scraped up a bunch of links this weekend. Let's get to it:
Rails framework upgrades with git-bisect - An example of tracking down the commit that broke your application.
Native Google Chrome on Mac OS X: First Impressions - With a prebuilt binary you can download. It certainly is fast, though still unstable.
Rails Contributors (All time) - Who's got code in the framework? I like the "This year" view, personally.
3, 2, 1... go! Your contact form is ready! - Quick contact forms for Rails applications.
Releasing the Source - The E text editor source is now available on github. License proliferation, though - ugh.
MySQL GUI Tools - Free administration & query browsing GUIs from MySQL themselves.
Benchmarking your Rails tests - How to do it.
Rails Template: Create a Twitter Application in Seconds - Just in case you need such a thing.
RubyMine Beta - I spent some time playing with this IDE on a reasonably large Rails project. It has some very slick stuff, including the debugger and a nice ERD view, but it's definitely unstable and slow at the moment.
Welcome to Rake - A basic guide to get started with.
Double Shot #423
April is the cruelest month for accounts receivable, apparently.
Crack, The Easiest Way to Parse XML and JSON - Extracted from HTTParty.
Announcing Amazon Elastic MapReduce - Sexy, but I don't know that I'll ever have a use for it.
Changes 1.5 - Commercial comparison and synchronization utility, now with support for scripting and TextMate baked in.
Double Shot #422
There was some actual news yesterday, though as I expected finding it required wading through lots of dreck.
Engine Yard Lowering Pricing for Rails in the Cloud - EY has brought down the prices for their Solo solution (managed Rails on EC2), including a much nicer $25 minimum for kicking the tires.
Vegas Scam - Further evidence that moving RailsConf to Vegas is not such a hot idea.
Piston 2.0 Finally Released: With Git, Subversion and Ruby 1.9 - What more could you ask? A major update.
Double Shot #421
I am doing my best to ignore the predictable unfunny April Fool's jokes this year. Many people on the Internet are not half so funny as they think they are.
BrowserCMS: Another CMS for Rails that's apparently mature enough to start testing.
Phusion Passenger 2.1.3 released - Looks like mostly bugfixes.
Introducing Ruby Helper - Rails and Ruby docs on your iPhone.
harken - The start of a DSL for describing XMPP bots with ruby.
Double Shot #420
Anyone looking for some consulting work in the second half of April? My dance card may have an opening.
Authlogic 2.0 with some OpenID goodness - A major new Autologic release. This has certainly become one of the standards for authentication in Rails.
OAuth Explained and What It Is Good For - A primer from John Nunemaker.
2009 Rubyist's guide to a Mac OS X development environment - Quick setup advice from Dan Croak, with an emphasis on getting stuff done rather than building stuff from scratch.
Double Shot #419
A few more days and this month will be history. I could use another one in its place anyhow.
Google Checkout still unfit for business: I got my money, but would you? - Amy Hoy follows up on her experiences with Google.
The Git Community Book - Something else that I need to find time to read.
harsh - A Rails syntax highlighter that play nice with ERB and HAML.
chartbeat - Real-time website traffic monitoring. Looks interesting.
Building Ruby 1.9.1 on Windows - Dirty job, but someone needs to do it.
Double Shot #418
This month is ending with a bang, and it looks like next month will start with one. The consulting life is never boring.
Testing outbound emails with Cucumber - Dr Nic is still high on Cucumber. I'm not especially, but this is a useful walkthrough if you're getting into BDD.
Google is Evil, Worse than PayPal: Don't use Google Checkout for your business - Amy Hoy shares a very ugly experience.
Double Shot #417
Our youngest child appears to be over the whole "sleeping at night" thing.
EcomPages - Open source Rails shopping cart.
Ruby on Rails: Easy Navigation - Plugin to handle a lot of the grunt details of menu-based navigation in views.
Double Shot #416
Sent most of yesterday deep in the Rails core code. Hopefully some patches will come out with me when I emerge.
Scrap - Rails Metal endpoint that tracks garbage and memory-related metrics.
Default Scopes and Inheritance to the rescue - And you thought there was no need for pure Ruby inheritance on AR classes.
Rails Searchable API Doc - Another version of the Rails RDoc, this one with some interesting search tools.
Double Shot #415
As spring sets in, the garden is trying to call me away from my computer.
Rails 2.3 Dictionary - Priit Haamer has released his OS X dictionary version of the Rails RDoc, updated to the latest.
Using default_scope to recreate acts_as_paranoid in ActiveRecord 2.3 - The result being an is_paranoid gem you can use.
TwitterAuth: For Near-Instant Twitter Apps - A useful gem/plugin for Rails applications wanting to work with Twitter.
Introducing HTMLEdit… errr, Espresso 1.0! - MacRabbit's new HTML development tool is released.
Django 1.1 beta released - That other web framework is moving along.
Rails 2.3 Dictionary - Priit Haamer has released his OS X dictionary version of the Rails RDoc, updated to the latest.
Double Shot #414
Looks like I've got a hole coming up in my schedule the second half of April. So it's time to nail down some work for that timeslot.
Rails 2.3 Support (Major Plugin Refactoring) - Exceptional joins the list of services that are ready for Rails 2.3.
One Laptop Battery Later And I'm a Django Fan - A review from the kinder, gentler Zed Shaw.
Ruby-GetText-Package-2.0.0 - I18n package now updated with support for Rails 2.3.2.
libxml-ruby 1.1.3 - Boosting Performance - The battle of the Ruby XML libraries continues.
.NET MVC vs Ruby on Rails - Rundown from someone who has tried both.
sinatra-tailer - Sinatra app to view log files with automatic updating.
sevenup - JavaScript code to pressure people to upgrade from IE6 to, well, anything.
Batting Clean-up
I've spent a lot of time over the past few years working with Rails projects that were written by other people. Sometimes I've come on as a subcontractor to an existing codebase, sometimes I've taken over when another developer got bored or fired, sometimes I've been asked to do a code review.
Over the course of these engagements I've come up with a strategy for getting up and running on a new-to-me Rails codebase quickly. There aren't any hard and fast rules; there are still a lot of variable factors. But overall, I find these guidelines useful:
Start in environment.rb and figure out which version of Rails the project needs. In my case, I'm working with everything from 1.1.6 to 2.3.2.1 at the moment, so using gem Rails is pretty much a non-starter. If a project doesn't have vendored Rails when I get it, it will as soon as I figure out what version it wants to see. If you do vendor Rails into a shared project where others are working with gems, don't forget to .gitignore vendor/rails.
Next I look at bringing the database up from scratch. If at all possible, I ask for a copy of a current production database to avoid doing this. If I can't get one, I'll start by running migrations, just to see whether the migrations have been maintained. If migrating from scratch blows up, there's always schema.rb.
Next comes searching the code for
I spend a few minutes exploring vendor/plugins to see what non-gem plugins the project depends on as well. If it's using any that I'm not familiar with, I check out the readme - assuming there is one.
With the app running, I turn to the MVC heart of things. Here, the models are my first stop. If there are a reasonable number of models (say, anything under about 30) I just start at the top and look at each one, making particular note of association declarations. I haven't found an automatic ERD tool for Rails that I like, so I use this information to sketch out an ERD by hand, sorting out how the major entities connect to each other.
Next for me is
Finally I'll spot check some views and helpers to see how clean the code looks. Usually I don't try to read all the views, though, unless the first couple I touch on show me systemic problems.
By the time this process is done, I usually have a rough handle on how the code is structured. Combine that with some exploratory use of the running application on my local box, and Rails' conventions, and I can go in and find the code that needs to be improved, evaluated, or fixed.
Over the course of these engagements I've come up with a strategy for getting up and running on a new-to-me Rails codebase quickly. There aren't any hard and fast rules; there are still a lot of variable factors. But overall, I find these guidelines useful:
Start in environment.rb and figure out which version of Rails the project needs. In my case, I'm working with everything from 1.1.6 to 2.3.2.1 at the moment, so using gem Rails is pretty much a non-starter. If a project doesn't have vendored Rails when I get it, it will as soon as I figure out what version it wants to see. If you do vendor Rails into a shared project where others are working with gems, don't forget to .gitignore vendor/rails.
Next I look at bringing the database up from scratch. If at all possible, I ask for a copy of a current production database to avoid doing this. If I can't get one, I'll start by running migrations, just to see whether the migrations have been maintained. If migrating from scratch blows up, there's always schema.rb.
Next comes searching the code for
require
to see if I can figure out what gems the project needs (in rare cases, there are gems specified via the gem.config
route, but so far I'm not seeing much of that). I install and upgrade any gems I can see as required, and then try to actually run the project via script/server
. Usually this fails a few times as I discover missing dependencies, but I like to give it a few tries so I can have the code up and running while I explore it.I spend a few minutes exploring vendor/plugins to see what non-gem plugins the project depends on as well. If it's using any that I'm not familiar with, I check out the readme - assuming there is one.
With the app running, I turn to the MVC heart of things. Here, the models are my first stop. If there are a reasonable number of models (say, anything under about 30) I just start at the top and look at each one, making particular note of association declarations. I haven't found an automatic ERD tool for Rails that I like, so I use this information to sketch out an ERD by hand, sorting out how the major entities connect to each other.
Next for me is
routes.rb
. Looking at this file is usually a good way to judge the sophistication of the previous developers. It also gives me some URLs to try out on the running code to see what happens. After I understand the basic routing, I'll spend some time in controller code, looking to see if it seems unduly fat or otherwise confusing.Finally I'll spot check some views and helpers to see how clean the code looks. Usually I don't try to read all the views, though, unless the first couple I touch on show me systemic problems.
By the time this process is done, I usually have a rough handle on how the code is structured. Combine that with some exploratory use of the running application on my local box, and Rails' conventions, and I can go in and find the code that needs to be improved, evaluated, or fixed.
Double Shot #413
I wonder whether more people turn to SEO as a solution in times of economic downturn.
Get Paid to Work on Rails - Rails is sponsoring some students in the Google Summer of Code program this year.
The trouble with mocks (or design versus acceptance) - The debate about mocks in testing will never end.
Does Ruby Dream an Eclectic Shell? - I don't do enough work in the shell to want to bother replacing bash, but here's an all-Ruby replacement coming down the pike.
A Rails App in Seconds - Online Rails application template generator that can install a bunch of gems and plugins, capify things, and so on.
Double Shot #412
If you've got a project that need Rails coding, it looks like I may have some time coming up in the next month or two.
JRuby 1.2.0 Released - If you're in an upgrading mood, here's another major chunk just out.
Moonshine: What burns blue makes your blues go away - New overarching solution for provisioning and deploying to Rails servers from the Rails Machine folks.
JRuby 1.2.0 Released - If you're in an upgrading mood, here's another major chunk just out.
Rails 2.3.2.1
Rails 2.3.2.1 is out. There's some confusion about this floating around already, so here's the scoop as I understand it:
To fix this, the Rails team has re-tagged the master tree at a safer spot, after the critical fix. This new tag is for release 2.3.2.1. So if you're freezing Rails 2.3 into your applications (as opposed to running it from gems) be sure to use
- The original Rails 2.3.2 gems were built including this commit from the Rails master tree, which is critical for proper functionality.
- The 2.3.2 tag in GitHub unfortunately points to this commit, which is before the critical fix.
- The net result is that
rake rails:freeze:edge RELEASE=2.3.2
would freeze a bad version of Rails into your application.
To fix this, the Rails team has re-tagged the master tree at a safer spot, after the critical fix. This new tag is for release 2.3.2.1. So if you're freezing Rails 2.3 into your applications (as opposed to running it from gems) be sure to use
rake rails:freeze:edge RELEASE=2.3.2.1
. That .1 makes all the difference.
Double Shot #411
It gets harder to concentrate on code as the weather gets nicer.
inaction_mailer - Plugin to save delivered emails as files during development.
Bring Down IE6 - Amen.
BlueRuby - Ruby on SAP'S ABAP stack. Odds are good that Rails will not run on this, I expect.
Double Shot #410
The big news: Rails 2.3: Templates, Engines, Rack, Metal, much more!
The footnote: If you're grabbing it from GitHub, use edge for the moment rather than the 2.3.2 tag, which points to the wrong commit.
Twibot: A microframework for Twitter bots in Ruby - I don't really approve of calling every darned library a "framework," but this looks useful anyhow.
rspec-1.2, rspec-rails-1.2 (and rails-2.3) - Also on the upgrade front, rspec users need a new version to go with new Rails.
Ubuntu Server on Amazon - Beta programme now open - More for the cloud computing fan.
The footnote: If you're grabbing it from GitHub, use edge for the moment rather than the 2.3.2 tag, which points to the wrong commit.
Double Shot #409
Rails news: commit 73fc42cc0b5e94541480032c2941a50edd4080c2
Redcard - Textmate-ish programmer's editor for Gnome.
Rails contributors - It really doesn't take that much to get into the top 50, does it? But there's a power law involved here.
Wirble - Colorization, tab-completion, and other enhancements for IRB.
Hirb - Irb On The Good Stuff - Fancy views for IRB.
Rails Test Prescriptions is now on sale - Beta version of new ebook on testing.
Installing CouchDB From Source On Mac OS X - Maybe some day I'll need this.
CronWTF! - Find out what a cron job does even if you're not the sysadmin type.
copy-as-rtf-tmbundle - Another Dr. Nic project, this one for copying formatted text out of TextMate.
yaripe - "Yet Another RESTful In Place Edit" plugin.
Double Shot #408
Double Shot #407
I'm sure there's a much as ever out on the internet, but I've been overloaded lately. Still dredged up a few links:
Rails Hosting Survey 2009 - The Planet Argon folks have posted the results of their survey.
Update on Rails Guides and Documentation - The Rails documentation projects are still moving along nicely.
Stopping your Rails application with Phusion Passenger - A useful bit of mod_rewrite magic from the Nodeta folks.
subscribe via RSS