DB Migration problem

Hi,

I am trying to migrate my project database on to other system.
rakedb:create is working and Database is being created in mysql but when
migrating using rake db:migrate it is giving me following error

can’t activate activesupport (= 3.0.3, runtime) for [“railties-3.0.3”],

/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in require' /var/lib/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:307:ineach’

/var/lib/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in

/usr/lib/ruby/1.8/rake.rb:590:in invoke_with_call_chain' /usr/lib/ruby/1.8/rake.rb:2029:intop_level’

(See full trace by running task with --trace)

Can any one tell me the reason?

Thanks
Surya

On Dec 4, 8:59am, Surya [email protected] wrote:

Hi,

I am trying to migrate my project database on to other system.
rakedb:create is working and Database is being created in mysql but when
migrating using rake db:migrate it is giving me following error

can’t activate activesupport (= 3.0.3, runtime) for [“railties-3.0.3”],

already activated activesupport-2.3.8 for [“rails-2.3.8”]

This looks like a dependencies problem: i’d guess that your app is a
rails 2.3.8 app and has started loading rails, and has already loading
version 2.3.8 of active support. When the acts as ferret gem loads it
looks like it’s trying to load railties, however i’d guess that it’s
not specifying a version, and in that case rubygems defaults to
loading the latest version of railties that you have on your machine,
which would appear to be 3.0.3. Railties 3.0.3 requites the
corresponding version of active support, but an older version is
already loaded and so everything blows up. If acts as ferret is
actually asking for the rails 3 version of railties then you’ll need
to back down to a version that doesn’t. If not you might want to try
doing something like gem ‘railties’, ‘2.3.8’ so that rubygems doesn’t
pick up the ‘wrong’ version

Fred

Thanks for reply Fred,

   Well I have sort it out by reinstalling rails and all its 

dependent
packages. You are right it is version conflict occurring when I tried to
migrate database it looks for railities 3.0.3 but activesupport version
that was activated. So no chance to solve such a condition without
reinstalling whole things related to rails.

On Sat, Dec 4, 2010 at 7:13 PM, Frederick C.
<[email protected]

On 4 December 2010 16:48, Surya [email protected] wrote:

Thanks for reply Fred,

Well I have sort it out by reinstalling rails and all its dependent
packages. You are right it is version conflict occurring when I tried to
migrate database it looks for railities 3.0.3 but activesupport version
that was activated. So no chance to solve such a condition without
reinstalling whole things related to rails.

Remember you can always remove gem versions that you do not need.

If you are trying to use multiple versions of ruby and rails then I
strongly suggest looking at rvm. It makes life very easy.

Colin

On Dec 4, 4:48pm, Surya [email protected] wrote:

Thanks for reply Fred,

Well I have sort it out by reinstalling rails and all its dependent
packages. You are right it is version conflict occurring when I tried to
migrate database it looks for railities 3.0.3 but activesupport version
that was activated. So no chance to solve such a condition without
reinstalling whole things related to rails.

Actually bundler is designed to solve exactly this sort of problem.

Fred