# Rails 2.0.2 upgrade, activerecord problems

**URL:** <https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938>\
**Category:** Rails\
**Created:** [January 3, 2008, 9:53pm UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938 "2008-01-03T21:53:18Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![azgar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@azgar](https://www.ruby-forum.com/u/azgar)\
**Post date:** [January 3, 2008, 9:53pm UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938/1 "2008-01-03T21:53:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![azgar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@azgar](https://www.ruby-forum.com/u/azgar)\
**Post date:** [January 3, 2008, 10:09pm UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938/2 "2008-01-03T22:09:46Z")

</div>

On 1/3/08, Paul S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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](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/](http://rubyforge.org/projects/aws/) says 1.2.6 is the latest.

Stuck. Anyone?

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)

---

<div class="post-metadata">

**Author:** ![azgar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@azgar](https://www.ruby-forum.com/u/azgar)\
**Post date:** [January 3, 2008, 10:51pm UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938/3 "2008-01-03T22:51:57Z")

</div>

Greg D. 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/](http://rubyforge.org/projects/aws/) says 1.2.6 is the latest.
> 
> Stuck. Anyone?
> 
> –  
> Greg D.  
> [http://destiney.com/](http://destiney.com/)

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

---

<div class="post-metadata">

**Author:** ![azgar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@azgar](https://www.ruby-forum.com/u/azgar)\
**Post date:** [January 3, 2008, 10:56pm UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938/4 "2008-01-03T22:56:38Z")

</div>

On 1/3/08, Paul Su [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

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

No, this is on Linux.

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)

---

<div class="post-metadata">

**Author:** ![azgar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@azgar](https://www.ruby-forum.com/u/azgar)\
**Post date:** [January 3, 2008, 11:01pm UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938/5 "2008-01-03T23:01:22Z")

</div>

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

–Jeremy

On Jan 3, 2008 4:09 PM, Greg D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> /usr/local/lib/ruby/site\_ruby/1.8/rubygems.rb:319:in `activate': can't from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:229:in `gem\_original\_require’
> 
> > ruby -v  
> > activeresource (2.0.2)  
> > mysql (2.7)  
> > sources (0.0.1)
> 
> –  
> Greg D.  
> [http://destiney.com/](http://destiney.com/)
> 
> >

–  
[http://www.jeremymcanally.com/](http://www.jeremymcanally.com/)

My books:  
Ruby in Practice

> **[Ruby in Practice](https://www.manning.com/books/ruby-in-practice)**
>
> Like Ruby itself, Ruby in Practice will make you more productive. The book shows you practical techniques and strategies for small projects and large-scale environments. A cookbook-style reference, it gives you concrete examples of systems...

My free Ruby e-book

> **[Site not found · DreamHost](http://www.humblelittlerubybook.com/)**
>
> The owner of this domain has not yet uploaded their website.

My blogs:

> **[Site not found · DreamHost](http://www.mrneighborly.com/)**
>
> The owner of this domain has not yet uploaded their website.

[http://www.rubyinpractice.com/](http://www.rubyinpractice.com/)

---

<div class="post-metadata">

**Author:** ![azgar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@azgar](https://www.ruby-forum.com/u/azgar)\
**Post date:** [January 3, 2008, 11:04pm UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938/6 "2008-01-03T23:04:18Z")

</div>

On 1/3/08, Jeremy McAnally [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

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

That’s not an option in a shared environment.

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)

---

<div class="post-metadata">

**Author:** ![azgar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@azgar](https://www.ruby-forum.com/u/azgar)\
**Post date:** [January 3, 2008, 11:39pm UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938/7 "2008-01-03T23:39:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![azgar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@azgar](https://www.ruby-forum.com/u/azgar)\
**Post date:** [January 3, 2008, 11:47pm UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938/8 "2008-01-03T23:47:14Z")

</div>

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

On Jan 3, 2008 5:03 PM, Greg D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Greg D.  
> [http://destiney.com/](http://destiney.com/)
> 
> >

–  
[http://www.jeremymcanally.com/](http://www.jeremymcanally.com/)

My books:  
Ruby in Practice

> **[Ruby in Practice](https://www.manning.com/books/ruby-in-practice)**
>
> Like Ruby itself, Ruby in Practice will make you more productive. The book shows you practical techniques and strategies for small projects and large-scale environments. A cookbook-style reference, it gives you concrete examples of systems...

My free Ruby e-book

> **[Site not found · DreamHost](http://www.humblelittlerubybook.com/)**
>
> The owner of this domain has not yet uploaded their website.

My blogs:

> **[Site not found · DreamHost](http://www.mrneighborly.com/)**
>
> The owner of this domain has not yet uploaded their website.

[http://www.rubyinpractice.com/](http://www.rubyinpractice.com/)

---

<div class="post-metadata">

**Author:** ![azgar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@azgar](https://www.ruby-forum.com/u/azgar)\
**Post date:** [January 4, 2008, 12:11am UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938/9 "2008-01-04T00:11:58Z")

</div>

On 1/3/08, Jeremy McAnally [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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.

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.

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)

---

<div class="post-metadata">

**Author:** ![azgar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@azgar](https://www.ruby-forum.com/u/azgar)\
**Post date:** [January 4, 2008, 12:10am UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938/10 "2008-01-04T00:10:11Z")

</div>

On 1/3/08, Ryan B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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

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.

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)

---

<div class="post-metadata">

**Author:** ![azgar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@azgar](https://www.ruby-forum.com/u/azgar)\
**Post date:** [January 9, 2008, 3:57am UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938/11 "2008-01-09T03:57:20Z")

</div>

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:

> 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

---

<div class="post-metadata">

**Author:** ![azgar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@azgar](https://www.ruby-forum.com/u/azgar)\
**Post date:** [January 7, 2008, 6:18pm UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938/12 "2008-01-07T18:18:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![azgar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@azgar](https://www.ruby-forum.com/u/azgar)\
**Post date:** [March 19, 2008, 10:00pm UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938/13 "2008-03-19T22:00:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![azgar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@azgar](https://www.ruby-forum.com/u/azgar)\
**Post date:** [March 19, 2008, 11:37pm UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938/14 "2008-03-19T23:37:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![azgar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@azgar](https://www.ruby-forum.com/u/azgar)\
**Post date:** [March 3, 2008, 12:30am UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-activerecord-problems/124938/15 "2008-03-03T00:30:16Z")

</div>

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
