简体   繁体   English

Genymotion-访问主机上的Rails服务器?

[英]Genymotion - accessing Rails server on host machine?

OK, so I got Genymotion working beautifully and I can already see how quickly this will speed up Android development longer term. 好的,这样我就使Genymotion表现出色,并且我已经可以看到这将在多长时间内加快Android开发的速度。 However, I am having one problem currently that is keeping me from moving forward. 但是,我目前有一个问题使我无法前进。 I am unable to access a Rails server on my host machine from the Genymotion VM, and it appears to be a port issue of some kind. 我无法从Genymotion VM访问主机上的Rails服务器,这似乎是某种端口问题。 The reason I say that is because I can open a browser in my Nexus 4 VM, and navigate to 我之所以这样说是因为我可以在Nexus 4 VM中打开浏览器,然后导航到

http://192.168.1.114 

with no problem (my WampServer page shows up fine), but if I try to go to 没问题(我的WampServer页面显示正常),但是如果我尝试转到

http://192.168.1.114:3000 

(where my rails server is running, and I can access it fine from a host browser) I get a net::ERR_CONNECTION_TIMED_OUT and see no activity in my rails log either. (我的Rails服务器正在运行,并且可以从主机浏览器正常访问它)我得到了net :: ERR_CONNECTION_TIMED_OUT,并且在rails日志中也没有看到任何活动。 I've tried going through settings on the Android VM, the VirtualBox Manager, Genymotion itself, etc. to no avail, as well as turning off all firewalls completely. 我试图通过Android VM,VirtualBox Manager,Genymotion本身等上的设置无济于事,并且完全关闭了所有防火墙。

Right now the VirtualBox Network is configured as 现在,VirtualBox网络已配置为

Adapter 1 - Host-only adapter 适配器1-仅主机适配器

Adapter 2 - NAT 适配器2-NAT

Any thoughts what might be causing this? 有什么想法可能造成这种情况吗?

Okay, 好的,

its a Vb setting 它的Vb设置

cheat in your OS host file se that Ip to domain name for example: 在您的OS主机文件中欺骗IP域名,例如:

192.168.1.114:3000 myrailserver.my.me 192.168.1.114:3000 myrailserver.my.me

and that should work just fine 那应该很好

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM