rails: test_restart_rails_server_with_custom_pid_file_path fails
Steps to reproduce
$ cd rails/railties
$ bundle install
$ bundle exec ruby -w -Ilib:lib:test test/application/server_test.rb
or
$ bin/test test/application/server_test.rb
Expected behavior
It should pass.
Actual behavior
$ bundle exec ruby -w -Ilib:lib:test test/application/server_test.rb
Run options: --seed 51648
# Running:
.F
Failure:
ApplicationTests::ServerTest#test_restart_rails_server_with_custom_pid_file_path [test/application/server_test.rb:48]:
"Inherited" expected, but got:
...
/home/yahonda/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- rails/all (LoadError)
from /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /tmp/d20171206-22731-w0cvlw/app/config/boot.rb:1:in `<top (required)>'
from bin/rails:3:in `require_relative'
from bin/rails:3:in `<main>'
.
Expected "...\r\n/home/yahonda/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- rails/all (LoadError)\r\n\tfrom /home/yahonda/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:59:in `require'\r\n\tfrom /tmp/d20171206-22731-w0cvlw/app/config/boot.rb:1:in `<top (required)>'\r\n\tfrom bin/rails:3:in `require_relative'\r\n\tfrom bin/rails:3:in `<main>'\r\n" to include "Inherited".
bin/rails test test/application/server_test.rb:35
Finished in 14.508692s, 0.1378 runs/s, 0.5514 assertions/s.
2 runs, 8 assertions, 1 failures, 0 errors, 0 skips
$
System configuration
Rails version:master branch
Ruby version:ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 20 (20 by maintainers)
Commits related to this issue
- Install bundler 1.15.4 to see if https://github.com/rails/rails/issues/31351 reproduces — committed to yahonda/rails-dev-box by yahonda 7 years ago
@yahonda Thanks for your confirmation. I committed. 91a4a820feeb878dd1b388befa56dd469933d17c
I think I have found minimum steps to reproduce and minimum steps NOT to reproduce.
The key thing is
test/generators/app_generator_test.rb
needs executed beforetest/application/server_test.rb
. It looks liketest/generators/app_generator_test.rb
installrailties
toGEM PATH
Minimum steps to reproduce:
Minimum steps NOT to reproduce:
Actual result
GEM PATHS:
railties
in the first GEM PATH yet.test/application/server_test.rb
and it failstest/generators/app_generator_test.rb
which installs railties to GEM PATH.test/application/server_test.rb
and it finishes successfully