You've tried to invoke Spring when it's already loaded (i.e. the Spring constant is defined).
This is probably because you generated binstubs with Spring 1.0, and you now have a Spring version > 1.0 on your system.
To solve this, upgrade your bundle to the latest Spring version and then run `bundle exec spring binstub --all` to regenerate your binstubs. This is a one-time step necessary to upgrade from 1.0 to 1.1.
bin/spring status
でstatusを確認Sprint is running:
の場合, bin/spring stop
を実行rm -rf bin
でRailsアプリケーションのbinディレクトリを削除bundle exec rake app:update:bin
を実行これでrailsコマンドが正常に動くようになる.
※僕はvendor/bundleにインストールしているため, 下記のコマンドになる
$ rm -rf vendor/bundle
$ bundle install --path vendor/bundle
以下のようなエラーが出た場合は環境をきれいにしてから, 再度解決策を実行する.
$ bundle exec rake app:update:bin
rake aborted!
LoadError: cannot load such file -- bootsnap/setup
Using bootsnap
のような表示が出る場合は, Railsアプリケーションにbootsnapが入っていない可能性が高い.僕の場合はrbenvでRubyのバージョンを管理していたため, 利用しているバージョンを再インストールしてから, 1 ~ 7まで実行する.
$ rbenv uninstall 2.6.5
$ rbenv install 2.6.5
Twitterフォロー待ってます!