LoginSignup
2
0

More than 5 years have passed since last update.

学内Rails勉強会用資料

Last updated at Posted at 2018-04-30

ほぼほぼ他の方が作られたもののリンクを纏めてるだけです。
書かれた方に多謝

目次

  1. 環境構築
  2. アプリ作成
  3. デプロイ

環境構築

今回は

  • AWSCloud9
  • Rails 5.2
  • Ruby 2.4
  • MySQL
  • AWS(EC2サーバー)

で作成していきます

AWSCloud9(2時間)

1.AWSアカウント取得

2.AWS初期設定

  • ちょっと記事が古いかも知れないけどこちら

Github

Cloud9への設定

そのままだとMySQLは使えないのでCloud9のbashの画面で
sudo yum install mysql-devel
gem install mysql2

アプリケーション作成

1.アプリ作成

rails new アプリ名 -d mysql

ディレクトリ移動

cd アプリ名

3.ユーザー関係(ログインなど)作成

deviseを利用
gem でインストールが必要
参考

4.各種カテゴリ作成

railsの機能であるscaffoldを使用
記事の投稿や削除などが出来る
参考

5.ここらで一旦DB作成

DB作成
rake db:create
DB更新
rake db:migrate

6.見た目がイマイチ?

テンプレートを適用

※まだ途中

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