On Sun, Mar 7, 2010 at 3:23 PM, Paul Jonathan Thompson
<rails...@gmail.com> wrote:
> Can anyone please advise me what is involved in up grading a project
> from version 1.2.6 to current (2.3.5). The project is pretty much
> vanilla code and does not use plugins. Are there scripts that can do
> the job (or pull out incompatibilities). Any websites or blogs that
> point the way or should I just bite the bullet and rewrite? Reason for
> wanting to upgrade is that I now do want to add features and start
> using plugins and of cause a lot of the plugins that I would like to
> use require rails 2.3+
>

First, I'd recommend doing this in steps, first upgrade to Rails 2.0,
then 2.1, then 2.3.5

Why? Rails 1.x to 2.0 was a pretty big change, for some apps 2.0 to
2.1 was even bigger because of some subtle and significant changes to
ActiveRecord.

So I'd do each step, and pause to make sure your tests are working.
You DO have tests don't you?

Googling for rails upgrade, flushed out this article on the first
step, more specific searches are likely to find articles on the
others:

http://www.sitepoint.com/blogs/2008/01/25/upgrading-to-rails-20-a-recipe/

It includes a pointer to a rake task written by Geoffrey Grossenbach
(of Peepcode fame) which find stuff deprecated in 2.0.

Recent versions of Rails have rake tasks to aid in upgrading e.g. in 2.3.5

rake rails:update                                      # Update both
configs, scripts and public/javascripts from Rails
rake rails:update:application_controller               # Rename
application.rb to application_controller.rb
rake rails:update:configs                              # Update
config/boot.rb from your current rails install
rake rails:update:generate_dispatchers                 # Generate
dispatcher files in RAILS_ROOT/public
rake rails:update:javascripts                          # Update your
javascripts from your current rails install
rake rails:update:scripts                              # Add new
scripts to the application script/ directory

I don't recall if 2.0 had these, or at what point they were introduced.

HTH
-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to