When launching a rails 2.0 app, error occurs:
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)
To fix this, simply uninstall old rails gem by executing:
gem cleanup
ref: http://www.ruby-forum.com/topic/137509
Advertisements
This error often occurs in a situation where an activerecord adapter isn’t present for a defined connection. I see this a lot on Rails sites upgraded to 2.x from 1.x, where activerecord_sqlserver_adapter, for example, hasn’t been installed to support a sqlserver connection.
Hi Jesse.
I have seen that you had a similar problem that me. I have installed all the gems needed for activerecord-oracle-adapter but when I try to start the webrick I get the following error:
/usr/lib64/ruby/site_ruby/1.8/rubygems.rb:147:in `activate’: can’t activate activerecord (>= 1.15.5.7843, runtime), already activated activerecord-2.1.0 (Gem::Exception)
I have run gem cleanup to remove olg gems from my system but I get the same error.
I have a SUSE Linux SLES10.
I saw that you remove the line:
s.add_dependency(%q, [“>= 1.15.5.7843”])
to avoid the dependencies.
Can you kindly explain me in which file you removed that line in order to solve this issue.
Please, send me any suggestion to my personal email: estables@iespana.es
Thanks in advance.
Hi Jose,
I commentted the dependency line in the gem spec file:
lib/ruby/gems/1.8/specifications/activerecord-oracle-adapter-1.0.0.9250.gemspec
Hope this can solve your problem.
Hi Jesse.
Sorry to bore you again.
I have the following gem spec file:
Gem::Specification.new do |s|
s.name = %q{activerecord-oracle-adapter}
s.version = “1.0.0.9250”
s.required_rubygems_version = Gem::Requirement.new(“>= 0”) if s.respond_to? :required_rubygems_version=
s.authors = [“Michael Schoen”]
s.date = %q{2008-06-04}
s.email = %q{schoenm@earthlink.net}
s.files = [“lib/active_record/connection_adapters/oracle_adapter.rb”]
s.homepage = %q{http://ruby-oci8.rubyforge.org/}
s.require_paths = [“lib”]
s.rubyforge_project = %q{activerecord}
s.rubygems_version = %q{1.3.0}
s.summary = %q{Oracle adapter for Active Record}
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 2
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new(‘1.2.0’) then
s.add_runtime_dependency(%q, [“>= 1.15.5.7843”])
else
s.add_dependency(%q, [“>= 1.15.5.7843”])
end
else
s.add_dependency(%q, [“>= 1.15.5.7843”])
end
end
I have commentted the two lines:
s.add_dependency(%q, [“>= 1.15.5.7843”])
but I get the same error.
Could you confirm me if your gem spec file was like mine ?
Any other suggestion will be welcome.
Thanks again.
Thanks! Worked like a charm.
ブランド バッグ