Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uninitialized constant Minitest::Spec (NameError) in rails #28

Merged
merged 1 commit into from
Feb 15, 2015
Merged

Fix uninitialized constant Minitest::Spec (NameError) in rails #28

merged 1 commit into from
Feb 15, 2015

Conversation

hendrauzia
Copy link
Contributor

Description:

This fixes error uninitialized constant Minitest::Spec (NameError) when I use this gem in my rails app.

Stack Trace:

/Users/hendrauzia/sandbox/[redacted]/.bundle/gems/minitest-around-0.3.0/lib/minitest/around/spec.rb:6:in <top (required)>': uninitialized constant Minitest::Spec (NameError) from /Users/hendrauzia/sandbox/[redacted]/.bundle/gems/minitest-around-0.3.0/lib/minitest/around.rb:2:inrequire'
from /Users/hendrauzia/sandbox/[redacted]/.bundle/gems/minitest-around-0.3.0/lib/minitest/around.rb:2:in <top (required)>' from /Users/hendrauzia/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:85:inrequire'
from /Users/hendrauzia/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:85:in rescue in block in require' from /Users/hendrauzia/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:68:inblock in require'
from /Users/hendrauzia/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:61:in each' from /Users/hendrauzia/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:61:inrequire'
from /Users/hendrauzia/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.12/lib/bundler.rb:134:in require' from /Users/hendrauzia/sandbox/[redacted]/config/application.rb:15:in<top (required)>'
from /Users/hendrauzia/sandbox/[redacted]/.bundle/gems/spring-1.3.1/lib/spring/application.rb:82:in require' from /Users/hendrauzia/sandbox/[redacted]/.bundle/gems/spring-1.3.1/lib/spring/application.rb:82:inpreload'
from /Users/hendrauzia/sandbox/[redacted]/.bundle/gems/spring-1.3.1/lib/spring/application.rb:143:in serve' from /Users/hendrauzia/sandbox/[redacted]/.bundle/gems/spring-1.3.1/lib/spring/application.rb:131:inblock in run'
from /Users/hendrauzia/sandbox/[redacted]/.bundle/gems/spring-1.3.1/lib/spring/application.rb:125:in loop' from /Users/hendrauzia/sandbox/[redacted]/.bundle/gems/spring-1.3.1/lib/spring/application.rb:125:inrun'
from /Users/hendrauzia/sandbox/[redacted]/.bundle/gems/spring-1.3.1/lib/spring/application/boot.rb:18:in <top (required)>' from /Users/hendrauzia/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:inrequire'
from /Users/hendrauzia/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require' from -e:1:in

'

@splattael
Copy link
Owner

Hi @hendrauzia,

Looking at the stacktrace I see that you use Ruby 2.2.0 and spring.
It would be great if you could provide a way to reproduce the failure :)

Thanks!

@hendrauzia
Copy link
Contributor Author

I am able to reproduce the error with the following setup:

Environment:

  • Ruby 2.2
  • Rails 4.2
  • OSX 10.10.2

Steps to reproduce:

mkdir minitest-around-error && cd minitest-around-error
rails new . -T
echo "gem 'minitest-around'" >> Gemfile
bundle install
bundle exec rake test

Stack Trace:

rake aborted!
NameError: uninitialized constant Minitest::Spec
/Users/hendrauzia/sandbox/minitest-around-error/.bundle/gems/minitest-around-0.3.0/lib/minitest/around/spec.rb:6:in `<top (required)>'
/Users/hendrauzia/sandbox/minitest-around-error/.bundle/gems/minitest-around-0.3.0/lib/minitest/around.rb:2:in `require'
/Users/hendrauzia/sandbox/minitest-around-error/.bundle/gems/minitest-around-0.3.0/lib/minitest/around.rb:2:in `<top (required)>'
/Users/hendrauzia/sandbox/minitest-around-error/config/application.rb:15:in `<top (required)>'
/Users/hendrauzia/sandbox/minitest-around-error/Rakefile:4:in `require'
/Users/hendrauzia/sandbox/minitest-around-error/Rakefile:4:in `<top (required)>'
LoadError: cannot load such file -- minitest-around
/Users/hendrauzia/sandbox/minitest-around-error/config/application.rb:15:in `<top (required)>'
/Users/hendrauzia/sandbox/minitest-around-error/Rakefile:4:in `require'
/Users/hendrauzia/sandbox/minitest-around-error/Rakefile:4:in `<top (required)>'

splattael added a commit that referenced this pull request Feb 15, 2015
Fix uninitialized constant Minitest::Spec (NameError) in rails
@splattael splattael merged commit b183c16 into splattael:master Feb 15, 2015
@splattael
Copy link
Owner

@hendrauzia Thank you for the repro and your PR! I've merged it 👍

Do you mind testing latest release v0.3.1 and give feedback? 💚

@hendrauzia
Copy link
Contributor Author

Sure, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants