Help us understand the problem. What is going on with this article?

railsのバージョン変更する

cloneしたgemfileのバージョンにrailsのバージョンを合わせたい

該当のバージョンをインスール

$ gem install -v 5.2.1 rails

エラーが起きる

gem install -v  5.2.1 rails
ERROR:  Error installing rails:
        The last version of sprockets (>= 3.0.0) to support your Ruby & RubyGems was 3.7.2. Try installing it with `gem install sprockets -v 3.7.2` and then running the current command again
        sprockets requires Ruby version >= 2.5.0. The current ruby version is 2.4.2.198.

rubyのバージョンを変更したので、それに合わせて

gemのアップデート
$ gem update --systems
新しくインストールしたrubyの環境にbundleを入れる
$ gem install bundler

そして先ほどのエラー文を読むと

gem install sprockets -v 3.7.2

してください。となっていたのでこれを実行する。

もう一度

$ gem install -v 5.2.1 rails
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした