Windows Guide - nomadlabs/spacialdb GitHub Wiki

Guide to run spacialDB on Windows:

  1. Open up git shell and type git clone https://github.com/nomadlabs/spacialdb.git

  2. Makesure PostgreSQL is downloaded and installed properly and don't forget to add C:\ProgramFiles\PostgreSQL\version~\bin to your Path (Environment Variables).

  3. Go to spacialDB Folder and open Gemfile and add: gem 'tzinfo-data', platforms: [:mingw, :mingw, :mswin] replace :mingw with :x64_mingw if you are using 64-bit version of Windows gem 'coffee-script-source', '~> 1.8.0' Save that and exit.

  4. (Open Console with Windows key + R and then type cmd. Navigate through the console to the spacialdb\bin Directory and type bundle update net-ssh after everything is downloaded type bundle update tzinfo-data after its finished type bundle update coffee-script-source and when everything is updated type bundle install. You can exit the console now. Note: If you get errors like TZInfo::DataSource.set......... try running gem install tzinfo and then gem install tzinfo-data and then proceed to bundle update tzinfo-data and follow the rest of the Guide. Note 2: if you get ssl error (server certificate please follow this guide https://gist.github.com/luislavena/f064211759ee0f806c88

  5. Now you got to connect postgres to the spacialdb. Open up the console(Make sure you open it as Administrator) and type psql -h localhost -U postgres and press enter. postgres will open and you need to type: create role "Your Computersername [case sensitive]" SUPERUSER LOGIN INHERIT CREATEDB; and press enter after that type createdb spacialdb_development; and quit the console after that with \q

  6. Open up specialdb/config/database.yml with your Editor and change last line from this part: default: &default adapter: postgresql encoding: unicode to encoding: utf8

  7. Locate C:~\Ruby2.0.0\lib\ruby\gems\2.0.0\gems\execjs-2.2.2\lib\execjs\runtimes.rb with your Editor and change last line from this part: JScript = ExternalRuntime.new( name: "JScript", command: "cscript //E:jscript //Nologo //U", runner_path: ExecJS.root + "/support/jscript_runner.js", encoding: 'UTF-16LE' # CScript with //U returns UTF-16LE )
    to encoding: 'UTF-8' # CScript with //U returns UTF-16LE

  8. At this point you can open up your console navigate to spacialDB\bin and type rake db:migrate after this process is over. If you already have node.js just run rails server if the server is running connect to the http://localhost:3000 via your Internetbrowser.

  9. If you don't have node.js download it from https://nodejs.org/download/ and choose the right version of your Windows and then try to run the rails server