in `activate': can't activate aionpack (= 1.13.6, runtime)

Hi,

I am trying to run my test cases and everytime I will get the following
errors:

c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:142:in `activate': can't
activate a
ionpack (= 1.13.6, runtime), already activated actionpack-2.0.2
(Gem::Exceptio

        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:158:in
`activate'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:157:in `each'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:157:in
`activate'
        from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `
quire'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_sup
rt/dependencies.rb:496:in `require'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_sup
rt/dependencies.rb:342:in `new_constants_in'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_sup
rt/dependencies.rb:496:in `require'
        from ./test/functional/../test_helper.rb:4
        from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `
m_original_require'
        from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `
quire'
        from test/functional/comments_controller_test.rb:1

I tried to install/uninstall actionpack 1.13.6, gem update(system and
source), reinstall rails, gem cleanup, and almost anything I can think
of but will always encounter this problem. Please help.

What's on that line? Perhaps a "gem 'activesupport', '=1.13.6'", hmm?

-Rob

Rob Biedenharn http://agileconsultingllc.com
Rob@AgileConsultingLLC.com

Rob Biedenharn wrote:

       from ./test/functional/../test_helper.rb:4

What's on that line? Perhaps a "gem 'activesupport', '=1.13.6'", hmm?

-Rob

Rob Biedenharn http://agileconsultingllc.com
Rob@AgileConsultingLLC.com

Oops didn't realize the cut-paste didn't turn out well.

This is what I got:
ruby test/unit/notifier_test.rb
c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:142:in `activate': can't
activate act
ionpack (= 1.13.6, runtime), already activated actionpack-2.0.2
(Gem::Exception)

        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:158:in
`activate'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:157:in `each'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:157:in
`activate'
        from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
quire'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_suppo
rt/dependencies.rb:496:in `require'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_suppo
rt/dependencies.rb:342:in `new_constants_in'
        from
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_suppo
rt/dependencies.rb:496:in `require'
        from ./test/unit/../test_helper.rb:4
        from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `ge
m_original_require'
        from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re
quire'
        from test/unit/notifier_test.rb:1

The backtrace was fine. What are the first 5 lines in test/
test_helper.rb?
This is the first file in the backtrace that's "local" to your project.

Line 4 is the first blank line in my copy. Is this an older project?

-Rob

Rob Biedenharn wrote:

The backtrace was fine. What are the first 5 lines in test/
test_helper.rb?
This is the first file in the backtrace that's "local" to your project.

Line 4 is the first blank line in my copy. Is this an older project?

-Rob

Hi these are the first few lines of test_helper.rb:

ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) +
"/../config/environment")
require 'test_help'
require 'action_web_service/test_invoke'

When I comment out "require 'action_web_service/test_invoke'" the
problem is gone. But I got no idea how it got there in the first place.

Thanks,
Jason

Well, I'm guessing that means it wasn't put there by you. If all the tests pass, perhaps leaving it out is the right thing. However, if you use ActionWebService, you might need to install it separately as a plugin -- it used to be included with Rails, but later(current) versions may have cut it loose.

If you really want to understand the root cause, start following the chain by determining where 'action_web_service/test_invoke' is loaded and see what's inside.

-Rob

Rob Biedenharn http://agileconsultingllc.com
Rob@AgileConsultingLLC.com

Rob Biedenharn wrote:

Rob Biedenharn wrote:

Hi these are the first few lines of test_helper.rb:

Thanks,
Jason

Well, I'm guessing that means it wasn't put there by you. If all the
tests pass, perhaps leaving it out is the right thing. However, if
you use ActionWebService, you might need to install it separately
as a
plugin -- it used to be included with Rails, but later(current)
versions may have cut it loose.

If you really want to understand the root cause, start following the
chain by determining where 'action_web_service/test_invoke' is loaded
and see what's inside.

-Rob

Rob Biedenharn http://agileconsultingllc.com
Rob@AgileConsultingLLC.com

I tried to install the ActionWebService and they require me to install
actionpack 1.13.6 first. But even if I installed actionpack 1.13.6 I
still can't activate that particular version.

the problem is that ActionWebService is requiring a particular version
of ActiveSupport (the rails gems typically do this), ie the one that
was current when ActionWebService was last released but a different
version of ActiveSupport has already been loaded.
There are a number of ways of using ActionWebService today, personally
I've got the old code frozen into my vendor/rails (rest of rails is
frozen anyway), and with a few tweaks it works fine (http://www.texperts.com/2007/12/21/using-action-web-service-with-rails-20/
) There have also been forks of the original code that have been
updated (have a search on github). It isn't however as simple as
installing the old gem.

Fred