diff options
author | Richard Schneeman <richard.schneeman+no-recruiters@gmail.com> | 2017-08-03 16:15:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-03 16:15:52 -0500 |
commit | 23b07019aec2c0341af13aac17a4848738c1f836 (patch) | |
tree | 656434049f08c9f57535e76be69cd618371bc87b /railties/lib | |
parent | 7d6990344e3d549ef451bc554d126aaa8544ac95 (diff) | |
parent | bc5977b9c7a172a01c0300bfd67b3f9c1fd45610 (diff) | |
download | rails-23b07019aec2c0341af13aac17a4848738c1f836.tar.gz rails-23b07019aec2c0341af13aac17a4848738c1f836.tar.bz2 rails-23b07019aec2c0341af13aac17a4848738c1f836.zip |
Merge pull request #29967 from naw/binstub-error-msg
Improve bundler binstub error message
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/app_loader.rb | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/railties/lib/rails/app_loader.rb b/railties/lib/rails/app_loader.rb index 3dc4fe5414..9e4f715ca6 100644 --- a/railties/lib/rails/app_loader.rb +++ b/railties/lib/rails/app_loader.rb @@ -8,15 +8,26 @@ 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. -In Rails #{Rails::VERSION::MAJOR}, 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. -Here's how to upgrade: +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: bundle config --delete bin # Turn off Bundler's stub generator - rails app:update:bin # Use the new Rails 5 executables + rails app:update:bin # Use the new Rails executables git add bin # Add bin/ to source control You may need to remove bin/ from your .gitignore as well. |