From a5da9d92e1dd85ae5a3e7cb223158c6551d8958c Mon Sep 17 00:00:00 2001 From: Nathan Wenneker Date: Wed, 26 Jul 2017 19:12:52 -0600 Subject: [PATCH 1/2] 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(-) 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 = < Date: Thu, 3 Aug 2017 14:42:54 -0600 Subject: [PATCH 2/2] Revise bundle binstub error message --- railties/lib/rails/app_loader.rb | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/railties/lib/rails/app_loader.rb b/railties/lib/rails/app_loader.rb index a5d22fa9bc..9e4f715ca6 100644 --- a/railties/lib/rails/app_loader.rb +++ b/railties/lib/rails/app_loader.rb @@ -8,16 +8,21 @@ module Rails RUBY = Gem.ruby EXECUTABLES = ["bin/rails", "script/rails"] BUNDLER_WARNING = <