エラー内容
rails g controller でcontrollerを新規作成しようとしたができない
h2tomo:pote tomohiro$ rails g controller products rbenv: rails: command not found The `rails' command exists in these Ruby versions: 2.3.1 2.5.1
原因
- 2.4.1バ−ジョンのRubyをインストールしたのですが、railsのGemが入っていない状態だったらしい
解決策
- railsのgemをインストール
h2tomo:potepanec tomohiro$ gem i -v 5.1.3 rails