Created
June 12, 2017 15:15
-
-
Save nthj/3be9af5be0de314fdbe074be12b01079 to your computer and use it in GitHub Desktop.
Reproducing Rails Issue #29419 https://github.com/rails/rails/issues/29419
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# setup | |
RAILS_VERSION="5.1.1" | |
gem install rails -v $RAILS_VERSION && \ | |
rails _${RAILS_VERSION}_ new rails-${RAILS_VERSION}-test && \ | |
cd rails-${RAILS_VERSION}-test && \ | |
rails generate model User && \ | |
rails db:migrate && \ | |
echo 'class User < ActiveRecord::Base; FOO = where(id: [1]); end' > app/models/user.rb && \ | |
echo 'Rails.application.routes.draw { User }' > config/routes.rb | |
# test | |
RAILS_ENV=test rails db:drop && \ | |
RAILS_ENV=test rails db:create db:schema:load --trace | |
# cleanup | |
cd .. && \ | |
rm -rf rails-${RAILS_VERSION}-test | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# setup | |
RAILS_VERSION="5.1.1" | |
gem install rails -v $RAILS_VERSION && \ | |
rails _${RAILS_VERSION}_ new rails-${RAILS_VERSION}-test && \ | |
cd rails-${RAILS_VERSION}-test && \ | |
rails generate model User && \ | |
rails db:migrate && \ | |
echo 'class User < ActiveRecord::Base; FOO = where(id: [1]); end' > app/models/user.rb && \ | |
echo 'Rails.application.routes.draw { User }' > config/routes.rb | |
# test | |
RAILS_ENV=test rails db:drop && \ | |
RAILS_ENV=test rails db:create db:schema:load --trace | |
# cleanup | |
cd .. && \ | |
rm -rf rails-${RAILS_VERSION}-test | |
Successfully installed rails-5.1.1 | |
1 gem installed | |
create | |
create README.md | |
create Rakefile | |
create config.ru | |
create .gitignore | |
create Gemfile | |
run git init from "." | |
Initialized empty Git repository in /Users/nj/Projects/Rails/rails-5.1.1-test/.git/ | |
create app | |
create app/assets/config/manifest.js | |
create app/assets/javascripts/application.js | |
create app/assets/javascripts/cable.js | |
create app/assets/stylesheets/application.css | |
create app/channels/application_cable/channel.rb | |
create app/channels/application_cable/connection.rb | |
create app/controllers/application_controller.rb | |
create app/helpers/application_helper.rb | |
create app/jobs/application_job.rb | |
create app/mailers/application_mailer.rb | |
create app/models/application_record.rb | |
create app/views/layouts/application.html.erb | |
create app/views/layouts/mailer.html.erb | |
create app/views/layouts/mailer.text.erb | |
create app/assets/images/.keep | |
create app/assets/javascripts/channels | |
create app/assets/javascripts/channels/.keep | |
create app/controllers/concerns/.keep | |
create app/models/concerns/.keep | |
create bin | |
create bin/bundle | |
create bin/rails | |
create bin/rake | |
create bin/setup | |
create bin/update | |
create bin/yarn | |
create config | |
create config/routes.rb | |
create config/application.rb | |
create config/environment.rb | |
create config/secrets.yml | |
create config/cable.yml | |
create config/puma.rb | |
create config/spring.rb | |
create config/environments | |
create config/environments/development.rb | |
create config/environments/production.rb | |
create config/environments/test.rb | |
create config/initializers | |
create config/initializers/application_controller_renderer.rb | |
create config/initializers/assets.rb | |
create config/initializers/backtrace_silencers.rb | |
create config/initializers/cookies_serializer.rb | |
create config/initializers/cors.rb | |
create config/initializers/filter_parameter_logging.rb | |
create config/initializers/inflections.rb | |
create config/initializers/mime_types.rb | |
create config/initializers/new_framework_defaults_5_1.rb | |
create config/initializers/wrap_parameters.rb | |
create config/locales | |
create config/locales/en.yml | |
create config/boot.rb | |
create config/database.yml | |
create db | |
create db/seeds.rb | |
create lib | |
create lib/tasks | |
create lib/tasks/.keep | |
create lib/assets | |
create lib/assets/.keep | |
create log | |
create log/.keep | |
create public | |
create public/404.html | |
create public/422.html | |
create public/500.html | |
create public/apple-touch-icon-precomposed.png | |
create public/apple-touch-icon.png | |
create public/favicon.ico | |
create public/robots.txt | |
create test/fixtures | |
create test/fixtures/.keep | |
create test/fixtures/files | |
create test/fixtures/files/.keep | |
create test/controllers | |
create test/controllers/.keep | |
create test/mailers | |
create test/mailers/.keep | |
create test/models | |
create test/models/.keep | |
create test/helpers | |
create test/helpers/.keep | |
create test/integration | |
create test/integration/.keep | |
create test/test_helper.rb | |
create test/system | |
create test/system/.keep | |
create test/application_system_test_case.rb | |
create tmp | |
create tmp/.keep | |
create tmp/cache | |
create tmp/cache/assets | |
create vendor | |
create vendor/.keep | |
create package.json | |
remove config/initializers/cors.rb | |
remove config/initializers/new_framework_defaults_5_1.rb | |
run bundle install | |
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. | |
Fetching gem metadata from https://rubygems.org/......... | |
Fetching version metadata from https://rubygems.org/.. | |
Fetching dependency metadata from https://rubygems.org/. | |
Resolving dependencies... | |
Using rake 12.0.0 | |
Using concurrent-ruby 1.0.5 | |
Using i18n 0.8.4 | |
Using minitest 5.10.2 | |
Using thread_safe 0.3.6 | |
Using builder 3.2.3 | |
Using erubi 1.6.0 | |
Using mini_portile2 2.2.0 | |
Using rack 2.0.3 | |
Using nio4r 2.1.0 | |
Using websocket-extensions 0.1.2 | |
Using mime-types-data 3.2016.0521 | |
Using arel 8.0.0 | |
Using bundler 1.15.1 | |
Using method_source 0.8.2 | |
Using thor 0.19.4 | |
Fetching sqlite3 1.3.13 | |
Installing sqlite3 1.3.13 with native extensions | |
Fetching puma 3.9.1 | |
Installing puma 3.9.1 with native extensions | |
Using sass 3.4.24 | |
Using tilt 2.0.7 | |
Using execjs 2.7.0 | |
Fetching coffee-script-source 1.12.2 | |
Installing coffee-script-source 1.12.2 | |
Using turbolinks-source 5.0.3 | |
Using multi_json 1.12.1 | |
Using byebug 9.0.6 | |
Fetching public_suffix 2.0.5 | |
Installing public_suffix 2.0.5 | |
Using ffi 1.9.18 | |
Using rubyzip 1.2.1 | |
Fetching websocket 1.2.4 | |
Installing websocket 1.2.4 | |
Using bindex 0.5.0 | |
Using rb-fsevent 0.9.8 | |
Fetching ruby_dep 1.5.0 | |
Installing ruby_dep 1.5.0 | |
Using tzinfo 1.2.3 | |
Using nokogiri 1.8.0 | |
Using rack-test 0.6.3 | |
Using sprockets 3.7.1 | |
Using websocket-driver 0.6.5 | |
Using mime-types 3.1 | |
Fetching uglifier 3.2.0 | |
Installing uglifier 3.2.0 | |
Fetching coffee-script 2.4.1 | |
Installing coffee-script 2.4.1 | |
Using turbolinks 5.0.1 | |
Fetching addressable 2.5.1 | |
Installing addressable 2.5.1 | |
Fetching childprocess 0.7.0 | |
Installing childprocess 0.7.0 | |
Using rb-inotify 0.9.8 | |
Using activesupport 5.1.1 | |
Using loofah 2.0.3 | |
Fetching xpath 2.1.0 | |
Installing xpath 2.1.0 | |
Using mail 2.6.6 | |
Fetching selenium-webdriver 3.4.0 | |
Installing selenium-webdriver 3.4.0 | |
Fetching listen 3.1.5 | |
Installing listen 3.1.5 | |
Using rails-dom-testing 2.0.3 | |
Using globalid 0.4.0 | |
Using activemodel 5.1.1 | |
Fetching jbuilder 2.7.0 | |
Installing jbuilder 2.7.0 | |
Using spring 2.0.2 | |
Using rails-html-sanitizer 1.0.3 | |
Fetching capybara 2.14.2 | |
Installing capybara 2.14.2 | |
Using activejob 5.1.1 | |
Using activerecord 5.1.1 | |
Using spring-watcher-listen 2.0.1 | |
Using actionview 5.1.1 | |
Using actionpack 5.1.1 | |
Using actioncable 5.1.1 | |
Using actionmailer 5.1.1 | |
Using railties 5.1.1 | |
Using sprockets-rails 3.2.0 | |
Fetching coffee-rails 4.2.2 | |
Installing coffee-rails 4.2.2 | |
Using web-console 3.5.1 | |
Using rails 5.1.1 | |
Fetching sass-rails 5.0.6 | |
Installing sass-rails 5.0.6 | |
Bundle complete! 16 Gemfile dependencies, 70 gems now installed. | |
Use `bundle info [gemname]` to see where a bundled gem is installed. | |
run bundle exec spring binstub --all | |
* bin/rake: spring inserted | |
* bin/rails: spring inserted | |
Running via Spring preloader in process 6652 | |
invoke active_record | |
create db/migrate/20170612151159_create_users.rb | |
create app/models/user.rb | |
invoke test_unit | |
create test/models/user_test.rb | |
create test/fixtures/users.yml | |
== 20170612151159 CreateUsers: migrating ====================================== | |
-- create_table(:users) | |
-> 0.0013s | |
== 20170612151159 CreateUsers: migrated (0.0014s) ============================= | |
rails aborted! | |
ActiveRecord::StatementInvalid: Could not find table 'users' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:417:in `table_structure' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:166:in `columns' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/connection_adapters/schema_cache.rb:67:in `columns' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/connection_adapters/schema_cache.rb:73:in `columns_hash' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/model_schema.rb:451:in `load_schema!' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/attributes.rb:233:in `load_schema!' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/attribute_decorators.rb:50:in `load_schema!' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/model_schema.rb:446:in `load_schema' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/model_schema.rb:349:in `attribute_types' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/model_schema.rb:372:in `type_for_attribute' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/table_metadata.rb:32:in `type' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/relation/predicate_builder.rb:161:in `can_be_bound?' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/relation/predicate_builder.rb:112:in `block in create_binds_for_hash' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/relation/predicate_builder.rb:89:in `each' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/relation/predicate_builder.rb:89:in `create_binds_for_hash' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/relation/predicate_builder.rb:34:in `create_binds' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/relation/where_clause_factory.rb:21:in `build' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/relation/query_methods.rb:612:in `where!' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/relation/query_methods.rb:605:in `where' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activerecord-5.1.1/lib/active_record/querying.rb:10:in `where' | |
/Users/nj/Projects/Rails/rails-5.1.1-test/app/models/user.rb:1:in `<class:User>' | |
/Users/nj/Projects/Rails/rails-5.1.1-test/app/models/user.rb:1:in `<top (required)>' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:379:in `block in require_or_load' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:36:in `block in load_interlock' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies/interlock.rb:12:in `block in loading' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/concurrency/share_lock.rb:149:in `exclusive' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies/interlock.rb:11:in `loading' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:36:in `load_interlock' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:357:in `require_or_load' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:510:in `load_missing_constant' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:202:in `const_missing' | |
/Users/nj/Projects/Rails/rails-5.1.1-test/config/routes.rb:1:in `block in <top (required)>' | |
/usr/local/lib/ruby/gems/2.4.0/gems/actionpack-5.1.1/lib/action_dispatch/routing/route_set.rb:424:in `instance_exec' | |
/usr/local/lib/ruby/gems/2.4.0/gems/actionpack-5.1.1/lib/action_dispatch/routing/route_set.rb:424:in `eval_block' | |
/usr/local/lib/ruby/gems/2.4.0/gems/actionpack-5.1.1/lib/action_dispatch/routing/route_set.rb:406:in `draw' | |
/Users/nj/Projects/Rails/rails-5.1.1-test/config/routes.rb:1:in `<top (required)>' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:286:in `load' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:286:in `block in load' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:286:in `load' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/application/routes_reloader.rb:55:in `block in load_paths' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/application/routes_reloader.rb:55:in `each' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/application/routes_reloader.rb:55:in `load_paths' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/application/routes_reloader.rb:18:in `reload!' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/application/routes_reloader.rb:41:in `block in updater' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/file_update_checker.rb:81:in `execute' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/application/routes_reloader.rb:42:in `updater' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/application/routes_reloader.rb:31:in `execute_if_updated' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/application/finisher.rb:128:in `block in <module:Finisher>' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/initializable.rb:30:in `instance_exec' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/initializable.rb:30:in `run' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/initializable.rb:59:in `block in run_initializers' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/initializable.rb:58:in `run_initializers' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/application.rb:353:in `initialize!' | |
/Users/nj/Projects/Rails/rails-5.1.1-test/config/environment.rb:5:in `<top (required)>' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency' | |
/usr/local/lib/ruby/gems/2.4.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/application.rb:329:in `require_environment!' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/application.rb:445:in `block in run_tasks_blocks' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/commands/rake/rake_command.rb:21:in `block in perform' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/commands/rake/rake_command.rb:18:in `perform' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/command.rb:46:in `invoke' | |
/usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.1/lib/rails/commands.rb:16:in `<top (required)>' | |
/Users/nj/Projects/Rails/rails-5.1.1-test/bin/rails:9:in `require' | |
/Users/nj/Projects/Rails/rails-5.1.1-test/bin/rails:9:in `<top (required)>' | |
/usr/local/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load' | |
/usr/local/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call' | |
/usr/local/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call' | |
/usr/local/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run' | |
/usr/local/lib/ruby/gems/2.4.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>' | |
/usr/local/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load' | |
/usr/local/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>' | |
/Users/nj/Projects/Rails/rails-5.1.1-test/bin/spring:15:in `<top (required)>' | |
bin/rails:3:in `load' | |
bin/rails:3:in `<main>' | |
Tasks: TOP => db:drop => db:check_protected_environments => environment | |
(See full trace by running task with --trace) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby --version | |
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16] | |
rails --version | |
Rails 5.1.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment