Windows Guide - nomadlabs/spacialdb GitHub Wiki
Guide to run spacialDB on Windows:
-
Open up git shell and type git clone https://github.com/nomadlabs/spacialdb.git
-
Makesure PostgreSQL is downloaded and installed properly and don't forget to add C:\ProgramFiles\PostgreSQL\version~\bin to your Path (Environment Variables).
-
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 Windowsgem 'coffee-script-source', '~> 1.8.0'
Save that and exit. -
(Open Console with
Windows key + R
and then typecmd
. Navigate through the console to the spacialdb\bin Directory and typebundle update net-ssh
after everything is downloaded typebundle update tzinfo-data
after its finished typebundle update coffee-script-source
and when everything is updated typebundle install
. You can exit the console now. Note: If you get errors like TZInfo::DataSource.set......... try runninggem install tzinfo
and thengem install tzinfo-data
and then proceed tobundle 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 -
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 typecreatedb spacialdb_development;
and quit the console after that with\q
-
Open up specialdb/config/database.yml with your Editor and change last line from this part:
default: &default adapter: postgresql encoding: unicode
toencoding: utf8
-
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
-
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 runrails server
if the server is running connect to the http://localhost:3000 via your Internetbrowser. -
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