Closed jasl closed 3 months ago
BTW, this branch works for my projects, but I don't know why rake spec
has problem
/Users/jasl/.rbenv/versions/3.3.0/bin/ruby -I/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-support-3.13.1/lib:/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/lib /Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
An error occurred while loading spec_helper.
Failure/Error: require "rails/test_help"
NoMethodError:
undefined method `config' for nil
# ./spec/spec_helper.rb:4:in `<top (required)>'
No examples found.
Finished in 0.00002 seconds (files took 0.63226 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples
/Users/jasl/.rbenv/versions/3.3.0/bin/ruby -I/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-support-3.13.1/lib:/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/lib /Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
BTW, this branch works for my projects, but I don't know why
rake spec
has problem/Users/jasl/.rbenv/versions/3.3.0/bin/ruby -I/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-support-3.13.1/lib:/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/lib /Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb An error occurred while loading spec_helper. Failure/Error: require "rails/test_help" NoMethodError: undefined method `config' for nil # ./spec/spec_helper.rb:4:in `<top (required)>' No examples found. Finished in 0.00002 seconds (files took 0.63226 seconds to load) 0 examples, 0 failures, 1 error occurred outside of examples /Users/jasl/.rbenv/versions/3.3.0/bin/ruby -I/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-support-3.13.1/lib:/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/lib /Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
The error is here. In gemspec we just need version. But after this change we require the whole library. Which will cause error for the first bundle. For your case, you have install dependencies since before the code break. So you will be fine.
BTW, this branch works for my projects, but I don't know why
rake spec
has problem/Users/jasl/.rbenv/versions/3.3.0/bin/ruby -I/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-support-3.13.1/lib:/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/lib /Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb An error occurred while loading spec_helper. Failure/Error: require "rails/test_help" NoMethodError: undefined method `config' for nil # ./spec/spec_helper.rb:4:in `<top (required)>' No examples found. Finished in 0.00002 seconds (files took 0.63226 seconds to load) 0 examples, 0 failures, 1 error occurred outside of examples /Users/jasl/.rbenv/versions/3.3.0/bin/ruby -I/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-support-3.13.1/lib:/Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/lib /Users/jasl/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
The error is here. In gemspec we just need version. But after this change we require the whole library. Which will cause error for the first bundle. For your case, you have install dependencies since before the code break. So you will be fine.
I added back version.rb
, but it still got the error. My project uses Ruby 3.3 with Rails 7.1 without issues.
interesting... only Ruby 3.3 with Rails 7.1 failed
This PR mixed a few of things: