Run a rails project on a new mac for the first time
Make sure that Rails project's ruby version has been installed on this machine. You might need to install an older version of Ruby, by entering this in Terminal:
rvm install x.x.x
Clone a project from GitHub
Go to that project, then get the github url. Then CD to the directory where it should live, like:
cd ~/code/active
Then clone the repok for example:
git clone https://github.com/CasJam/zipmessage.git
Install all of the project's gems by running:
bundle
Then create the database:
rails db:create
Then migrate the database:
rails db:migrate
You might need to run these as well:
yarn
And then:
rails assets:precompile
Now you should be able to run the server:
rails s
Then view the app at either of these:
Last updated