$bundle exec rails g controller user
If you do, the one described in Gemfile.lock will be required.
To put it simply, if you develop and update without bundle exec, it may get stuck. So, I understood that it would be safe to develop with bundle exec, so I thought it would be good for the time being.
reference https://qiita.com/dawn_628/items/1821d4eef22b9f45eea8 This article was written in great detail.