Migrate rails project from 1.1.6 to 2.2.2

Hi all,

My rails application’s current version is 1.1.6, I want to migrate it to
rails 2.2.2.

Please state me the steps what I need to do.

Thanks in advance,
Raju

I did the following.

  1. I changed the rails version to 2.2.2 in environment.rb -
    RAILS_GEM_VERSION = ‘2.2.2’ unless defined? RAILS_GEM_VERSION

  2. from project path I ran a rake task $ rake rails:update

  3. when i run $ ruby script/about. I get the following output. Please
    help me. What next to do - I am converting my rails app from 1.1.6 to
    2.2.2.


    • config.breakpoint_server has been deprecated and has no effect.
  • *******************************************************************
    

/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:530:in
send': undefined methodcache_template_extensions=’ for
ActionView::Base:Class (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:530:in
initialize_framework_settings' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:529:ineach’
from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:529:in
initialize_framework_settings' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:526:ineach’
from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:526:in
initialize_framework_settings' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:154:inprocess’
from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in
send' from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:inrun’
from /home/raju/radrails_workspace/st/config/environment.rb:13
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/about.rb:1
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
from script/about:3

Raju A. wrote:

Hi all,

My rails application’s current version is 1.1.6, I want to migrate it to
rails 2.2.2.

No, you probably want to migrate to Rails 2.3, which is the current
version.

Please state me the steps what I need to do.

Search this forum for detailed information. In brief:

  • Create a new branch in your version control system for the upgrade.
  • Change the RAILS_GEM_VERSION.
  • Run rake rails:upgrade (or whatever it’s called).
  • Update plugins as necessary.
  • See which tests fail.
  • Fix the code so tests pass.

1.1.6 to 2.3 will be a huge jump. You will probably find it easier to
do several smaller upgrades – say, 1.1 to 1.2, then 1.2 to 2.0, and so
on.

Thanks in advance,
Raju

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Thank you Marnen… I am following the same steps. I am directly
upgrading to rails 2.2.2

You may also find this helpful:

http://wiki.rubyonrails.org/getting-started/upgrading

Especially with links to the release notes to find out what has
changed across versions.

Cheers,
Nicholas

On Sep 2, 8:48 am, Raju A. [email protected]

Nicholas H. wrote:
You may also find this helpful:

http://wiki.rubyonrails.org/getting-started/upgrading

Especially with links to the release notes to find out what has
changed across versions.

Cheers,
Nicholas

On Sep 2, 8:48 am, Raju A. <[email protected]>
wrote:

Thank you Marnen.... I am following the same steps. I 
am directly
upgrading to rails 2.2.2
--
Posted viahttp://www.ruby-forum.com/.
    
A useful thing I found when I just completed (mostly) the same trip was to create a dummy project (rails -d mysql tst) using the version of rails I wanted to go to.  I was then able to compare the config files one by one to see what had changed.  There are a lot of changes in config files in that jump and the changes are not automaticly made by the rake task.  You will have to go in and see how each file changed and decide what you want to do.  In a lot of the cases you will just replace your current version of the file with a copy of the later version.  In some cases you will have some reason to do differently just make sure you understand what the differences are and why you want what you want.  It is  not a rote task!

Norm

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

thanks for your reply,

when I run the rake task $ rake rails:update . My default javascript
files ie

  1. prototype.js
  2. controls.js
  3. effects.js
  4. dragdrop.js

Have changed, can I use the new version of these files, is there
anything depreciated compared to the older version.

Thanks in advance,
Raju

While migrating rails project from 1.1.6 to 2.2.2, I am facing the
following problems

  1. how to use acts_as_tree in 2.2.2, I am getting an error,

raju@raju-desktop:~/radrails_workspace/st$ ruby script/about
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:1833:in
method_missing': undefined local variable or methodacts_as_tree’ for
#Class:0xb6b5325c (NameError)
from /home/raju/radrails_workspace/st/app/models/category.rb:13
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:155:in
require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:262:inrequire_or_load’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:221:in
depend_on' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:133:inrequire_dependency’
from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:368:in
load_application_classes' ... 10 levels... from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/about.rb:1 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require’
from script/about:3

  1. I was using prototype version 1.5, now after update in will start
    using 1.6.0.3 is the any depreciation in the 2 versions, will the new
    prototype version work same as the previous version.

Please help me,

Thanks in advance,
Raju

  1. acts_as_tree as tree has been move to a separate plugin, you will
    need to install this:
  1. I wouldn’t expect you to have any issues with upgrading to
    Prototype. Do you have much custom javascript code using Prototype?

Cheers,
Nicholas

On Thu, Sep 3, 2009 at 3:40 AM, Raju

  1. acts_as_tree and prototype are working fine.

I am getting the following error when i use form_remote_tag in rails
2.2.2

compile error
/home/raju/radrails_workspace/st/app/views/admin/predictive_text/_predictive_search.rhtml:19:
syntax error, unexpected ‘)’
}) do ).to_s); @output_buffer.concat “\n”
^
/home/raju/radrails_workspace/st/app/views/admin/predictive_text/_predictive_search.rhtml:70:
syntax error, unexpected kENSURE, expecting kEND
/home/raju/radrails_workspace/st/app/views/admin/predictive_text/_predictive_search.rhtml:72:
syntax error, unexpected $end, expecting ‘)’

Thanks for your reply Nicholas,

Now the only problem I am facing in my application is “form_remote_tag”

How to use form_remote_tag in 2.2.2

I am trying to use it in this way in 2.2.2

<%= form_remote_tag({:url => {:controller => ‘some_controller’,
:action => ‘some_action’},
:update => ‘some_div’,
:loading =>
“Effect.Appear(‘indicator’);”,
:complete => “Effect.Fade(‘indicator’);”,
:html => {:id => ‘some_id’ }
}) do %>

-----------------All Text fields & checkboxes etc etc…

<%end%>

before it was (in 1.1.6)

<%= form_remote_tag({:url => {:controller => ‘some_controller’,
:action => ‘some_action’},
:update => ‘some_div’,
:loading =>
“Effect.Appear(‘indicator’);”,
:complete => “Effect.Fade(‘indicator’);”,
:html => {:id => ‘some_id’ }
}) %>

-----------------All Text fields & checkboxes etc etc…

<%end_form_tag%>

Please help me to use form_remote_tag in rails 2.2.2

Thanks in advance,
Raju

Thanks a lot for your replies, I figured out the problem with
form_remote_tag

Please go through this link
http://mentalized.net/journal/2007/03/13/rails_20_deprecations/

Thanks & regards,
Raju