rails 2.0.2 upgrade, activerecord problems

I've updated to rails 2.0.2 and received the following error when I try to start webrick:

C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:319:in `activate': can't activate activerecord (= 1.15.6), already activated activerecord-2.0.2] (Gem::Exception)

I'm using rubygems 1.0.1 and run on ms vista business. Can anyone help? I've tried searching the project for 1.15.6 with no luck. Thanks for your time.

paul

I've updated to rails 2.0.2 and received the following error when I try to start webrick:

C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:319:in `activate': can't activate activerecord (= 1.15.6), already activated activerecord-2.0.2] (Gem::Exception)

I have the same issue:

script/server

=> Booting Mongrel (use 'script/server webrick' to force WEBrick) => Rails application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... Exiting /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:319:in `activate': can't activate activerecord (= 1.15.6), already activated activerecord-2.0.2] (Gem::Exception)         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'         from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'         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:496:in `require'         from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:229:in `establish_connection'         from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:215:in `establish_connection'         from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:208:in `establish_connection'         from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:234:in `initialize_database'          ... 30 levels...         from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'         from script/server:3

When I create a new Rails app it doesn't have this problem. I've reinstalled all my gems, and I removed the one plugin I had in vendor but none of that helped. To upgrade my app I just did `rails .` like always.

ruby -v

ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-linux]

gem li

*** LOCAL GEMS ***

actionmailer (2.0.2) actionpack (2.0.2, 1.13.6) actionwebservice (1.2.6) activerecord (2.0.2, 1.15.6) activeresource (2.0.2) activesupport (2.0.2, 1.4.4) calendar_grid (1.0.3) capistrano (2.1.0) cgi_multipart_eof_fix (2.5.0) daemons (1.0.9) fastthread (1.0.1) fcgi (0.8.7) gem_plugin (0.2.3) highline (1.4.0) mongrel (1.1.3) mysql (2.7) needle (1.3.0) net-sftp (1.1.0) net-ssh (1.1.2) postgres (0.7.9.2008.01.03) rails (2.0.2) RailsEditor (0.0.28) rake (0.8.1) ruby-debug-base (0.10.0) ruby-net-ldap (0.0.4) rubygems-update (1.0.1) sources (0.0.1) sqlite3-ruby (1.2.1) termios (0.9.4) wirble (0.1.2)

One thing that stands out in this list is the actionwebservice (1.2.6) version. Did it not get bumped up to 2.0.2 like all the other Rails gems? http://rubyforge.org/projects/aws/ says 1.2.6 is the latest.

Stuck. Anyone?

Greg Donald wrote:

One thing that stands out in this list is the actionwebservice (1.2.6) version. Did it not get bumped up to 2.0.2 like all the other Rails gems? http://rubyforge.org/projects/aws/ says 1.2.6 is the latest.

Stuck. Anyone?

-- Greg Donald http://destiney.com/

Are you running MS vista? Just curious. We're not using the actionwebservice here.

No, this is on Linux.

Run `gem cleanup` and it will remove old versions of gems.

--Jeremy

That's not an option in a shared environment.

They need to do gem update if they can (and I’m now assuming they can’t since it’s a shared environment) or specify a correct RAILS_GEM_VERSION in config/environment.rb

OK, then they need to freeze Rails in that case.

   rake rails:freeze:edge

They can freeze a specific tag or revision if they want the stable version.

--Jeremy

Running `gem update` is not a problem, adding new gems is fine. I just can't run `gem cleanup` to take any away as I don't know what other Rails apps might be using any of them.

My problem began when I upgraded this one Rails app that works fine under 1.2.6 to 2.0.2. When upgrading my RAILS_GEM_VERSION became 2.0.2. That's how I found the issue to start with.

Yeah, looks like we're backing away from Rails 2.x for now. Other issues with reverse_proxy_fix have bubbled up in the last hour.

I have the same error on Windows, Firebird & Rails 2.0.2 when running rake db:create. I get solved the problem installing firebird adapter for Rails 2.0.2. The problem was I also installed rails 1.2.5 and ther fireruby gem. When rake started, not found firebird adapter for rails 2.0, but found the adapter for rails 1.2.5: seem this requires activerecord-1.1.5 and then I get the 'already activated activerecord ...'. So maybe you are missing also some gem updated for Rails 2.0.2

Besides all the other headaches the upgrade has given me this was one of many.

Go to your ruby install path where your gems are located. For me its C:\ruby\lib\ruby\gems\1.8\gems ( on windows) on linux I assume the same thing probably like /usr/lib/ruby (just a guess)

in this folder i found that the activerecord-2.0.2- had the end dash, and the version 1.15.3 didn't have the end dash. So I just put the dash on the 1.15.3 and removed it from 2.0.2 and it worked. I actually removed the dash from all the ones i thought were needed.

Thanks

Paul Su wrote:

Cease Cease wrote:

Besides all the other headaches the upgrade has given me this was one of many.

Go to your ruby install path where your gems are located. For me its C:\ruby\lib\ruby\gems\1.8\gems ( on windows) on linux I assume the same thing probably like /usr/lib/ruby (just a guess)

in this folder i found that the activerecord-2.0.2- had the end dash, and the version 1.15.3 didn't have the end dash. So I just put the dash on the 1.15.3 and removed it from 2.0.2 and it worked. I actually removed the dash from all the ones i thought were needed.

I was running into this same problem. every time that i attempted to create a new rails application i received this error:

'activate': can't activate activesupport (= 1.4.4), already activated activesupport-2.0.2] (Gem::Exception)

to fix this problem i removed the dashes from the end of the directory names in the directory:

/Library/Ruby/Gems/1.8/gems

I don't have a dash after activerecord-2.0.2 but I also have the problem of "active: can't activate activerecord (=1.15.2) already activated activerecord-2.0.2 Any idea? Thanks.

Now it works. older version of activerecord was the problem. I uninstall 1.15.2, then it worked.