skip to Main Content

Using instructions from tilemaker to host tiles locally on Ubunut 23.04

Created croatia.mbtiles successfully but having problems hosting them.

After:

sudo apt install sqlite3 libsqlite3-dev ruby ruby-dev
sudo gem install sqlite3 cgi glug rack rackup

I have noticed that I have not server.rb, so I downloaded entire server folder

But after running: ruby server.rb croatia.mbtiles I get

server.rb:1:in <main>': undefined local variable or method null’ for
main:Object (NameError)

What did I miss?

2

Answers


  1. I’m surprised that the folder was missing.

    Did you git clone https://github.com/systemed/tilemaker.git?

    If not, please do that and follow the steps described in the "Out-of-the-box setup" section of the Readme file. There are multiple steps before you run the server, incl. setting up the directory structure as described.

    If that’s already done, please list all steps you followed in your description.

    Thanks!

    Login or Signup to reply.
  2. first of all try to reinstall the required dependencies like this

    sudo apt update
    sudo apt install sqlite3 libsqlite3-dev ruby ruby-dev
    sudo gem install sqlite3 cgi glug rack rackup
    

    now try to run the server.rb file like this

    ruby server.rb croatia.mbtiles
    

    and if you are still experiencing issues,open server.rb file using a text editor and check the first line and make sure that there are no syntax errors or undefined variables!

    the first line of the server.rb file should typically contain the shebang line, which specifies the interpreter to be used to run the script, something like this

    #!/usr/bin/env ruby
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search