所以我安装了与ruby应用程序冲突的postgresql和localhost端口? [英] So I installed postgresql and localhost port conflicting with ruby app?

查看:63
本文介绍了所以我安装了与ruby应用程序冲突的postgresql和localhost端口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了postgresql。我在pgadmin上将localhost端口设置为3000。然后它开始引发此错误,因为我的ruby应用程序的localhost端口也位于端口3000。
地址已在使用中- localhost端口3000(Errno :: EADDRINUSE

$的bind(2) b
$ b

我尝试将其卸载,但仍然出现错误。我尝试删除pgadmin。我尝试设置环境变量export PGPORT = 5432。所有这些错误仍然出现。只是想摆脱postgres并重新安装一切,看看出了什么问题。我完全感到困惑。我对ruby和postgres感到陌生。我通常使用node mongodb等。



问题:
摆脱postgresql并重新安装的最佳方法是什么?
关于如何编辑端口的其他想法?
如何在postgresql上删除数据库? / p>

我知道听起来我到处都是,因为我现在就在这里。我只是想重新开始。所以请任何帮助。

解决方案

在Mac OSX上安装和使用PG / Mongo / MySql的最佳方法是 Brew 。



如果未安装酿造,请通过复制/粘贴到终端中进行安装。

  / usr / bin / ruby​​ -e $(curl -fsSL https://raw.githubusercontent.com/Homebrew/ install / master / install) 

要安装Postgresql

  brew install postgresql 

使用数据库(运行/重新启动/停止)

 酿酒服务列表
brew服务启动postgres
brew服务停止postgres


I installed postgresql. I put the localhost port to 3000 on pgadmin. Then it started to throw this error since the localhost port for my ruby app is also at port 3000. Address already in use - bind(2) for "localhost" port 3000 (Errno::EADDRINUSE

I tried to uninstall it and the error still comes up. I tried to delete pgadmin. I tried to set an environment variable export PGPORT=5432. After all this the error still comes up. I just want to get rid of postgres and re-install everything to see what went wrong. I am completely confused. I am faily new with ruby and postgres. I usually use node mongodb etc.

Questions: What is the best way to get rid of postgresql and reinstall it? Any other ideas on how to edit the port? How to delete db on postgresql?

I know it sounds like I am all over the place because I am right now. I just want to start fresh. So please any help.

解决方案

Best way to install and use PG/Mongo/MySql on Mac OSX is Brew.

If brew not installed, install it by copy/pasting into Terminal.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

To install Postgresql

brew install postgresql

To use DB (run/restart/stop)

brew services list
brew services start postgres
brew services stop postgres

这篇关于所以我安装了与ruby应用程序冲突的postgresql和localhost端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆