Rails 2.0 Compatibility Script
X-posted from another blog (forget which, maybe Ruby Inside)... here is a lil script that will check your Rails apps for compatibility issues against Rails 2.0.
http://pastie.caboo.se/99900.txt?key=krcevozww61drdeza13e3a
That is the pastie text link, in case you would like to wget/curl the file down to your local machine. Comment in the script also notes that you can run it using wget/curl, and gives the relevant commands. Wouldn’t it be nice to include an alias for that? ;)
Also, below is an example of some output it gave me on an app I’m currently working on with Rails 1.2.3…
Your application doesn't seem ready to upgrade to Rails 2.0. Please take a
moment to review the following:
-- breakpoint server -----------------------------------------------------------
The configuration option has been removed in favor of the better ruby-debug
library. (changeset 6627)
gem install ruby-debug
Remove the line(s) from configuration since the setting has no effect anymore.
Instead, start `script/server` with the "-u" or "--debugger" option (or "-h"
to see all the options).
files:
config/environments/development.rb:12: config.breakpoint_server = true
-- pagination ------------------------------------------------------------------
Pagination has been extracted from Rails core. (changeset 6992)
script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination
Alternative: you can replace your pagination calls with will_paginate (find it
on http://rock.errtheblog.com/).
files:
app/controllers/admin/categories_controller.rb:14: @category_pages, @categories = paginate :categories, :per_page => 10From the example above its clear that this script gives you at the very least some where to start. I can’t imagine it will find everything. :) Now for that script that will convert all my Rails apps to Merb! ;)
Author Notes: “NOTE: this script does simple, regular expression searches. It might not be right at all times. Consider this script just for informative purposes.”
