我试图在windows中连接localhost:3000
rails server在vagrant中运行(ubuntu 14.10)
portforwarding已完成
什么时候,我lynx 127.0.0.1:3000在ubunutu 尝试
,它的工作原理
但是,在Windows中,我无法连接localhost:3000,127.0.0.1:3000
刚刚显示ERR_CONNECTION_REFUSED
在cmd中,我运行的netstat -t结果是:3000 TIME_WAIT
我怎么解决这个问题?
这是我的'Vagrantfile'
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# …Run Code Online (Sandbox Code Playgroud) ruby ruby-on-rails vagrant ruby-on-rails-4 ruby-on-rails-4.2
我按照RailsTutorial.org第3版(刚出来的那个)中的说明安装了Rails 4.2.0.beta2.我没有使用cloudIDE,而是在带有RVM的Windows 7主机上通过Vagrant使用Ubuntu Trusty 32.
的确rails _4.2.0.beta2_ new hello_app,然后贴在他的Gemfile样品.
之后,我跑了:
$ bundle install
$ rails s
Run Code Online (Sandbox Code Playgroud)
服务器启动正常,但是当我尝试连接到" localhost:3000我找不到服务器"时
Weirder仍然,我有一些其他Rails启动项目,我一直在修补使用Rails 4.0.3和4.1.6,我能够连接到那里的服务器就好了.
我在这里错过了什么?当我使用最新版本创建新的Rails项目时,为什么我的浏览器无法连接,但它适用于旧版本?
此外,我试过wget http://0.0.0.0:3000,虽然它连接并收到200响应,长度未指定,而在旧版本下的另一个全新的Rails应用程序,我会得到实际的文件大小index.html.
ruby ruby-on-rails railstutorial.org ruby-on-rails-4 ruby-on-rails-4.2