LoginSignup
0
0

More than 3 years have passed since last update.

【Ruby on Rails】ERROR: Error installing rails: sprockets requires Ruby version >= 2.5.0.【環境構築時エラー】

Posted at

railsインストール時のエラー

Rubyは「Ruby+Devit 2.4.6-1 (x64)」をインストールしました。

Rubyのバージョンや環境を切り替えることができるuru導入しました。
そしてrailsをインストールするために以下コマンドを入力しました。

gem install rails --version="5.2.2"

するとエラー発生。

ERROR: Error installing rails: sprockets requires Ruby version >= 2.5.0.

Rubyのバージョンが低いことが原因のようです。
今度は「Ruby+Devkit 2.6.5-1 (x64)」をダウンロードし、以下コマンドで登録。

uru admin add C:\Ruby26-x64\bin --tag Ruby26

Ruby26に変更してみます。

uru Ruby26

再びrailsインストールコマンドを入力します。

gem install rails --version="5.2.2"

今度はエラーが表示されなくインストールできました。

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