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

Ruby 2.3.0 → 2.4.1 にした時に Rails が動かなくなった.

More than 3 years have passed since last update.
 $ rbenv install 2.4.1
ruby-build: definition not found: 2.4.1

The following versions contain `2.4.1' in the name:
  rbx-2.4.1

See all available versions with `rbenv install --list'.

If the version you need is missing, try upgrading ruby-build:

  cd /Users/_user_name_/.rbenv/plugins/ruby-build && git pull && cd -

 $ cd /Users/_user_name_/.rbenv/plugins/ruby-build && git pull && cd -

rubyをビルドするruby-buildのバージョンが最新版になってなかったみたい.

 $ bundle install
rbenv: bundle: command not found

The `bundle' command exists in these Ruby versions:
  2.3.0
  2.4.0

ふむふむ、2.4.1のbundlerが入っていないみたい!

 $ sudo gem install bundle

なるほど!Railsのinstallし直さないと行けない!!

 $ gem install rails
 $ rails s
=> Booting Puma
=> Rails 5.0.4 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.9.1 (ruby 2.4.1-p111), codename: Private Caller
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop

動いた!!

4geru
エンジニア初心者です。
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