User:Janschejbal/HowTo-OSM-Windows
Recommended way
- Download Ubuntu
- Install Ubuntu
- Proceed as per ubuntu instructions
The hard way
(Spoiler: you may want to read the end first before trying this)
Download Ruby 1.8.7-p358 RubyInstaller from http://www.ruby-lang.org/de/downloads/ or http://rubyinstaller.org/downloads/archives You may try a different revision (p123), but I do not suggest trying any different version than 1.8.7 unless instructed to do so in a more current setup guide.
Install it, adding it to your path.
Run "gem install bundler" (if your installer failed to add ruby to your path, cd to the ruby bin directory first)
install and start pgsql, cd to pgsql\bin, run
createuser -s -P openstreetmap (note down the password) createdb -E UTF8 -O openstreetmap -T template0 openstreetmap createdb -E UTF8 -O openstreetmap -T template0 osm_test createdb -E UTF8 -O openstreetmap -T template0 osm psql -d openstreetmap < ..\share\contrib\btree_gist.sql
Check out https://github.com/openstreetmap/openstreetmap-website.git to c:\osm\ (you may delete the 100 MB .git directory afterwards if you do not want to update)
run:
cd c:\osm\openstreetmap-website\config copy example.database.yml database.yml copy example.application.yml application.yml
open the two files in your favorite text editor and edit them to fit (esp. user/password in database.yml - the username is "openstreetmap", the password is what you set above)
ensure ruby is on your path (the installer didn't do it despite being told to):
set PATH=%PATH%;C:\Ruby187\bin
run:
cd c:\osm\openstreetmap-website bundle install
Enjoy your error message:
ERROR: Error installing json: The 'json' native gem requires installed build tools.
Install the dev kit according to instructions https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
Again, run:
cd c:\osm\openstreetmap-website bundle install
Enjoy your error message, find something that might be a solution on http://stackoverflow.com/questions/8126465/bundle-install-update-libv8-therubyracer-installation-fails-with-native-ex/8127559#8127559 and run
gem install bundler --pre
Try again, enjoy your error message, dive into bugtrackers, run:
set RUBYOPT=-r rubygems
Try again, enjoy a different error message this time.
Remember the devkit? It comes very handy now. run:
set PATH=c:\ruby-devkit\bin\;%PATH% rm -rf c:\osm
Uninstall ruby, then rm -rf the remaining ruby and devkit directories.
Call it a day and/or proceed as per the recommended way.