Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/59.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 运行rails服务器时,出现以下错误_Ruby On Rails_Macports - Fatal编程技术网

Ruby on rails 运行rails服务器时,出现以下错误

Ruby on rails 运行rails服务器时,出现以下错误,ruby-on-rails,macports,Ruby On Rails,Macports,运行psql-h localhost时,我得到: WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.3 => Booting WEBrick => Rails 3.2.3 application starting in development on `http://0.0.0.0:3000` => Call with -d to detach =>

运行psql-h localhost时,我得到:

WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.3
=> Booting WEBrick
=> Rails 3.2.3 application starting in development on `http://0.0.0.0:3000`
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/opt/local/lib/ruby1.9/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `initialize': could not connect to server: Connection refused (PG::Error)
    Is the server running on host "localhost" and accepting
    TCP/IP connections on port 5432?
could not connect to server: Connection refused
    Is the server running on host "localhost" and accepting
    TCP/IP connections on port 5432?
我的系统设置:
MacOSX 10.7.5和所有的东西都是用Macports安装的

看起来您只需要启动postgres如果您在终端中运行
ps aux | grep postgres
,您会得到什么?
psql: could not connect to server: Connection refused
    Is the server running on host "localhost" and accepting
    TCP/IP connections on port 5432?