Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
dimaursu opened this Issue · 21 comments

5 participants

@dimaursu

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
Owner

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
Owner

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
Owner

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

@bf4
bf4 commented

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
Owner

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
bf4 commented

@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

@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
Owner

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

@bf4
bf4 commented

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

@alindeman
Collaborator

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

@JonRowe
Owner

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

@myronmarston
Owner

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
bf4 commented
# 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
Owner

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

@alindeman
Collaborator

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

@alindeman alindeman closed this
@alindeman alindeman reopened this
@alindeman
Collaborator

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

@alindeman alindeman closed this
@bf4

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

@alindeman
Collaborator

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

@JonRowe
Owner

Yeah why is this no longer necessary @bf4?

@bf4

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
Owner

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 tute referenced this issue from a commit in doorkeeper-gem/doorkeeper
@tute tute Enable tests with Ruby 2.2
Adds rubysl-test-unit for Rails 4. See issue:
rspec/rspec-rails#858
8e73ded
@tute tute referenced this issue from a commit in doorkeeper-gem/doorkeeper
@tute tute Enable tests with Ruby 2.2
Adds rubysl-test-unit for Rails 4. See issue:
rspec/rspec-rails#858
60c5005
@tute tute referenced this issue in doorkeeper-gem/doorkeeper
Merged

Enable tests with Ruby 2.2 #551

@tute tute referenced this issue from a commit in doorkeeper-gem/doorkeeper
@tute tute Enable tests with Ruby 2.2
Adds rubysl-test-unit for Rails 4. See issue:
rspec/rspec-rails#858
79366e8
@tute tute referenced this issue from a commit in doorkeeper-gem/doorkeeper
@tute tute Enable tests with Ruby 2.2
Adds rubysl-test-unit for Rails 4. See issue:
rspec/rspec-rails#858
ae7d980
@tute tute referenced this issue from a commit in doorkeeper-gem/doorkeeper
@tute tute Enable tests with Ruby 2.2
Adds rubysl-test-unit for Rails 4. See issue:
rspec/rspec-rails#858
Avoids failures:
https://travis-ci.org/doorkeeper-gem/doorkeeper/builds/50356279
25b7f8a
@tute tute referenced this issue from a commit in doorkeeper-gem/doorkeeper
@tute tute Enable tests with Ruby 2.2
Adds rubysl-test-unit for Rails 4. See issue:
rspec/rspec-rails#858
Avoids failures:
https://travis-ci.org/doorkeeper-gem/doorkeeper/builds/50356279
186f456
@tute tute referenced this issue from a commit in doorkeeper-gem/doorkeeper
@tute tute 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.
063c103
@tute tute referenced this issue from a commit in doorkeeper-gem/doorkeeper
@tute tute 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.
56285f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.