teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

タイトルを正式名称に変更

2021/03/19 03:54

投稿

shisha
shisha

スコア86

title CHANGED
@@ -1,1 +1,1 @@
1
- RailsがPostgreのエラーで起動できない。PG::ConnectionBad could not connect to server: 〜 "/tmp/.s.PGSQL.5432"?
1
+ RailsがPostgreSQLのエラーで起動できない。PG::ConnectionBad could not connect to server: 〜 "/tmp/.s.PGSQL.5432"?
body CHANGED
File without changes

3

さらに調査して追記

2021/03/19 03:53

投稿

shisha
shisha

スコア86

title CHANGED
File without changes
body CHANGED
@@ -49,7 +49,41 @@
49
49
  libicuio.dylib pkgconfig
50
50
  ```
51
51
 
52
+ さらに調べてみます。
53
+ ```
54
+ $ brew info icu4c +[master]
55
+ icu4c: stable 68.2 (bottled) [keg-only]
56
+ C/C++ and Java libraries for Unicode and globalization
57
+ http://site.icu-project.org/home
58
+ /usr/local/Cellar/icu4c/67.1 (258 files, 71.2MB)
59
+ Poured from bottle on 2020-08-04 at 20:19:20
60
+ /usr/local/Cellar/icu4c/68.2 (259 files, 72.5MB)
61
+ Poured from bottle on 2021-03-12 at 06:09:28
62
+ From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/icu4c.rb
63
+ License: ICU
64
+ ==> Caveats
65
+ icu4c is keg-only, which means it was not symlinked into /usr/local,
66
+ because macOS provides libicucore.dylib (but nothing else).
52
67
 
68
+ If you need to have icu4c first in your PATH, run:
69
+ echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrc
70
+ echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.zshrc
71
+
72
+ For compilers to find icu4c you may need to set:
73
+ export LDFLAGS="-L/usr/local/opt/icu4c/lib"
74
+ export CPPFLAGS="-I/usr/local/opt/icu4c/include"
75
+
76
+ For pkg-config to find icu4c you may need to set:
77
+ export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
78
+
79
+ ==> Analytics
80
+ install: 531,300 (30 days), 1,081,958 (90 days), 4,871,049 (365 days)
81
+ install-on-request: 15,806 (30 days), 26,964 (90 days), 141,229 (365 days)
82
+ build-error: 0 (30 days)
83
+ ```
84
+ 調整した方がよさそうだなと思ったところで、他に悪影響がでそうで、どう調整しようか一旦思いとどまっている段階です。
85
+
86
+
53
87
  ## その他のバージョン
54
88
 
55
89
  ```Gemfile

2

エラーにさらに調べたことを追記

2021/03/19 03:01

投稿

shisha
shisha

スコア86

title CHANGED
File without changes
body CHANGED
@@ -18,6 +18,8 @@
18
18
 
19
19
  ## ログ
20
20
 
21
+ 少し調べると、次のログ・ファイルの中身を見ると良さそうなので、ログを見ました。
22
+
21
23
  `$ cat /usr/local/var/log/postgres.log`
22
24
  でlogファイルを確かめると、直近で以下のログがたくさん記録されていました。
23
25
  ```
@@ -26,8 +28,30 @@
26
28
  Reason: image not found
27
29
  ```
28
30
 
31
+ ログのエラーについて調べてみるようにアドバイスをもらい、調べました。
32
+ [macでdyld: Library not loadedが出るので対処する \| このコードわからん](https://hai3.net/blog/mac-dyld-library-not-loaded/)
29
- ## バージョン
33
+ このページに従って、ディレクトリを見てます。バージョンが合ってなさそうです。
30
34
 
35
+ ```
36
+ $ ls /usr/local/opt/icu4c/lib/ +[master]
37
+ icu libicutest.68.2.dylib
38
+ libicudata.68.2.dylib libicutest.68.dylib
39
+ libicudata.68.dylib libicutest.a
40
+ libicudata.a libicutest.dylib
41
+ libicudata.dylib libicutu.68.2.dylib
42
+ libicui18n.68.2.dylib libicutu.68.dylib
43
+ libicui18n.68.dylib libicutu.a
44
+ libicui18n.a libicutu.dylib
45
+ libicui18n.dylib libicuuc.68.2.dylib
46
+ libicuio.68.2.dylib libicuuc.68.dylib
47
+ libicuio.68.dylib libicuuc.a
48
+ libicuio.a libicuuc.dylib
49
+ libicuio.dylib pkgconfig
50
+ ```
51
+
52
+
53
+ ## その他のバージョン
54
+
31
55
  ```Gemfile
32
56
  source 'https://rubygems.org'
33
57
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }

1

5432が専有されてなさそうなことを下に追加

2021/03/19 02:58

投稿

shisha
shisha

スコア86

title CHANGED
File without changes
body CHANGED
@@ -42,4 +42,20 @@
42
42
  ```
43
43
  $ psql --version
44
44
  psql (PostgreSQL) 13.1
45
- ```
45
+ ```
46
+
47
+ ## 5432が専有されてないか調べる
48
+
49
+ よくわかってないですが、5432ポートが専有されてないか調べてみたところ、特に専有はされてなさそうでした。
50
+
51
+ ```
52
+ $ netstat -a | grep :5432
53
+ ```
54
+ 特に何も表示されず、待機してる感じでした。
55
+
56
+
57
+ ```
58
+ $ lsof -i :5432
59
+ $ sudo lsof -i :5432
60
+ ```
61
+ こちらも何も表示されずでした。