简体   繁体   English

测试从VirtualBox在mac os x上运行的Rails应用程序

[英]Testing Rails App running on mac os x from VirtualBox

I am running a Rails app on server 3000 on my Mac OS X, and am trying (and failing to) connect to it from a Windows XP IE7 VM. 我在Mac OS X上的服务器3000上运行Rails应用程序,并且正在尝试(并且未能)从Windows XP IE7 VM连接到它。

I have tried the following: 我尝试过以下方法:

NAT and using the ip address provided on the mac through ifconfig Bridged Adapter in promiscuous mode and using the ip address provided on the mac through ifconfig Host Only and using the ip address provided on the mac through ifconfig Bridged Adapter in promiscuous mode and 10.0.2.2:3000 (as outlined here: http://ubuntuforums.org/showthread.php?t=682519 ). NAT和使用mac上提供的ip地址通过ifconfig Bridged Adapter在混杂模式下使用macconfig上提供的ip地址通过ifconfig Host only并使用mac上提供的ip地址通过ifconfig Bridged Adapter在混杂模式和10.0.2.2 :3000(如下所述: http//ubuntuforums.org/showthread.php?t = 682519 )。

None of these appear to be working... 这些似乎都没有起作用......

I got this working by leaving the adapter setting on the VM as NAT and adding http:// in front of the 10.0.2.2:3000 address. 我通过将VM上的适配器设置保留为NAT并在10.0.2.2:3000地址前面添加http://来实现此10.0.2.2:3000

For a while a tried just putting 10.0.2.2:3000 in and it didn't worked. 有一段时间尝试将10.0.2.2:3000去并且它没有用。

Hope it helps someone save some time. 希望它可以帮助别人节省一些时间。

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

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