Mac Setup - brownfield-team/anacapa-github-linker GitHub Wiki
Install brew if you don't have it
Go to https://brew.sh/ and follow instructions
Installing RVM
Start by doing brew update
Then do brew install gnupg shared-mime-info libpq
gpg --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
Next Command:
command curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
\curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
Then:
- If you've already cloned the directory with the repo, find the directory where the source repository has been cloned, and cd into the directory.
- Otherwise, use
cd
to your some appropriate directory and then do:
Thengit clone [email protected]:brownfield-team/anacapa-github-linker.git
cd anacapa-github-linker
You should see a message like this:
rvm install ruby-2.6.6
but instead do
rvm install ruby-2.7.3
Next, use:
gem install bundler
Followed by:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
Next, install yarn:
curl -o- -L https://yarnpkg.com/install.sh | bash
Followed by installing rails:
gem install pg -v '1.2.3' --source 'https://rubygems.org/' -- --with-pg-config=/usr/local/opt/libpq/bin/pg_config
If the gem install pg command fails, try this
brew install postgresql
gem install pg -v '1.2.3' --source 'https://rubygems.org/'
bundle install
And installing postgres:
To install postgres visit https://postgresapp.com/
If any database problems consult https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-ruby-on-rails-application-on-macos
Finally:
rvm use 2.7.3
yarn install
bundle install
bundle exec rake db:create
bundle exec rake db:migrate
rails s
This should give you a webpage on http://localhost:3000 with a login button, but the login button will not work yet. The next step is to configure OAuth.
Configuring OAuth and Machine User
To start cp dotenv.example .env
Then bring up .env in text editor