0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

cloud9 でのRuby on Rails始め方

Posted at

0.はじめに

自分の学習記録として書いている為、ご指摘等ございましたら、教えていただけると幸いです。
この記事のゴールを以下に示します。

  • Ruby on RailsでYay! You’re on Rails!のページを開く
※なお、初めのcloud9で「Create Environment」はすでに行なっているものとします。

1.Ruby on Railsのインストール

ターミナルに以下コマンドを入力します。


$ printf "install: --no-document \nupdate: --no-document \n" >> ~/.gemrc

$ gem install rails -v 5.2.4

これでRuby on Railsのインストールは完了しました。

2.新規アプリケーションの作成

$ rails new XXX

XXXの部分はご自身で好きなアプリケーション名を付けてください。

今回私はこのようにしました。

$ rails new demo_app

すると左側に沢山のファイルができていると思います。

3.Yay! You’re on Rails!のページを開く(ゴール)

ゴールはもう少しです。
以下のようにして先ほど作ったディレクトリに移動をします。

$ cd XXX
//私の場合は、
$ cd demo_app

最後に、

$ rails s

を実行し、上部にあるpreview→preview Running Applicationを選択。
下のターミナルの右に小さく画面が出ていると思うので、右端の□に↗︎がついたマークを押すと、Yay! You’re on Rails!のページが開きます。

以上です。

参考ページ

参考にさせていただきました。ありがとうございます。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?