简体   繁体   中英

Q: rails-tutorial Preview page not working

I get this screen after following the rails tutorial instructions to show the Hello, world text in a browser window (Figure 1.15 in the book).

I seem to recall having to specify both the PORT and IP environment variables the last time I ran through the tutorial...but now can't find any reference to these in the book text.

Preview Fails error

I had the same error, and I fixed it by running like this:

$ rails server -p $PORT -b $IP
=> Booting Puma
=> Rails 5.1.4 application starting in development 
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.9.1 (ruby 2.4.0-p0), codename: Private Caller
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:8080
Use Ctrl-C to stop

I haven't yet figured out why I am getting the error, though.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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