0

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?

watbywbarif
  • 6,487
  • 8
  • 50
  • 64
  • It's seems like there's some variable missing or typo in the file. Did you un-comment the first lline of the server.rb file i.e. `#!/usr/bin/ruby`? – Ghulam Farid Aug 06 '23 at 05:58
  • You don't need to do that, that's how your shell interpreter knows how to run the file... https://stackoverflow.com/questions/8967902/why-do-you-need-to-put-bin-bash-at-the-beginning-of-a-script-file – d1sh4 Aug 10 '23 at 17:18

1 Answers1

0

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!

d1sh4
  • 1,710
  • 5
  • 21