ruby - Rails 4.2.0.beta2 - Can't connect to LocalHost? -
i installed rails 4.2.0.beta2 per instructions in railstutorial.org 3rd edition (the 1 came out). i'm not using cloudide , instead using ubuntu trusty 32 via vagrant on windows 7 host rvm.
did rails _4.2.0.beta2_ new hello_app
, pasted in his gemfile sample.
after that, ran:
$ bundle install $ rails s
server starts fine, when seek connect localhost:3000
"server not found"
weirder still, have couple other rails starter projects i've been tinkering utilize rails 4.0.3 , 4.1.6 , i'm able connect server there fine.
what missing here? why can't browser connect when i've created new rails project latest version, works fine older versions?
also, tried wget http://0.0.0.0:3000
, while connected , received 200 response, length unspecified, whereas in brand new rails app under old version, actual file size of whatever index.html
was.
regarding inaccessible server, rails 4.2 release notes:
3.3 default host rails server
due alter in rack, rails server listens on localhost instead of 0.0.0.0
default. should have minimal impact on standard development workflow both http://127.0.0.1:3000
, http://localhost:3000
go on work before on own machine.
however, alter no longer able access rails server different machine (e.g. development environment in virtual machine , access host machine), need start server rails server -b 0.0.0.0
restore old behavior.
if this, sure configure firewall such trusted machines on network can access development server.
127.0.0.1:3000
allow connections address on port 3000, whereas 0.0.0.0:3000
allow connections any address @ port 3000.
since rails 4.2 accepts connections localhost default, can access server localhost (eg. within vm); connections machine (eg. vm's host) not work.
you must utilize "old behavior" method described above allow connections vm host.
regarding unspecified content length, depends on web server in use. assume using chunked encoding not send content length. assets have content length, not html.
ruby-on-rails ruby ruby-on-rails-4 railstutorial.org ruby-on-rails-4.2
No comments:
Post a Comment