LoginSignup
52
36

More than 5 years have passed since last update.

railsをインストールできない

Last updated at Posted at 2017-08-13

はじめに

よし、Rubyのバージョンを上げたからrailsを触るぞ!ってなったときにはまったこと。

前回のRubyバージョンアップする記事はこちら↓
MacのRubyをrbenvでバージョンアップする
※上の記事にはすでにコマンド追加をしてます

Railsをインストール

まずはrailsがあるか確認

$ rails -v

Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command.

ないですね。ということで、コマンド打っていきます。

$ sudo gem install rails

〜略〜

installが終わったので確認。

$ rails -v

Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command.

どうした。おい。

Rails is not currently installed on this system. To get the latest version, simply type:

なんだか怪しげな感じなのでぐぐりました。はい。
以下のコマンドを打てばうまくいきました。

$ gem install railties && rbenv rehash
$ brew install rbenv ruby-build

 Successfully installed railties-5.1.3
 Parsing documentation for railties-5.1.3
 Done installing documentation for railties after 0 seconds
 1 gem installed

$ rails -v
 Rails 5.1.3

おお!

できた。

終わりに

先人の方たちに感謝してますm(_ _)m

まだまだ頑張る。

52
36
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
52
36