You are not logged in.
- Topics: Active | Unanswered
Announcement
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
Pages: 1
#1 2008-11-06 11:35:01
- dirkhannig
- Member
- Registered: 2008-11-05
- Posts: 12
Problems with rake db:migrate
Hallo zusammen!
We want to set up an Openstreetmaps-Server with debian-system. We have everxthing done like it is writen in the Book, installed all packages, configured mysql and on.
Everything worked fine until the command
rake db:migrate.
Following error message comes up:
rake aborted!
Could not find RubyGem composite_primary_keys (= 0.9.93)(See full trace by running task with --trace)
The full trace see below.
After that I wanted to install the composite_pimary_keys with the comman
gem install composite_primary_keys. The following error message comes up:
ERROR: Error installing composite_primary_keys:
composite_primary_keys requires activerecord (>= 2.2.0, runtime)
The activerecord version on the system is up to date. Version 2.2.0 doesn't exist.
Can someone help me?
Gruß
Dirk
P.S:
Thats the full trace:
openstreetmap:/etc/apt/rails_port# rake db:migrate --trace
(in /etc/apt/rails_port)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Could not find RubyGem composite_primary_keys (= 0.9.93)
/usr/local/lib/site_ruby/1.8/rubygems.rb:636:in `report_activate_error'
/usr/local/lib/site_ruby/1.8/rubygems.rb:141:in `activate'
/usr/local/lib/site_ruby/1.8/rubygems.rb:49:in `gem'
/etc/apt/rails_port/config/initializers/composite_primary_keys.rb:2
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:342:in `load_application_initializers'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:341:in `each'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:341:in `load_application_initializers'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:116:in `process'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `send'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `run'
/etc/apt/rails_port/config/environment.rb:30
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/misc.rake:3
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:238:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:238:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Offline
#2 2008-11-06 13:20:43
- emj
- Member
- From: .se (59.3N17.99E) 0735969076
- Registered: 2006-06-18
- Posts: 949
Re: Problems with rake db:migrate
Find an older version of comoposite primary keys that support older versions of active records then? I know little about the ruby code setup. They know more on the mailinglist, but this seems like an example of hunt the right version, which is boring but necessary todo.
Last edited by emj (2008-11-06 13:21:43)
Offline
#3 2008-11-06 22:45:40
- dirkhannig
- Member
- Registered: 2008-11-05
- Posts: 12
Re: Problems with rake db:migrate
Thank you for your help. With version 0.9.93 it works.
But now, some steps later i have following error message.
rake aborted!
libMagickCore.so.1: cannot open shared object file: No such file or directory - /usr/lib/ruby/gems/1.8/gems/rmagick-2.7.1/lib/RMagick2.so
Ideas?
Offline
#4 2008-11-07 00:09:50
- emj
- Member
- From: .se (59.3N17.99E) 0735969076
- Registered: 2006-06-18
- Posts: 949
Re: Problems with rake db:migrate
You can skip Image Magick since it's only needed for picture generation of traces (search for RMagick in code base).
or you try to install:
Is there a gem for Image magick available? Dunno why it fails you can try looking for those two libraries and see where they are, maybe they got moved around?
Offline
#5 2008-11-09 17:42:15
- dirkhannig
- Member
- Registered: 2008-11-05
- Posts: 12
Re: Problems with rake db:migrate
Thanks for your help so long!!
But I Don't really know what you mean.
I tried the following things:
1. I installed Rmagick 2.7.1 (gem instal ...)
2. I installed imagemagick with apt-get (there is no gem-installationfile)
3. libmagick9 ist also installed.
But the error comes everytime. Perhaps you have another idea.
Offline
#6 2008-11-09 20:57:47
- dirkhannig
- Member
- Registered: 2008-11-05
- Posts: 12
Re: Problems with rake db:migrate
i found the error.
The path to the lib files was not set.
Offline
#7 2008-11-09 23:05:39
- dirkhannig
- Member
- Registered: 2008-11-05
- Posts: 12
Re: Problems with rake db:migrate
Sorry, the next problem.
I wanted to us osmosis to write the planet file into the database.
Following info comes when i start the osmosis installation:
openstreetmap:/etc/apt/rails_port/osmosis-0.29# bin/osmosis
09.11.2008 22:05:15 com.bretth.osmosis.core.Osmosis main
INFO: Osmosis Version 0.29
09.11.2008 22:05:15 com.bretth.osmosis.core.Osmosis main
INFO: Preparing pipeline.
09.11.2008 22:05:15 com.bretth.osmosis.core.Osmosis main
INFO: Launching pipeline execution.
09.11.2008 22:05:15 com.bretth.osmosis.core.Osmosis main
INFO: Pipeline executing, waiting for completion.
09.11.2008 22:05:15 com.bretth.osmosis.core.Osmosis main
INFO: Pipeline complete.
Is that right? Is it installed now?
If yes, where do I find the osmosis command to write the planet file into the database?
I want to do this command:
osmosis --rx planet.osm.bz2 --wm host="localhost" database ="openstreetmap" user="openstreetmap" password="openstreetmap"Can someone give me a short summary how to do this? Thank you!
Offline
#8 2008-11-10 09:05:40
- emj
- Member
- From: .se (59.3N17.99E) 0735969076
- Registered: 2006-06-18
- Posts: 949
Re: Problems with rake db:migrate
bin/osmosis --rx planet.osm.bz2 --wm host="localhost" database ="openstreetmap" user="openstreetmap" password="openstreetmap"Perhaps?
What I ment above was that ImageMagick isn't really needed for the basic stuff.
Offline
#9 2008-11-10 14:28:22
- dirkhannig
- Member
- Registered: 2008-11-05
- Posts: 12
Re: Problems with rake db:migrate
The command was right, There was only one space too much.
Now the osmosis program is running and aborts with this error code:
SCHWERWIEGEND: Thread for task 1-rx failed
com.bretth.osmosis.core.OsmosisRuntimeException: The database schema version of 16 does not match the expected version of 11.
at com.bretth.osmosis.core.mysql.common.SchemaVersionValidator.validateDBVersion(SchemaVersionValidator.java:72)
at com.bretth.osmosis.core.mysql.common.SchemaVersionValidator.validateVersion(SchemaVersionValidator.java:45)
at com.bretth.osmosis.core.mysql.v0_5.MysqlWriter.initialize(MysqlWriter.java:316)
at com.bretth.osmosis.core.mysql.v0_5.MysqlWriter.process(MysqlWriter.java:1004)
at com.bretth.osmosis.core.xml.v0_5.impl.BoundElementProcessor.end(BoundElementProcessor.java:85)
at com.bretth.osmosis.core.xml.v0_5.impl.OsmHandler.endElement(OsmHandler.java:109)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:180)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
at com.bretth.osmosis.core.xml.v0_5.XmlReader.run(XmlReader.java:109)
at java.lang.Thread.run(Thread.java:619)
10.11.2008 13:26:53 com.bretth.osmosis.core.Osmosis main
SCHWERWIEGEND: Execution aborted.
com.bretth.osmosis.core.OsmosisRuntimeException: One or more tasks failed.
at com.bretth.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pipeline.java:141)
at com.bretth.osmosis.core.Osmosis.main(Osmosis.java:55)
Offline
#10 2008-11-10 15:50:04
- emj
- Member
- From: .se (59.3N17.99E) 0735969076
- Registered: 2006-06-18
- Posts: 949
Re: Problems with rake db:migrate
The database schema version of 16 does not match the expected version of 11.
This is probably the problem.. try adding validateSchemaVersion=no or ask the creator of Osmosis directly
Warning I hav eno iea wha the difference between schema versions is, you might be able to change the version with rake migrate. But that's not within my knowledge..
Last edited by emj (2008-11-10 15:57:57)
Offline
#11 2008-11-10 18:57:23
- dirkhannig
- Member
- Registered: 2008-11-05
- Posts: 12
Re: Problems with rake db:migrate
Thank you for your help.
I also get the idea with the version. With
rake db:migrate VERSION=11it works.
Now the osmosis-tool is running. I hope this was the last question from me! ;-)
Offline
#12 2008-11-10 23:54:42
- emj
- Member
- From: .se (59.3N17.99E) 0735969076
- Registered: 2006-06-18
- Posts: 949
Re: Problems with rake db:migrate
Good luck..
***EDIT** This is not so, you need to run osmosis with -0.6 to import with api 0.6 *** EDIT** I'm not sure if you are running the mildly unstable development API (0.6) or the current one.. (do a search for "changeset" which is part of 0.6)
Last edited by emj (2008-11-14 01:36:29)
Offline
#13 2008-11-12 13:51:06
- Yoda
- Member
- Registered: 2008-04-04
- Posts: 19
Re: Problems with rake db:migrate
The database schema version of 16 does not match the expected version of 11.
I had the same problem and downloaded the source for osmosis and it was fixed (you will need to install JDK and ant and make sure that java is in the path before any another).
I assumed the database schema has moved up a few in the version that can be downloaded from svn but the prebuilt version of osmosis has not kept up.
Just got mine running today and is now rendering the tiles
Offline
Pages: 1