LoginSignup
36

More than 5 years have passed since last update.

railsコマンドがおかしくなった時にやってみた事

Last updated at Posted at 2014-03-26
  • Rails 4系
  • bundle install --binstubs
  • spring --binstub

この辺りをごちゃごちゃやっていたら、

Bundler is using a binstub that was created for a different gem.

とか出たり、rails serverrails consoleとかやってもrails newのヘルプが出るだけになってしまった…。

で、その時にやった方法をメモ。

binをごっそり消す

$ cd RAILS_ROOT
$ rm -rf ./bin

--binstubsで別のパスを指定している場合はそのディレクトリも消す

$ rm -rf path_to_binstubs

binディレクトリの生成

$ bundle exec rake rails:update:bin

bundle install --binstubs

これで、springの効果はないけどrails consoleが動くようになった。

spring binstub --all

ここまでやって

$ ./bin/rails console

とかが2回目以降、爆速に!

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
36