Missing dependency while running rspec with rubinius and rails v4 #858

Closed
dimaursu opened this Issue Dec 3, 2013 · 21 comments

Comments

Projects
None yet
5 participants
@dimaursu

dimaursu commented Dec 3, 2013

gem 'rubysl-test-unit' should be added to Gemfile in order for rspec to run.
The error message is very shady,

An exception occurred running at_exit handlers

no such file to load -- test/unit/assertions (LoadError)

and that's pretty much it.
I think it should probably be added as a dependency for rspec.

@JonRowe

This comment has been minimized.

Show comment
Hide comment
@JonRowe

JonRowe Dec 3, 2013

Member

Hmm, this would have to be scoped to Rubinius in the gemspec, or we could add a better description to the require failure. Why isn't the standard library installed by default on Rubinius? :/

Member

JonRowe commented Dec 3, 2013

Hmm, this would have to be scoped to Rubinius in the gemspec, or we could add a better description to the require failure. Why isn't the standard library installed by default on Rubinius? :/

@myronmarston

This comment has been minimized.

Show comment
Hide comment
@myronmarston

myronmarston Dec 3, 2013

Member

There's a whole conversation going on about this issue:

I don't want to put in rbx-specific hacks while this is being sorted out.

Member

myronmarston commented Dec 3, 2013

There's a whole conversation going on about this issue:

I don't want to put in rbx-specific hacks while this is being sorted out.

@JonRowe

This comment has been minimized.

Show comment
Hide comment
@JonRowe

JonRowe Dec 3, 2013

Member

Yep, ok, lets leave it at this for now then

Member

JonRowe commented Dec 3, 2013

Yep, ok, lets leave it at this for now then

@bf4

This comment has been minimized.

Show comment
Hide comment
@bf4

bf4 Dec 4, 2013

Contributor

FWIW, I think things have mostly settled down. Here's my summary travis-ci/travis-ci#1641 (comment)

So, maybe you're missing minitest?

Contributor

bf4 commented Dec 4, 2013

FWIW, I think things have mostly settled down. Here's my summary travis-ci/travis-ci#1641 (comment)

So, maybe you're missing minitest?

@JonRowe

This comment has been minimized.

Show comment
Hide comment
@JonRowe

JonRowe Dec 4, 2013

Member

The only time we load the specified file is on older versions of Rails which use the stdlib test unit. Minitest is a dependency of the relevant version of Rails, this is specific to Rubinius removing the stdlib from its core.

Member

JonRowe commented Dec 4, 2013

The only time we load the specified file is on older versions of Rails which use the stdlib test unit. Minitest is a dependency of the relevant version of Rails, this is specific to Rubinius removing the stdlib from its core.

@bf4

This comment has been minimized.

Show comment
Hide comment
@bf4

bf4 Dec 4, 2013

Contributor

@JonRowe Yup, also strange, Brian wrote up travis-compatibility but didn't mention rubysl issues http://rubini.us/2013/12/03/testing-with-rbx-on-travis/ (though says he will https://twitter.com/brixen/status/408084447473303552 )

Contributor

bf4 commented Dec 4, 2013

@JonRowe Yup, also strange, Brian wrote up travis-compatibility but didn't mention rubysl issues http://rubini.us/2013/12/03/testing-with-rbx-on-travis/ (though says he will https://twitter.com/brixen/status/408084447473303552 )

@dimaursu

This comment has been minimized.

Show comment
Hide comment
@dimaursu

dimaursu Dec 5, 2013

@JonRowe I required rubysl; but rspec won't work without that specific gem. Hopefully it will be fixed soon, or at least there should be a indication in the wiki (maybe rubinius wiki?).

dimaursu commented Dec 5, 2013

@JonRowe I required rubysl; but rspec won't work without that specific gem. Hopefully it will be fixed soon, or at least there should be a indication in the wiki (maybe rubinius wiki?).

@JonRowe

This comment has been minimized.

Show comment
Hide comment
@JonRowe

JonRowe Dec 5, 2013

Member

@dimaursu16 The rubysl-test-unit gem is the equivalent of part of the std library you need for Rails integration with RSpec.

Member

JonRowe commented Dec 5, 2013

@dimaursu16 The rubysl-test-unit gem is the equivalent of part of the std library you need for Rails integration with RSpec.

@bf4

This comment has been minimized.

Show comment
Hide comment
@bf4

bf4 Dec 6, 2013

Contributor

@JonRowe @dimaursu16 true on rbx with minitest 5.x rubysl/rubysl-test-unit#1 (I wrote up what I've learned)

Contributor

bf4 commented Dec 6, 2013

@JonRowe @dimaursu16 true on rbx with minitest 5.x rubysl/rubysl-test-unit#1 (I wrote up what I've learned)

@alindeman

This comment has been minimized.

Show comment
Hide comment
@alindeman

alindeman Dec 8, 2013

Contributor

Is there anything rspec-rails is supposed to be doing here?

Contributor

alindeman commented Dec 8, 2013

Is there anything rspec-rails is supposed to be doing here?

@JonRowe

This comment has been minimized.

Show comment
Hide comment
@JonRowe

JonRowe Dec 8, 2013

Member

@alindeman Not currently. As @myronmarston suggests it's worth leaving until the issue settles down on Rubinius's end.

Member

JonRowe commented Dec 8, 2013

@alindeman Not currently. As @myronmarston suggests it's worth leaving until the issue settles down on Rubinius's end.

@myronmarston

This comment has been minimized.

Show comment
Hide comment
@myronmarston

myronmarston Dec 8, 2013

Member

Yep. Until there's a way to declare rubinius-specific dependencies, there's nothing we can do here that will solve the problem without adversely affecting users of other ruby implementations (e.g. MRI and JRuby). Until this is solved, I think rubinius users need to be aware that they will need to add stdlib dependencies to their project Gemfiles (via rubysl and it's related libraries).

Member

myronmarston commented Dec 8, 2013

Yep. Until there's a way to declare rubinius-specific dependencies, there's nothing we can do here that will solve the problem without adversely affecting users of other ruby implementations (e.g. MRI and JRuby). Until this is solved, I think rubinius users need to be aware that they will need to add stdlib dependencies to their project Gemfiles (via rubysl and it's related libraries).

@bf4

This comment has been minimized.

Show comment
Hide comment
@bf4

bf4 Dec 9, 2013

Contributor
# lib/rspec-rails/patches.rb
if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
  begin
    require 'rubysl-test-unit'
   rescue LoadError
     STDERR.puts "Rubinius requires you to install the rubysl-test-unit gem"
     exit 1
   end
end

/wipes hands

Contributor

bf4 commented Dec 9, 2013

# lib/rspec-rails/patches.rb
if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
  begin
    require 'rubysl-test-unit'
   rescue LoadError
     STDERR.puts "Rubinius requires you to install the rubysl-test-unit gem"
     exit 1
   end
end

/wipes hands

@JonRowe

This comment has been minimized.

Show comment
Hide comment
@JonRowe

JonRowe Dec 9, 2013

Member

Well I'd structure it more like so: #871, but the question remains as to wether we should patch this.

Member

JonRowe commented Dec 9, 2013

Well I'd structure it more like so: #871, but the question remains as to wether we should patch this.

@alindeman

This comment has been minimized.

Show comment
Hide comment
@alindeman

alindeman Dec 22, 2013

Contributor

#871 is merged, though @JonRowe, is this appropriate to backport to 2.99 and 2.14?

Contributor

alindeman commented Dec 22, 2013

#871 is merged, though @JonRowe, is this appropriate to backport to 2.99 and 2.14?

@alindeman alindeman closed this Dec 22, 2013

@alindeman alindeman reopened this Dec 22, 2013

@alindeman

This comment has been minimized.

Show comment
Hide comment
@alindeman

alindeman Mar 22, 2014

Contributor

Appears that we've backported it to 2.14 and 2.99. 🎊

Contributor

alindeman commented Mar 22, 2014

Appears that we've backported it to 2.14 and 2.99. 🎊

@alindeman alindeman closed this Mar 22, 2014

@bf4

This comment has been minimized.

Show comment
Hide comment
@bf4

bf4 Mar 23, 2014

Contributor

Yeah, except that it should no longer be necessary. :(

Contributor

bf4 commented Mar 23, 2014

Yeah, except that it should no longer be necessary. :(

@alindeman

This comment has been minimized.

Show comment
Hide comment
@alindeman

alindeman Mar 23, 2014

Contributor

Can you bring me up to speed? I've not been following rubinius lately.

Contributor

alindeman commented Mar 23, 2014

Can you bring me up to speed? I've not been following rubinius lately.

@JonRowe

This comment has been minimized.

Show comment
Hide comment
@JonRowe

JonRowe Mar 23, 2014

Member

Yeah why is this no longer necessary @bf4?

Member

JonRowe commented Mar 23, 2014

Yeah why is this no longer necessary @bf4?

@bf4

This comment has been minimized.

Show comment
Hide comment
@bf4

bf4 Mar 23, 2014

Contributor

I updated my post recently

The Rubinius 2.2.5 release now includes the standard library, and so, you no longer need a special :rbx group, only to specify rbx-2 in your travis.yml

see https://github.com/rubinius/rubinius/releases/tag/v2.2.5

Apparently the original issue had to do without how ruby/rbx/bundler discover the load path of the standard library vs. of installed gems

Contributor

bf4 commented Mar 23, 2014

I updated my post recently

The Rubinius 2.2.5 release now includes the standard library, and so, you no longer need a special :rbx group, only to specify rbx-2 in your travis.yml

see https://github.com/rubinius/rubinius/releases/tag/v2.2.5

Apparently the original issue had to do without how ruby/rbx/bundler discover the load path of the standard library vs. of installed gems

@JonRowe

This comment has been minimized.

Show comment
Hide comment
@JonRowe

JonRowe Mar 23, 2014

Member

Actually that doesn't change anything for us, we still need to require the file manually as we can't guarantee that the file is loaded before hand, yet we still need it.

Member

JonRowe commented Mar 23, 2014

Actually that doesn't change anything for us, we still need to require the file manually as we can't guarantee that the file is loaded before hand, yet we still need it.

tute added a commit to doorkeeper-gem/doorkeeper that referenced this issue Jan 13, 2015

Enable tests with Ruby 2.2
Adds rubysl-test-unit for Rails 4. See issue:
rspec/rspec-rails#858

tute added a commit to doorkeeper-gem/doorkeeper that referenced this issue Jan 13, 2015

Enable tests with Ruby 2.2
Adds rubysl-test-unit for Rails 4. See issue:
rspec/rspec-rails#858

@tute tute referenced this issue in doorkeeper-gem/doorkeeper Jan 13, 2015

Merged

Enable tests with Ruby 2.2 #551

tute added a commit to doorkeeper-gem/doorkeeper that referenced this issue Jan 13, 2015

Enable tests with Ruby 2.2
Adds rubysl-test-unit for Rails 4. See issue:
rspec/rspec-rails#858

tute added a commit to doorkeeper-gem/doorkeeper that referenced this issue Feb 11, 2015

Enable tests with Ruby 2.2
Adds rubysl-test-unit for Rails 4. See issue:
rspec/rspec-rails#858

tute added a commit to doorkeeper-gem/doorkeeper that referenced this issue Feb 11, 2015

tute added a commit to doorkeeper-gem/doorkeeper that referenced this issue Feb 20, 2015

tute added a commit to doorkeeper-gem/doorkeeper that referenced this issue Feb 20, 2015

Enable tests with Ruby 2.2
Adds rubysl-test-unit for Rails 4. See issue:
rspec/rspec-rails#858

rubysl-test-unit avoids failures:
https://travis-ci.org/doorkeeper-gem/doorkeeper/builds/50356279

Allows failures for Rails 3.2 on Ruby 2.2, as it's not supported.

tute added a commit to doorkeeper-gem/doorkeeper that referenced this issue Feb 20, 2015

Enable tests with Ruby 2.2
Adds rubysl-test-unit for Rails 4. See issue:
rspec/rspec-rails#858

rubysl-test-unit avoids failures:
https://travis-ci.org/doorkeeper-gem/doorkeeper/builds/50356279

Allows failures for Rails 3.2 on Ruby 2.2, as it's not supported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment