Rails 2.0 Compatibility Script

Posted by Justin Reagor Sun, 30 Sep 2007 01:26:00 GMT

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 => 10

From 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.”

Trackbacks

Use the following link to trackback from your own site:
http://blog.kineticweb.com/articles/trackback/64

Comments

Leave a response

Comments