2014-06-10 21:41:34 +00:00
Firstly this walkthrough is done with a 14.04 32bit install of Ubuntu.
2016-01-17 02:17:02 +00:00
Let's check if all updates for the system are installed first. In a
terminal type:
2014-06-10 21:41:34 +00:00
2014-09-03 15:30:29 +00:00
sudo apt-get update
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
Now we need to install git:
2014-06-10 21:41:34 +00:00
2014-09-03 15:30:29 +00:00
sudo apt-get install git
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
Now let's get our RVM installed (Ruby Version Manager). Now this is fun
because the package you will get from apt-get is outdated. So we are going
to use CURL to get RVM
2014-06-10 21:41:34 +00:00
2014-09-03 15:30:29 +00:00
sudo apt-get install curl
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
Then lets install RVM with curl like this
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
gpg --keyserver hkp://keys.gnupg.net \
--recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable
2014-10-20 17:40:31 +00:00
PATH=$PATH:$HOME/.rvm/bin
2014-09-03 15:30:29 +00:00
[[ -s "$HOME/.profile" ]] & & source "$HOME/.profile"
[[ -s "$HOME/.rvm/scripts/rvm" ]] & & source "$HOME/.rvm/scripts/rvm"
source ~/.rvm/scripts/rvm
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
Now we can actually install RVM
2014-06-10 21:41:34 +00:00
2014-09-03 15:30:29 +00:00
rvm requirements
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
Running this will check your system for requirements as well so you will need to put your system password in.
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
All right now we can download metamaps from the master using git
2014-06-10 21:41:34 +00:00
2016-04-13 02:16:54 +00:00
git clone https://github.com/metamaps/metamaps.git
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
Now there is a couple other things we are going to need which is nodejs, postgresql, libpq-dev and redis-server
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
sudo apt-get install nodejs npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
2014-09-03 15:30:29 +00:00
sudo apt-get install postgresql
sudo apt-get install libpq-dev
sudo apt-get install redis-server
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
Furthermore, if you want to be able to work on profile picture uploading,
or use it you'll need ImageMagick. On Ubuntu, you can just go find
ImageMagick in the Ubuntu Software Centre
2014-10-22 00:31:59 +00:00
2014-10-20 17:33:07 +00:00
Install the specific version of ruby needed this will take some time
2014-06-10 21:41:34 +00:00
2016-04-13 02:16:54 +00:00
rvm install $(cat metamaps/.ruby-version)
2014-06-10 21:41:34 +00:00
2016-08-03 14:37:02 +00:00
While that is running, you can open another terminal and install the ES6 code
2016-08-01 19:59:53 +00:00
npm install
npm run build
2016-01-17 02:17:02 +00:00
Now we also need to copy .example-env to a new file named .env. Review the
configuration in here to see if you need any changes.
2014-06-10 21:41:34 +00:00
2016-01-06 14:36:29 +00:00
cp .example-env .env
2016-04-13 02:16:54 +00:00
Now run inside your metamaps folder:
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
gem install bundle
2014-09-03 15:30:29 +00:00
bundle install
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
in your top level directory for metamaps. This is a lengthy process so you might want to go and make a coffee or something :)
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
All right now we need to make sure your postgres password is the same as
it is listed in the .env file so we are going to set it by
2014-06-10 21:41:34 +00:00
2014-09-03 15:30:29 +00:00
sudo -u postgres psql
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
Use these commands to set the password to 3112 and then quit:
2014-06-10 21:41:34 +00:00
2014-09-03 15:30:29 +00:00
\password postgres
\q
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
now we can use rake to create, load the schema into, and load db/seeds.rb
into the postgres database:
2014-06-10 21:41:34 +00:00
2017-07-26 00:06:27 +00:00
rake db:create
2016-01-17 02:17:02 +00:00
rake db:setup
2014-06-10 21:41:34 +00:00
2016-01-17 02:17:02 +00:00
Open a new terminal, navigate to the metamaps directory, and execute the
server:
2014-09-03 15:31:59 +00:00
2014-09-03 15:30:29 +00:00
rails s
2017-07-25 23:52:11 +00:00
NOTE: if you want to actively develop on the javascript in /frontend use
npm run build:watch
2014-06-10 21:41:34 +00:00
2015-01-23 03:59:11 +00:00
and dont forget to run the other server for realtime...
2014-06-10 21:41:34 +00:00
2017-07-25 23:52:11 +00:00
node realtime/realtime-server.js
to start a webpack build process that updates the build everytime you make code changes
2014-09-03 15:40:08 +00:00
2016-01-17 02:17:02 +00:00
Now you're all set enjoy your personal server of metamaps :) Navigate your browser to localhost:3000 once you have the server running. Sign in with the default account
2014-09-03 15:40:08 +00:00
2016-01-17 02:17:02 +00:00
email: user@user.com
password: toolsplusconsciousness
2014-09-03 15:40:08 +00:00
OR create a new account at /join, and use access code 'qwertyui'
Start mapping and programming!