From a5da9d92e1dd85ae5a3e7cb223158c6551d8958c Mon Sep 17 00:00:00 2001 From: Nathan Wenneker Date: Wed, 26 Jul 2017 19:12:52 -0600 Subject: Improve bundler binstub error message Rails displays an error message if you have a bundler-generated binstub at `./bin/rails` instead of a Rails-generated binstub. This error message is misleading because it makes it seem as though Rails 5 introduced recent changes in how binstubs are used, when these changes were actually introduced way back in Rails 4. The suggested upgrade steps are appropriate for an app that was created in Rails 3, but they likely aren't the correct fix for someone who sees this error message today on a modern app. I believe the `--binstubs` option on bundler is a more likely culprit and troubleshooting path. --- railties/lib/rails/app_loader.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'railties') diff --git a/railties/lib/rails/app_loader.rb b/railties/lib/rails/app_loader.rb index 3dc4fe5414..a5d22fa9bc 100644 --- a/railties/lib/rails/app_loader.rb +++ b/railties/lib/rails/app_loader.rb @@ -10,13 +10,19 @@ module Rails BUNDLER_WARNING = <