@classicalliu 你好,还是不能访问
执行rails db:setup
会报下面的错:
$rails db:setup
could not translate host name "db" to address: Temporary failure in name resolution
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "host"=>"db", "port"=>5432, "pool"=>5, "username"=>"postgres", "password"=>"postgres", "database"=>"re-birth_development"}
rails aborted!
PG::ConnectionBad: could not translate host name "db" to address: Temporary failure in name resolution
但是执行make setup
是成功的,但是之后执行make start
,又会输出下面的日志:
sync_1_e28d3b07f01c | 2019-02-26 04:02:21 +0000
sync_1_e28d3b07f01c | No such file or directory @ rb_sysopen - /app/tmp/pids/production_sync_monitor.pid
sync_1_e28d3b07f01c | ["/usr/local/bundle/gems/daemons-1.2.6/lib/daemons/pidfile.rb:92:in `initialize'",
"/usr/local/bundle/gems/daemons-1.2.6/lib/daemons/pidfile.rb:92:in `open'",
"/usr/local/bundle/gems/daemons-1.2.6/lib/daemons/pidfile.rb:92:in `pid='",
"/usr/local/bundle/gems/daemons-1.2.6/lib/daemons/monitor.rb:66:in `block in start_with_pidfile'",
"/usr/local/bundle/gems/daemons-1.2.6/lib/daemons/monitor.rb:62:in `fork'",
"/usr/local/bundle/gems/daemons-1.2.6/lib/daemons/monitor.rb:62:in `start_with_pidfile'",
"/usr/local/bundle/gems/daemons-1.2.6/lib/daemons/monitor.rb:93:in `start'",
"/usr/local/bundle/gems/daemons-1.2.6/lib/daemons/application_group.rb:150:in `create_monitor'",
"/usr/local/bundle/gems/daemons-1.2.6/lib/daemons/application.rb:288:in `start'",
"/usr/local/bundle/gems/daemons-1.2.6/lib/daemons/controller.rb:56:in `run'",
"/usr/local/bundle/gems/daemons-1.2.6/lib/daemons.rb:197:in `block in run_proc'",
"/usr/local/bundle/gems/daemons-1.2.6/lib/daemons/cmdline.rb:92:in `catch_exceptions'",
"/usr/local/bundle/gems/daemons-1.2.6/lib/daemons.rb:196:in `run_proc'",
"/app/lib/sync_control.rb:14:in `<main>'"]