Forum: Ruby on Rails rails 2.0.2 upgrade, activerecord problems

0f6667b4d21ec95487b11ea729ef7024?d=identicon&s=25 Paul Su (paulsc)
on 2008-01-03 21:53
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
Aad37b5f7116c8d1f547d23b37566032?d=identicon&s=25 Greg Donald (destiney)
on 2008-01-03 22:09
(Received via mailing list)
On 1/3/08, Paul Sullivan <rails-mailing-list@andreas-s.net> 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
=> 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
http://destiney.com/
0f6667b4d21ec95487b11ea729ef7024?d=identicon&s=25 Paul Su (paulsc)
on 2008-01-03 22:51
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.
Aad37b5f7116c8d1f547d23b37566032?d=identicon&s=25 Greg Donald (destiney)
on 2008-01-03 22:56
(Received via mailing list)
On 1/3/08, Paul Su <rails-mailing-list@andreas-s.net> wrote:
> Are you running MS vista? Just curious. We're not using the
> actionwebservice here.

No, this is on Linux.


--
Greg Donald
http://destiney.com/
6d3c187a8b3ef53b08e3e7e8572c4fea?d=identicon&s=25 Jeremy McAnally (Guest)
on 2008-01-03 23:01
(Received via mailing list)
Run `gem cleanup` and it will remove old versions of gems.

--Jeremy

On Jan 3, 2008 4:09 PM, Greg Donald <gdonald@gmail.com> 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 Donald
> http://destiney.com/
>
>
> >
>



--
http://www.jeremymcanally.com/

My books:
Ruby in Practice
http://www.manning.com/mcanally/

My free Ruby e-book
http://www.humblelittlerubybook.com/

My blogs:
http://www.mrneighborly.com/
http://www.rubyinpractice.com/
Aad37b5f7116c8d1f547d23b37566032?d=identicon&s=25 Greg Donald (destiney)
on 2008-01-03 23:04
(Received via mailing list)
On 1/3/08, Jeremy McAnally <jeremymcanally@gmail.com> wrote:
>
> Run `gem cleanup` and it will remove old versions of gems.

That's not an option in a shared environment.


--
Greg Donald
http://destiney.com/
9a2a53db8e9b4476038c94a64b32833f?d=identicon&s=25 Ryan Bigg (Guest)
on 2008-01-03 23:39
(Received via mailing list)
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
6d3c187a8b3ef53b08e3e7e8572c4fea?d=identicon&s=25 Jeremy McAnally (Guest)
on 2008-01-03 23:47
(Received via mailing list)
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 Donald <gdonald@gmail.com> wrote:
> Greg Donald
> http://destiney.com/
>
> >
>



--
http://www.jeremymcanally.com/

My books:
Ruby in Practice
http://www.manning.com/mcanally/

My free Ruby e-book
http://www.humblelittlerubybook.com/

My blogs:
http://www.mrneighborly.com/
http://www.rubyinpractice.com/
Aad37b5f7116c8d1f547d23b37566032?d=identicon&s=25 Greg Donald (destiney)
on 2008-01-04 00:10
(Received via mailing list)
On 1/3/08, Ryan Bigg <radarlistener@gmail.com> 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 Donald
http://destiney.com/
Aad37b5f7116c8d1f547d23b37566032?d=identicon&s=25 Greg Donald (destiney)
on 2008-01-04 00:11
(Received via mailing list)
On 1/3/08, Jeremy McAnally <jeremymcanally@gmail.com> 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 Donald
http://destiney.com/
E49d3b46ad9e3e4f41a5149d108feb6c?d=identicon&s=25 Jorge L. Cangas (jcangasb)
on 2008-01-07 18:18
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
629de9633299a4070fa8ac3d0a79d520?d=identicon&s=25 Cease Cease (ceaseoleo)
on 2008-01-09 03:57
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
Cd497986f66862324114f42c9e4421cb?d=identicon&s=25 Ryan Smith (smitherton)
on 2008-03-03 00:30
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
2eb32b43f162fcbc1dc52c8576132931?d=identicon&s=25 Sunny Bak (sunfish)
on 2008-03-19 22:00
(Received via mailing list)
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.
2eb32b43f162fcbc1dc52c8576132931?d=identicon&s=25 Sunny Bak (sunfish)
on 2008-03-19 23:37
(Received via mailing list)
Now it works.  older version of activerecord was the problem. I
uninstall 1.15.2, then it worked.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.