LoginSignup
31
10

More than 5 years have passed since last update.

Cloud9上でのRuby on rails サーバ起動/ページ表示方法(Ruby on rails Tutorial 1.3.2)

Last updated at Posted at 2018-03-22

Ruby on rails Tutorial 1.3.2でサーバ起動後のページ表示に躓いたのでメモ
【開発環境】cloud9(Windows上)

Ruby on rails Tutorial 1.3.2で
$ rails server
を入力すると以下のようにTutorialと違う結果が出力された。

$ rails server
=> 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.1-p111), codename: Private Caller
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:8080

httpのアドレスが表示されずページが開けない。
これはcloud9というクラウド上でサーバを起動しておりlocalhostが使用できないためらしい。

ページの表示方法は以下
1. $ rails serverでサーバを起動する(上記の結果でOK)
2. 画面上部Preview → Preview Running Application をクリック
3. cloud9上にブラウザが表示されるので、アドレスバーの右にあるボタンをクリック
4. ページが表示される。

31
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
31
10