systemed / tilemaker

Make OpenStreetMap vector tiles without the stack
https://tilemaker.org/
Other
1.44k stars 229 forks source link

Issue running premade server #520

Closed Naybs808 closed 1 year ago

Naybs808 commented 1 year ago

I'm trying to run the Out-of-the-box setup.

I'm using WSL (Windows subsystem for Linux) Ubuntu 20.04.6 LTS (Focal Fossa). I've cloned the tilemaker repo, and downloaded a osm.pbf file - surrey-latest.osm.pbf.

I've created a folder for my tiles, mbTiles, and generated map tiles using:

tilemaker --input mapData/surrey-latest.osm.pbf --output ./mbTiles/

I've installed all the recommended packages:

sudo apt install sqlite3 libsqlite3-dev ruby ruby-dev 

sudo gem install sqlite3 cgi glug rack rackup

Then when I try run the command to serve the tiles I get this output:

ruby server.rb ../mbTiles/
Starting local server
Traceback (most recent call last):
        7: from server.rb:22:in `<main>'
        6: from server.rb:116:in `<class:MapServer>'
        5: from server.rb:116:in `new'
        4: from server.rb:38:in `initialize'
        3: from server.rb:42:in `connect'
        2: from server.rb:42:in `new'
        1: from /var/lib/gems/2.7.0/gems/sqlite3-1.6.3-x86_64-linux/lib/sqlite3/database.rb:90:in `initialize'
/var/lib/gems/2.7.0/gems/sqlite3-1.6.3-x86_64-linux/lib/sqlite3/database.rb:90:in `open_v2': unable to open database file (SQLite3::CantOpenException)

Does anyone know what I might be doing wrong?

systemed commented 1 year ago

An mbtiles is a single file, not a directory. You generate it by specifying --output map.mbtiles when running tilemaker, then run the server with ruby server.rb map.mbtiles.

Naybs808 commented 1 year ago

Oh yes, thank you! That is working now.