After cloning, run Bundler to install packages and dependencies:
cd social
bundle install
- ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin17]
Ruby, rails gem, bundler, sqlite3/mysql, rake, homebrew
- brew install rbenv ruby-build mysql
- gem install rails
- bew install mysql
- Clone the repo to your local machine.
- Install mysql with Homebrew (mac)
brew install mysql
. - After installing the database, run the following command to start the mysql server:
mysql.server start
. - After cloning the repository, cd into
social
and runbundle install
. - Install packages and dependencies, run
bin/rails server
to start the web server. - Stop the database with
mysql.server stop
.
Database should be created locally with the rails setup. If you need to, run rake db:migrate
to get the database to the latest version.
- `bin/rails server` or
- `rails server`
- Make sure the database is running, and run `rails test` to run the tests.
- Coming soon!
Sometimes rails will try to run tests off the previous process of spring. Use the command spring stop
to stop the current process and run rails server|test
again.
If you come across issues with running rails in your local env try:
brew install openssl
&&export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
mysql.server restart
rails db:migrate:reset
Note: resetting the database will drop tables and delete users and re-seed the database with sample users. only do this on non-prod.