前提・実現したいこと
・実現したいこと
cloneしたRailsプロジェクトを自環境(WSL)で構築して
ローカル環境で動かしたい。
・前提
PostgreSQLエラー内容からrole(ユーザー)が存在していないことは理解できたのですが、WSL上でroleの登録の手順(コマンド)がわからなくて悩んでおります。
発生している問題・エラーメッセージ
FATAL: role "hoge" does not exist
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "username"=>"hoge", "password"=>"hoge", "host"=>"localhost", "pool"=>5, "timeout"=>5000, "database"=>"db/hoge_development"}
rake aborted!
ActiveRecord::NoDatabaseError: FATAL: role "hoge" does not exist
/home/hogeuser/.rbenv/versions/2.5.1/bin/bundle:23:in load' /home/hogeuser/.rbenv/versions/2.5.1/bin/bundle:23:in
<main>'
Caused by:
PG::ConnectionBad: FATAL: role "hoge" does not exist
/home/hogeuser/.rbenv/versions/2.5.1/bin/bundle:23:in load' /home/hogeuser/.rbenv/versions/2.5.1/bin/bundle:23:in
<main>'
Tasks: TOP => db:create
(See full trace by running task with --trace)
該当のソースコード
$ git clone https://github.com/xxx/yyy.git
$ gem install bundler
$ bundle install
$ bundle exec rake db:create←ここで上記エラーメッセージがでました。
試したこと
こちらのサイトを参考にしました。
補足情報(FW/ツールのバージョンなど)
Ubuntuでうごかしています。
回答1件
あなたの回答
tips
プレビュー