This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

I get a lot of deprication messages when running rake

-1

One thing i did different from the rail port tutorial is changing the version of an installed library. I had this: gem install -v=2.3.14 rails

changed into this: gem install -v=3.1 rails

I also get a lot of these errors when running rake test.

NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#initialize called from /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/rails/vendor_gem_source_index.rb:100.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /usr/local/lib/site_ruby/1.8/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /usr/local/lib/site_ruby/1.8/rubygems/source_index.rb:91.
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/rails/gem_dependency.rb:78.

asked 24 Oct '11, 09:35

alexz's gravatar image

alexz
225212226
accept rate: 0%

edited 24 Oct '11, 09:40


2 Answers:

4

It's not clear what you are trying to achieve. Rails 2.3 and Rails 3.1 are incompatible. The current code doesn't work on rails 3, and that's why the tutorial specifies the exact version of rails that's required. You should use that version.

There is work in progress to rewrite parts of the code in order to work with rails 3.1, but this is not yet complete. If you are interested in helping with the development, then see https://github.com/tomhughes/openstreetmap-website/tree/rails3 for the work so far.

answered 24 Oct '11, 12:14

Andy%20Allan's gravatar image

Andy Allan
12.5k23128153
accept rate: 28%

Thanks, but i installed that same version but still get the messages.

(24 Oct '11, 13:35) alexz

1

This is just deprication warnings. You can change the code to not use the deprecated functions and send the patch in a bug report so that it can work on newer versions. Note that you might want to keep the code backwards compatible by not using new functions and/or branching on version.

answered 24 Oct '11, 10:00

Gnonthgol's gravatar image

Gnonthgol ♦
13.8k16103198
accept rate: 16%

HOw to change the code? ANd into what should i change?

(24 Oct '11, 10:18) alexz

i get this message too. Is it normal?

$ rake gems:install
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
(24 Oct '11, 12:10) alexz

Source code available on GitHub .