2.0 Upgrade Woes

I've upgraded to Rails 2.0.2. I installed Gems 1.1.1 then upgraded rails via a gem install. I've had problems fixing my existing previous 1.X applications, but I'll wait on that.

For now, for testing, I created a new web app using the "rails" command. I then just removed the index.html file from public, uncommented the map.root command and created the welcome controller, etc.

The app isn't starting correctly and when I check the Apache logs the newly created 2.0.2 app is bombing with the following error:

/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1532:in `method_missing': undefined method `partial_updates=' for ActiveRecord::Base:Class (NoMethodError)     from /my/project/dir/config/initializers/new_rails_defaults.rb:5     from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'     from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'     from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'     from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'     from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:342:in `load_application_initializers'     from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:341:in `each'     from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:341:in `load_application_initializers'     from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:116:in `process'     from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `send'     from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `run'     from /my/project/dir/public/../config/environment.rb:13     from /my/project/dir/public/dispatch.fcgi:21:in `require'     from /my/project/dir/public/dispatch.fcgi:21

I've upgraded to Rails 2.0.2. I installed Gems 1.1.1 then upgraded rails via a gem install. I've had problems fixing my existing
previous 1.X applications, but I'll wait on that.

It looks like you got edge rails gems (ie not 2.0.2 at all. If it told
you it was installing 2.0.2.9216 (where the number right at the end is
probably different) then that's the problem . There have been a few
cases of this happening recently so you should be able to find how to
deal with this, but the short version is to either explicitly ask for
version 2.0.2 or to remove gems.rubyonrails.org from your sources list
and reinstall them (probably removing the current ones).

Fred

It looks like you got edge rails gems (ie not 2.0.2 at all. If it told you it was installing 2.0.2.9216 (where the number right at the end is probably different) then that's the problem . There have been a few cases of this happening recently so you should be able to find how to deal with this, but the short version is to either explicitly ask for version 2.0.2 or to remove gems.rubyonrails.org from your sources list and reinstall them (probably removing the current ones).

Well it did say: Successfully installed rails-2.0.2.9216

It should have installed something else?

It should’ve installed rails-2.0.2. You’re checking it out from gems.rubyonrails.org which will get you the very latest code.

Did you follow any sort of tutorial that mentioned about adding this as a source for your gems? Did you add this as a source?

It looks like you got edge rails gems (ie not 2.0.2 at all. If it
told you it was installing 2.0.2.9216 (where the number right at the end
is probably different) then that's the problem . There have been a few cases of this happening recently so you should be able to find how to deal with this, but the short version is to either explicitly ask for version 2.0.2 or to remove gems.rubyonrails.org from your sources
list and reinstall them (probably removing the current ones).

Well it did say: Successfully installed rails-2.0.2.9216

It should have installed something else?

That is the wrong gem, you want just 2.0.2

Fred

Ryan Bigg wrote:

It should've installed rails-2.0.2. You're checking it out from gems.rubyonrails.org which will get you the very latest code.

Did you follow any sort of tutorial that mentioned about adding this as a source for your gems? Did you add this as a source?

Yes I added this as a source. Here's the command I used:

gem install rails --source http://gems.rubyonrails.org

Ok, that’s not supposed to be done that way.

Who told you to do it that way?

Ryan Bigg wrote:

Ok, that's not supposed to be done that way.

Who told you to do it that way?

Most of the blogs I get related to "upgrading rails 2.0.2" returned by Google search results. I initially tried it *without* the --source tag (as stated on the rails download page) but that also didn't work.

Apparently the different Rails versions installed was causing a problem. I uninstalled all previous versions of rails and loaded 2.0.2 (not the .9216 version) and that seems to have done the trick. Now to slowly port my 1.2.X apps over.

Hello,

I am writing in reference to this post: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/8e3a311149d36893

I don't mean to bother you, but I noticed you successfully uninstalled the proper gems. I've got myself into the same situation. I've managed to use the help system to remove the wrong source and remove the 2.0.2.9216 gems. I am still getting an error close to what the original was, when I try and create a controller. Can you provide a bit more detail about how you removed them/corrected the problem? I think I am almost there, but there is some sort of dependency problem. I am on OS X Leopard, but I am sure I could manage to translate should you be on pc. Again, I am sorry for bothering you and thank you for taking the time to read this. I am going to lose it, soon.... :slight_smile:

Thanks,

--John