我想在其中安装 Rails 5/Postgres在 Windows 上的 Ubuntu 上 Bash并且还能够通过以下方式访问 Postgres 数据库Windows 版 PgAdmin https://www.pgadmin.org/download/pgadmin-4-windows/.
我很高兴通过 Windows 上的 Ubuntu 上的 Bash 安装所有 Rails 依赖项,但我知道我无法从 Bash 运行任何标准 GUI 工具,并且想知道是否可以在 Linux 子系统上安装 Rails 和 PostGres,然后使用 Windows 版本的 PgAdmin 查询我的数据库
我看过这个教程如何使用 postgresql 安装 ruby-on-rails-on-windows-10 https://mirrorcommunications.com/blog/how-to-install-ruby-on-rails-on-windows-10-with-postgresql但他似乎将 Postgres 安装到 Windows 而不是 Linux 子系统中。
我想知道这是否是让所有这些工具很好地协同工作的唯一方法。
基本上我想要我的Windows安装了 PgAdmin 来与我的通讯在 Windows 上的 Ubuntu 上 BashPostgres 数据库
以下是我从 Windows 连接安装在 WSL Ubuntu 中的 Postgres DB 的操作pgAdmin.
- 在 Windows 中启动 Ubuntu。
- 在 Ubuntu 终端中启动 postgres:
sudo service postgresql start
- 下载最新的pgAdmin https://www.pgadmin.org/download/pgadmin-4-windows/并在 Windows 中安装。
- 启动 pgAdmin,浏览器中会打开一个新选项卡;点击添加新服务器 link.
- In the popup Create - Server window in the browser:
-
General选项卡:我设置Name to 本地主机
-
联系选项卡:我设置主机名/地址 to 本地主机, set Password to postgres,这是默认的,点击
Save password?
- 我保存设置,保留其余字段不变
- 就是这样,我可以立即看到在 Postgres 中创建的数据库。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)