LoginSignup
2
2

More than 5 years have passed since last update.

Rails5.2をCloud9(aws)で始める手順

Last updated at Posted at 2018-08-24

環境:cloud9(AWS)

初回のみ実行

①Railsをインストール

$ gem install rails -v 5.2.1

※バージョン指定しない場合は最新版が入る

②使用できるRailsのバージョンを確認

$ gem list rails

Rails5.2をCloud9(aws)で始める手順

①プロジェクトを作成

$ rails _5.2.1_ new projectname --database=mysql

※上記はmysqlを使用する例です。細かいオプションはドキュメントなどで要確認!

②プロジェクトに移動

$ cd ~/environment/projectname

③DBを作成

$ sudo service mysqld start
$ rails db:create

④サーバの起動

$ rails s -p 8080

※ポートは8080番を使用する

⑤「Yay! You’re on Rails!」の確認

キャプチャ.PNG

Preview → Preview Running Application → Pop Out Into New Window
でRailsの画面が表示できれば成功です。

⑥Gitイニシャライズ

$ git init
$ git add .
$ git commit -m "init Rails Project"

あとは Model → Router → Controller → View と開発していくだけです!

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