番場・白澤チーム
![image](https://private-user-images.githubusercontent.com/156413299/343334792-6ae027e5-4503-43b0-808f-8b13db5d0d6c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1MjE3NjcsIm5iZiI6MTcyNTUyMTQ2NywicGF0aCI6Ii8xNTY0MTMyOTkvMzQzMzM0NzkyLTZhZTAyN2U1LTQ1MDMtNDNiMC04MDhmLThiMTNkYjVkMGQ2Yy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwNVQwNzMxMDdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05N2FiN2VmNDgwOWEwZDA2YTA0NTQwOTgxZjQxOGMyNjM4OGYzOWJmYzhiNzg2MzE4YTM3YjYzNjk0Mjk5MTU5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.wysMZXPZLvN0WGEjGwxe1s0b-fwVM_Bk6xgM3Z89e6Y)
![image](https://private-user-images.githubusercontent.com/156413299/343338729-554895f9-5998-45d9-af71-49699f225305.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1MjE3NjcsIm5iZiI6MTcyNTUyMTQ2NywicGF0aCI6Ii8xNTY0MTMyOT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tQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kM2RkY2I5MzEzNjNmMzUwMTNiMDllNzM2MjY0NjMxYmE3NWY1ZjE2ZDRhMTRjNTczODIyZmE1Mzc0YzdiYzc5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.GulKSSuB1sVExd3TswKIVrJgSwqeQy9vlaT1mP2XCWo)
# インストール
brew install postgresql
# 起動
brew services start postgresql
# ユーザー作成&DB作成
createuser hackathon
createdb hackathon-dev -O hackathon
createdb hackathon-test -O hackathon
DB hackathon-dev
, hackathon-test
の存在を確認
% psql -l
Name | Owner | Encoding | Collate | Ctype | Access privileges
----------------+------------+----------+---------+-------+---------------------------
hackathon-dev | hackathon | UTF8 | C | C |
hackathon-test | hackathon | UTF8 | C | C |
以下のコマンドで問題なくPostgreSQLに入れたら成功
psql -h localhost -p 5432 -U hackathon -d hackathon-dev
psql -h localhost -p 5432 -U hackathon -d hackathon-test
デフォルトのユーザーでログイン
# PostgreSQL に入り,ユーザー "hackathon" に DB 作成の権限付与
% psql -U <ユーザー名> -d postgres
postgres=# ALTER ROLE hackathon WITH CREATEDB;
ALTER ROLE
postgres=# exit
# PostgreSQL を再起動
% brew services restart postgresql
参考
- https://zenn.dev/eguchi244_dev/articles/sql-postresql-install-20230620#homebrew%E3%81%8B%E3%82%89%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B
- https://qiita.com/Tiger-Kid/items/8cacb8b89a2d201f4cf8
brew install rbenv ruby-build
rbenv init
echo 'eval "$(~/.rbenv/bin/rbenv init - zsh)"' >> ~/.zshrc
rbenv install 3.2.2
git clone [email protected]:techouse-inc/hackathon_2024_5_team_b.git
cd hackathon_2024_5_team_b
これ以降はリポジトリ内で作業
gem install bundler
bundle install
sh scripts/init_db.zh