aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Wenneker <nathan@preferral.com>2017-08-03 14:42:54 -0600
committerNathan Wenneker <nathan@preferral.com>2017-08-03 14:42:54 -0600
commitbc5977b9c7a172a01c0300bfd67b3f9c1fd45610 (patch)
tree3003015af6e24f20b45665819b5fe32a5823c260
parenta5da9d92e1dd85ae5a3e7cb223158c6551d8958c (diff)
downloadrails-bc5977b9c7a172a01c0300bfd67b3f9c1fd45610.tar.gz
rails-bc5977b9c7a172a01c0300bfd67b3f9c1fd45610.tar.bz2
rails-bc5977b9c7a172a01c0300bfd67b3f9c1fd45610.zip
Revise bundle binstub error message
-rw-r--r--railties/lib/rails/app_loader.rb21
1 files 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 = <<EOS
-Looks like your app's ./bin/rails is a stub that was generated by Bundler.
+Beginning in Rails 4, Rails ships with a `rails` binstub at ./bin/rails that
+should be used instead of the Bundler-generated `rails` binstub.
-Beginning In Rails 4, your app's bin/ directory contains executables that are versioned
-like any other source code, rather than stubs that are generated on demand.
+If you are seeing this message, your binstub at ./bin/rails was generated by
+Bundler instead of Rails.
-If your application was created in Rails 4+, you might be seeing this message
-if your bundle install command is using the --binstubs option and thereby overriding the
-standard Rails bin/rails binstub. You might need to stop using the --binstubs option,
-or at least ensure that it is using a path other than ./bin. You may need to coordinate
-this change with your environment's PATH.
+You might need to regenerate your `rails` binstub locally and add it to source
+control:
+
+ rails app:update:bin # Bear in mind this generates other binstubs
+ # too that you may or may not want (like yarn)
+
+If you already have Rails binstubs in source control, you might be
+inadverently overwriting them during deployment by using bundle install
+with the --binstubs option.
If your application was created prior to Rails 4, here's how to upgrade: