简体   繁体   English

有什么方法可以从Windows 7访问Ubuntu VM的Rails应用程序?

[英]Is there a way I can access my Rails Application of my Ubuntu VM from my Windows 7?

I got a Rails application (running on Thin server) running on my Ubuntu VM, how can I be able to access it from my Windows 7 OS? 我在Ubuntu VM上运行了一个Rails应用程序(在Thin服务器上运行),如何从Windows 7 OS中访问它? I already have the VM bridge option enable. 我已经启用了VM Bridge选项。 I tried using the IP address from my Ubuntu VM directly to my windows 7 browser, but nothing happens, is there a way to do that? 我尝试将来自Ubuntu VM的IP地址直接用于Windows 7浏览器,但是没有任何反应,有没有办法做到这一点?

Yes, you can: 是的你可以:

  • You need a Bridged adapter for your Virtual Machine 您需要虚拟机的桥接适配器
  • You need to know your VM's IP address ( ifconfig | grep inet on Ubuntu) 您需要知道虚拟机的IP地址(在Ubuntu上为ifconfig | grep inet
  • Your VM needs to be turned on AND running the server 您的虚拟机需要打开并运行服务器

Then in your Windows 7 (or other computer in your local network, your smartphone for instance) you can open a browser and go to your VM's IP address + port (usually 3000). 然后,在Windows 7(或本地网络中的其他计算机,例如智能手机)上,您可以打开浏览器并转到VM的IP地址+端口(通常为3000)。

So, the address to put in your browser might look like this : 因此,放置在浏览器中的地址可能如下所示

http://192.168.1.5:3000/

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

相关问题 Rails:如何从virtualbox guest虚拟机(ubuntu)访问主机(windows)上的数据库? - Rails: How can I access my database on my host machine (windows) from a virtualbox guest (ubuntu)? 如何从Rails中的自定义模块访问参数? - How can I access params from my custom module in Rails? 如何在 Ruby on Rails 应用程序中使用 Redis 和 Windows 操作系统? - How can I use Redis in my Ruby on Rails application with Windows OS? rails:如何访问应用程序控制器中的方法? - rails: how do i access a method in my application controller? 授予从我的 Rails 应用程序访问 Azure blob 的权限 - Grant permissions to access Azure blobs from my Rails application Ubuntu 终端:我似乎无法再从终端启动程序了。 我使用 sublime、rails 和 heroku - Ubuntu terminal: I can't seem to launch programs from my terminal anymore. I use sublime, rails and heroku 如何在我的 Rails 模型中访问参数(或使用变通方法)? - How can I access params (or utilize a workaround) in my rails model? 如何在Java应用程序中访问Rails的会话 - How Can I Access Rails' Session In My Java App 我可以在URL中隐藏域名吗(在我的Rails应用程序中)? - Can I hide the domain name in the URL (in my Rails application)? 我无法使用守护进程 gem 运行我的 Rails 应用程序 - I can't run my Rails application with daemons gem
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM