update WindowsInstallation.md
This commit is contained in:
parent
9613145e99
commit
d9133b1e29
1 changed files with 18 additions and 18 deletions
|
@ -1,38 +1,38 @@
|
||||||
First off, Metamaps runs on Ruby On Rails. You'll need to get Ruby and Rails installed on your computer if you don't already have it. Go to here for Ruby http://rubyinstaller.org/downloads/
|
Before you begin, you'll need to install a number of software packages:
|
||||||
|
|
||||||
You'll also need GIT: http://git-scm.com/download/win
|
Ruby: http://rubyinstaller.org/downloads
|
||||||
|
Git: http://git-scm.com/download/win
|
||||||
|
PostgreSQL 9.2: http://www.enterprisedb.com/products-services-training/pgdownload
|
||||||
|
nodejs: http://nodejs.org/download
|
||||||
|
|
||||||
It uses postgreSQL 9.2 as a database. You can install that for your computer from here: http://www.enterprisedb.com/products-services-training/pgdownload . During installation you can choose whatever database password you like. Make sure to note it down!
|
During the installation of the PostgreSQL database, you'll need to choose a database password. Anything is fine, just note what you choose somewhere.
|
||||||
|
|
||||||
Once you install those, open a 'command prompt with ruby'.
|
Once you are ready, create a new folder to hold this and any other git repositories. As an example, let's pretend you've chose C:\git, and made that folder writable by your user account.
|
||||||
|
|
||||||
to install rails
|
Open a command prompt ("cmd.exe"), and navigate to the folder you chose. Then use the gem command (which is part of Ruby) to install Ruby on Rails.
|
||||||
|
|
||||||
|
cd \git
|
||||||
gem install rails -v 4.2
|
gem install rails -v 4.2
|
||||||
|
|
||||||
also download node.js, which is also needed http://nodejs.org/download/
|
Now you are ready to clone the Metamaps git repository:
|
||||||
|
|
||||||
Navigate to the folder that you want to download the metamaps files to and run the following: (use your forked git repository address if it's different than this repo. You will also need to go to your Github account settings and add the SSH key that was placed in your clipboard earlier)
|
|
||||||
|
|
||||||
git clone https://github.com/metamaps/metamaps_gen002.git --branch develop
|
git clone https://github.com/metamaps/metamaps_gen002.git --branch develop
|
||||||
cd metamaps_gen002
|
cd metamaps_gen002
|
||||||
|
|
||||||
Now you're in the main directory.
|
|
||||||
|
|
||||||
Install all the gems needed for Metamaps by running
|
|
||||||
|
|
||||||
bundle install
|
bundle install
|
||||||
|
|
||||||
Setting up the database:
|
The third `bundle install` command downloads and installs the rubygem dependencies of Metamaps.
|
||||||
|
|
||||||
1) Copy /config/database.yml.default and rename the copy to /config/database.yml then edit database.yml with your text editor and set the password to whatever you chose when you set up the PostGres database. Then do the same for /config/secrets.yml (the defaults should be OK for this file).
|
At this point you should be in C:\git\metamaps_gen002, or whatever equivalent directory you've chosen. The next step is to set up your database configuration. From the metamaps_gen002 directory, run
|
||||||
|
|
||||||
2) In a terminal:
|
start config
|
||||||
|
|
||||||
|
This command will open a Windows Explorer window of the "config" directory of Metamaps. Copy database.yml.default, and rename the copy to database.yml. Edit the file and set the password to be whatever you set up with postgres earlier. Once you're done, then move back into the command prompt. The next few commands will fail unless database.yml is correctly configured and Postgres is running.
|
||||||
|
|
||||||
rake db:create
|
rake db:create
|
||||||
rake db:schema:load
|
rake db:schema:load
|
||||||
rake db:fixtures:load
|
rake db:fixtures:load
|
||||||
|
|
||||||
Running the server:
|
And you're set up! At this point, you should be able to run the server at any time with only one command; you don't need to repeat any of the previous steps again. The command to run the server is:
|
||||||
|
|
||||||
rails s
|
rails s
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue