Topic: Error message trying to run 'rake test' after rails upgrade

I get the following error after I upgraded to rails 1.2.3-2.0 on Debian when I try to run 'rake test'.

/usr/lib/ruby/1.8/rubygems/version.rb:296:in `parse': Illformed requirement [~>1.2.3-2.0] (ArgumentError)

I updated config/environment.rb to reflect the upgrade, and it seems to work when I run 'rake db:migrate'.  I also tried editing the config to be 1.2.3 without the postfix 2.0, but that results in rails not being found when I run 'rake db:migrate'.  I'm using Ruby version 1.8.6.  Anyone have an idea what could be wrong?

Because it's what code craves.

Re: Error message trying to run 'rake test' after rails upgrade

i had similar problems on gentoo, i think i had to update rubygems.

Re: Error message trying to run 'rake test' after rails upgrade

Ya, my rubygems is up to date as well (0.9.0-6), but seeing how Debian's a binary distribution, I don't know what else could be wrong.  I also notice that I get the same error trying to run 'script/console'.

Because it's what code craves.

Re: Error message trying to run 'rake test' after rails upgrade

Looking into the source of version.rb, it's clear that the parse method is unhappy with the form of versioning numbers from Debian.  However, if one does 1.2.3 instead of 1.2.3-2.0, Debian is unhappy because it actually refers to the version of rails with the -2.0 suffix.

Doing

 gem install -v=1.2.3 rails

fixes the problem, but takes you away from Debian's packaging system.

Because it's what code craves.