LoginSignup
0
1

More than 1 year has passed since last update.

Ruby on Railsでアプリを作る準備をする

Last updated at Posted at 2022-05-15

毎回どうだっけと忘れてしまうので、Ruby on Railsのアプリを立ち上げるところまでをまとめました。備忘録です。

railsをインストールする

Bundlerのインストール

gem install bundler

Railsのインストール

gem install rails

rails new コマンドでアプリケーション作成の準備

webpackerをインストールする

rails webpacker:install

rails new コマンド
cdコマンドでPC上のアプリを作成したいディレクトリに移動し

rails new アプリケーション名

成功した場合、ターミナルに以下のように表示されます。
スクリーンショット 2022-05-15 17.37.42.png

※rails newがうまくいかない場合、以下を試してみる。

brew install yarn

※他にも環境や設定によって、他にもインストールしないといけない場合があります

Railsのサーバーを立ち上げる

cdコマンドでnewコマンドで作成したフォルダへ移動し
Railsのアプリケーションサーバー(puma)を起動させる

rails s

以下のように表示されれば成功です!
スクリーンショット 2022-05-15 17.46.28.png

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