-
Notifications
You must be signed in to change notification settings - Fork 10
Step‐by‐step instructions to install the dependencies of our application
Open a terminal. Enter the following command and press Enter:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
In the same terminal, enter the following command to install ASDF via Homebrew:
brew install asdf
Run the following commands to add the Ruby plugin, install Ruby 3.1.0, and set it as the global Ruby version:
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
asdf install ruby 3.1.0
asdf global ruby 3.1.0
After setting up Ruby with ASDF, you can install Rails using the following command:
gem install rails
Install PostgreSQL, Redis, Yarn/Npm using Homebrew:
brew install postgresql redis yarn
NOTE: After installing PostgreSQL and Redis, you'll need to start their respective services to use them on your local machine. Look for these commands in the log output by brew to confirm that they are still up to date. Here are the commands to start PostgreSQL and Redis on macOS:
brew services start postgresql
brew services start redis
Follow the installation instructions for the Heroku CLI on their website.
Open PowerShell as an Administrator. To do this, search for "PowerShell" in the Start menu, right-click on "Windows PowerShell," and choose "Run as Administrator."
Run the following command to install Chocolatey:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Open a new PowerShell window (not as Administrator) after installing Chocolatey. Install ASDF using Chocolatey:
choco install asdf
In the same PowerShell window, run the following commands to add the Ruby plugin, install Ruby 3.1.0, and set it as the global Ruby version:
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
asdf install ruby 3.1.0
asdf global ruby 3.1.0
After setting up Ruby with ASDF, you can install Rails using the following command:
gem install rails
Install PostgreSQL, Redis, Yarn/Npm using Chocolatey:
choco install postgresql redis yarn
NOTE: After installing PostgreSQL and Redis, you'll need to start their respective services to use them on your local machine. Here are the commands to start PostgreSQL and Redis on Windows:
Open Command Prompt as an Administrator.
pg_ctl -D "C:\Program Files\PostgreSQL\<version>\data" start
Replace with your PostgreSQL version (e.g., 13).
Open Command Prompt or PowerShell.
Navigate to the Redis installation directory. By default, it's usually C:\Program Files\Redis.
Run the Redis server executable:
redis-server.exe
Remember that these services need to be running in the background for your applications to interact with them. You'll typically start these services before working on your project and stop them when you're done.
Please note that the commands and paths might vary slightly depending on your specific setup and configuration. Always refer to the official documentation of PostgreSQL and Redis for the most accurate and up-to-date information.
Follow the installation instructions for the Heroku CLI on their website.
By following these steps, you'll have successfully set up all the required dependencies for your project on both macOS and Windows, including installing a Ruby version manager like ASDF.