5
6

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 5 years have passed since last update.

【初心者必見】ローカル環境構築 Rails編【Mac OS】

Last updated at Posted at 2019-01-24

【初心者必見】ローカル環境構築 Ruby編【Mac OS】の続きです。

Bundlerのインストール

ターミナル
gem install bundler

インストールされているかを確認するためにバージョンを確認するコマンドを打つ

ターミナル
bundler -v

  • Bundlerとは

Railsでアプリを作成する際に便利なgemと呼ばれるライブラリをインストールするために必要。gem同士の互換性を保ちながらパッケージの種類やバージョンを管理してくれる仕組みのこと。

MySQLのインストール

ターミナル
brew install mysql

インストールされているかを確認するためにバージョンを確認するコマンドを打つ

ターミナル
mysql --version

MySQLの起動

ターミナル
mysql.server start
# Mysqlなどのデータベースが起動していないと、アプリにアクセスした時にエラーが出ます

  • MySQLとは

Railsアプリ等でデータを保存するためのデータベース管理システム
保存したデータを取得してビューに表示させたりするのに使います。
RailsはデフォルトでSQLiteを使用しますが、利用者数と情報の多さからMySQLを推奨します

Railsのインストール

ターミナル
gem install rails

インストールされているかを確認するためにバージョンを確認するコマンドを打つ

ターミナル
rails -v

以上でRailsの導入は完了です。

5
6
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
5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?