局域网 ip 是:192.168.1.103 rails server 启动 rails 后,不能用 http://192.168.1.103:3000 访问吗?
http://guides.rubyonrails.org/4_2_release_notes.html 3.3 Default Host for rails server Due to a change in Rack, rails server now listens on localhost instead of 0.0.0.0 by default. This should have minimal impact on the standard development workflow as both http://127.0.0.1:3000 and http://localhost:3000 will continue to work as before on your own machine.
However, with this change you will no longer be able to access the Rails server from a different machine, for example if your development environment is in a virtual machine and you would like to access it from the host machine. In such cases, please start the server with rails server -b 0.0.0.0 to restore the old behavior.
If you do this, be sure to configure your firewall properly such that only trusted machines on your network can access your development server.
如果你的 rails 是最新版本(4.2)你应该这样启动:rails server -b 0.0.0.0