/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
You can run brew doctor
to insure the install ran without any issues.
brew doctor
\curl -sSL https://get.rvm.io | bash -s stable
Load rvm without restarting your shell session
/Users/foo/.rvm/scripts/rvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
You can check that nvm was installed by running command -v nvm
.
If installed correctly you should see the text "nvm" output to the terminal.
To install the version of Node being used by the Garmentier app, run the following from within the .../Garmentier directory.
nvm install
npm install -g yarn
To install the npm modules used by the Garmentier app, run the following from within the .../Garmentier directory.
yarn install
You will need to have both a PostgreSQL and Redis database installed to run the app.
brew install postgresql
brew install redis
You can verify that they are installed by running brew services list
.
This will also show you their status, which should be "stopped".
We will want to have these servers running, so run the following commands:
brew services start postgresql
brew services start redis
If you run brew services list
again, you should see the status for both is "started"
In addition to installing and starting the postgresql server, you will also need to create a database in it for the app. Note that the path in the second command will depend on where you have the SQL dump file. You will need to ask someone on the team to provide you with that file.
createdb curate_development
pg_restore -O -d curate_development ~/path_to_sql_dump
Check out Getting started with postgres for help.
There will be a couple of rails dependencies you will need to manually install before bundling the app.
brew install imagemagick
gem install rmagick -v '4.1.2'
With those installed, you can now install all the rails gems.
bundle install
To run the api and client servers you will need to install foreman.
gem install foreman
With that installed you can now run the servers with:
foreman start -f Procfile.dev
You should now find the app running at localhost:3000
- Homebrew - The Missing Package Manager for macOS (or Linux).
- RVM - A verson manager for Ruby.
- NVM - A version manager for Node.
- Yarn - A package manager that doubles down as project manager. An alternative to npm.
- PostgreSQL - The World's Most Advanced Open Source Relational Database.
- Redis - An open source, in-memory data structure store. It's used as a database, cache, and message broker.
- Redis brew install - Install Redis with brew.
- Imagemagick - A widly used tool in the Ruby and Rails community for working with images.
- Rails - A Ruby based web application framework.
- Foreman - An orchestration tool used to proxy and manage your infrastructure.