- Ruby 3.4.7
- Rails 7.2.2
https://github.com/yaroslavrick/my_money_app
cd finance_appcp .env.example .envInstall asdf for version management:
brew install asdf# Use a shortcut to configure your shell to use asdf:
echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ~/.zshrc
echo 'export PATH="${HOME}/.asdf/shims:${PATH}"' >> ~/.zshrc# Check the ~/.zshrc file for configuration commands
cat ~/.zshrc# On Mac M1/M2/M3: . /opt/homebrew/opt/asdf/libexec/asdf.sh
# For Mac Intel: . /usr/local/opt/asdf/asdf.sh
# Enable asdf to read .ruby-version files by adding to .asdfrc
echo "legacy_version_file = yes" >> ~/.asdfrc# SKIP IF RUST INSTALLED VIA HOMEBREW! Install the asdf plugin for rust:
asdf plugin-add rust
asdf install rust latest
asdf global rust latest
# Install the asdf plugin for Ruby:
asdf plugin add ruby# Install Ruby version 3.4.7
export RUBY_CONFIGURE_OPTS=--enable-yjit
asdf install ruby 3.4.7
# OPTIONAL check your ruby:
ruby --yjit -v
ruby --yjit -e "p RubyVM::YJIT.enabled?"# Add .tool-versions to your global .gitignore file
# Check if it exists with:
git config --global core.excludesfile# Modify it using:
code ~/.gitignore_global
# or
nano ~/.gitignore_global# Add .tool-versions file to the list
.tool-versions
# Check if it is added:
git config --global core.excludesfile ~/.gitignore_global
git config --global core.excludesfilebundle installdocker-compose upEnsure that the ports configured in .env do not conflict with your running services.
Check the PID that use the port 5432:
sudo lsof -i :5432
If there is conflict: Kill that PID:
sudo kill <PID>
sudo service docker start
sudo systemctl stop redis postgresql
docker-compose up
If you can't start docker, it can be problem with user permissions:
sudo gpasswd -a <user> docker
or:
sudo usermod -aG docker $USER
bundle exec rails db:create && bundle exec rails db:migrate && bundle exec rails db:seedbundle exec rails s7. Visit the app at localhost: http://localhost:3000
8. Visit the app at web: https://financeapp-production.up.railway.app/
bundle exec rspecTo run the test suite, use the following command:
bundle exec rspec




