Pay*_*ian 4 database rubymine pycharm vagrant rubymine-7
我刚刚开始研究通过Vagrant建立的ruby项目.我已经成功地获得了远程解释器,但是我无法连接到数据库.
这是我的Vagrantfile:
# This Vagrantfile is for development use only.
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "markusproject/ubuntu"
# Allow instance to see project folder.
# Warning: This may cause problems with your Vagrant box!
# Enable at your own risk.
# config.vm.synced_folder ".", "/home/vagrant/Markus"
# Access the server running on port 3000 on the host on port 42069.
# config.vm.network "forwarded_port", guest: 3000, host: 42069
config.vm.network :private_network, ip: '192.168.50.50'
config.vm.synced_folder '.', '/home/vagrant/Markus', nfs: true
config.vm.provider "virtualbox" do |vb|
# Uncomment the following line if you want a GUI.
# vb.gui = true
vb.name = "markus"
end
end
Run Code Online (Sandbox Code Playgroud)
我已经将VM设置为使用NFS.这是输出vagrant ssh-config:
Host default
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /Users/paymahn/.vagrant.d/insecure_private_key
IdentitiesOnly yes
LogLevel FATAL
Run Code Online (Sandbox Code Playgroud)
我已经保留了数据库连接的默认值,但尝试了几种为连接设置SSH隧道的变体.

这些变化包括:
当我测试连接时,所有这些变化都导致连接失败.任何有关获得此配置设置的帮助将不胜感激!