-
Notifications
You must be signed in to change notification settings - Fork 0
Initial setup: Mac
If you haven't already, please follow the SRCT initial setup instructions for Mac to install the prerequisite software.
Open Terminal and navigate to your SRCT projects directory.
We will use a tool called rbenv
to install Ruby. This is good practice as it allows you to easily manage multiple Ruby versions across different projects. Run
brew install rbenv ruby-build
To activate rbenv
, run the command
rbenv init
and follow the instructions that come up. Depending on the shell you use, it will ask you to insert some code at the end of your shell configuration.
And then install Ruby 2.6.5 with
rbenv install 2.6.5
rbenv global 2.6.5
And run ruby -v
to ensure the version is correct.
Bundler is the ruby program used to install ruby packages. To install it, simply run
gem install bundler
In your SRCT projects directory, run the following command to clone the Schedules codebase to your machine
git clone git@github.com:srct/schedules.git
Run cd schedules/schedules
to enter into the project directory.
To install the Ruby dependencies, run
bundle install
This will probably fail -- if it does, run rm Gemfile.lock
and try again.
Next, to install the JavaScript dependencies, run
yarn install
If this fails, run rm yarn.lock
and try again.
In your terminal, start the MySQL server and run mysql -uroot -p
and then type root
and enter to login to MySQL. Run the following commands to create the development and test databases for Schedules:
CREATE DATABASE schedules_dev;
CREATE DATABASE schedules_test;
Next, run the following commands to load the database with the last semester's data:
rails db:migrate
rails runner db/seeds.rb update
Finally, run this to start the Schedules development server:
rails s
Navigate in your web browser to localhost:3000 to see Schedules in action!