diff options
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb | 4 | ||||
-rw-r--r-- | activesupport/lib/active_support/messages/metadata.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/app_loader.rb | 21 | ||||
-rw-r--r-- | tasks/release.rb | 2 |
4 files changed, 20 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb index 314a35207b..5febb5a59f 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb @@ -465,12 +465,12 @@ module ActiveRecord @binds = [] end - def << str + def <<(str) @parts << str self end - def add_bind obj + def add_bind(obj) @binds << obj @parts << Arel::Nodes::BindParam.new(1) self diff --git a/activesupport/lib/active_support/messages/metadata.rb b/activesupport/lib/active_support/messages/metadata.rb index db14ac0b1c..a45aecfcd0 100644 --- a/activesupport/lib/active_support/messages/metadata.rb +++ b/activesupport/lib/active_support/messages/metadata.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "time" module ActiveSupport 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. diff --git a/tasks/release.rb b/tasks/release.rb index b3bbbb0076..d0c93da187 100644 --- a/tasks/release.rb +++ b/tasks/release.rb @@ -234,7 +234,7 @@ task :announce do versions = ENV["VERSIONS"] ? ENV["VERSIONS"].split(",") : [ version ] versions = versions.sort.map { |v| Announcement::Version.new(v) } - raise "Only valid for patch releases" if versions.any?(&:major_or_security?) + raise "Only valid for patch releases" if versions.any?(&:major_or_security?) if versions.any?(&:rc?) require "date" |