Rails-tutorial Chapter 1: rails server isn't working on Cloud9

后端 未结 4 664
说谎
说谎 2021-02-04 12:58

https://www.railstutorial.org/book/beginning#sec-rails_server

I have reached this step, and I\'m using the cloud9 environment. When I run the server as per Listing 1.7 o

4条回答
  •  长发绾君心
    2021-02-04 13:29

    $ rails server -b $IP -p $PORT
    

    Cloud9 uses the special environment variables $IP and $PORT to assign the IP address and port number dynamically. If you want to see the values of these variables, type echo $IP or echo $PORT at the command line.

    It's likely that if you wait a few minutes (not more than 2), your OS will free up the port. If not, use a random port number over about 5,000 every time you run rails server, e.g.

    $ rails server -b $IP -p 6789
    

    Or, because your IDE is so sucky, you might consider using a different IDE.

提交回复
热议问题