I think you need to do what you can to remove whatever real or artificial memory limit you have. Typically, a Rails app will grow far beyond 25mb when under heavy use, regardless of what version you’re using. You can verify that yourself by hitting your application’s URL with httperf Rails 1.2 does consume a bit more memory than previous versions though.
i think they were asking similar questions:
http://groups.google.com/group/rubyonrails-talk/browse_frm/thread/5347b34338c2fda2/#
With memory restrictions like that you may want to consider Merb or Camping, lighter Ruby frameworks. Rails has a LOT of stuff that loads… the view layer is especially heavy.
You may want to look at http://railsexpress.de/blog/ as there is quite a bit of information there on optimizing Rails.