wag*_*325 5 postgresql macos homebrew
我正在使用 Mac OS X 10.8.5 并尝试使用自制软件安装 postgreSQL。我修复了运行brew info postgresql 时发生的几个错误和警告。但是,我不知道如何解决其余问题。
\n\n$brew 信息 postgresql
\n\npostgresql: stable 9.3.2 (bottled)\nhttp://www.postgresql.org/\nConflicts with: postgres-xc\n/usr/local/Cellar/postgresql/9.3.2 (2924 files, 40M) *\n Poured from bottle\nFrom: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/postgresql.rb\n==> Dependencies\nRequired: readline \xe2\x9c\x94\nRecommended: ossp-uuid \xe2\x9c\x94\n==> Options\n--32-bit\n Build 32-bit only\n--enable-dtrace\n Build with DTrace support\n--no-perl\n Build without Perl support\n--no-tcl\n Build without Tcl support\n--without-ossp-uuid\n Build without ossp-uuid support\n--without-python\n Build without python support\n==> Caveats\nIf builds of PostgreSQL 9 are failing and you have version 8.x installed,\nyou may need to remove the previous version first. See:\n https://github.com/Homebrew/homebrew/issues/issue/2510\n\nTo migrate existing data from a previous major version (pre-9.3) of PostgreSQL, see:\n http://www.postgresql.org/docs/9.3/static/upgrading.html\n\nWhen installing the postgres gem, including ARCHFLAGS is recommended:\n ARCHFLAGS="-arch x86_64" gem install pg\n\nTo install gems without sudo, see the Homebrew wiki.\n\nTo have launchd start postgresql at login:\n ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents\nThen to load postgresql now:\n launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist\nOr, if you don\'t want/need launchctl, you can just run:\n postgres -D /usr/local/var/postgres\nRun Code Online (Sandbox Code Playgroud)\n\n当我运行服务器时,我得到:
\n\n/usr/local/rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:825:in `initialize\': could not connect to server: No such file or directory (PG::ConnectionBad)\n Is the server running locally and accepting\n connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?\nRun Code Online (Sandbox Code Playgroud)\n\n我已经卸载了 postgresql 并重新安装,但似乎无法删除 postgresql 8.x 版本。
\n\n我已经阅读了几篇不同的文章来正确安装和运行 postgreSQL,并尝试了他们的建议,但似乎没有任何效果对我有用。
\n您的 Ruby 代码显然与 PostgreSQL 的系统版本相关联,后者在/var/pgsql_socket. Homebrew 版本将查找/tmp. (此时,请确保存在类似的文件。)要解决此问题,您可以通过指定“host”选项/tmp/.s.PGSQL.5432来告诉您的代码连接到 Homebrew 版本,但您的代码是这样拼写的。/tmp
将来,请确保您的 Ruby gem 与 Homebrew 版本链接。也许只需卸载并使用正确的路径集重新安装就可以了。
| 归档时间: |
|
| 查看次数: |
14052 次 |
| 最近记录: |