Fatal exception under JRuby: uninitialized constant ActiveSupport #25

Merged
merged 1 commit into from Jun 4, 2013

Conversation

Projects
None yet
2 participants
Contributor

brandonblack commented Jun 3, 2013

The dependency chain for 3.5.0 under JRuby combined with how active support was being required and used here was causing some issues and completely breaks shoulda under JRuby 1.7.x. Simply requiring shoulda or shoulda-context on the JRuby platform results in a fatal exception.

Steps to reproduce:

rvm use jruby
gem install shoulda
ruby -e "require 'shoulda'"

Result:

NameError: uninitialized constant ActiveSupport
  const_missing at org/jruby/RubyModule.java:2631
         (root) at /Users/brandon/.rvm/gems/jruby-1.7.4@sandbox/gems/shoulda-context-1.1.2/lib/shoulda/context.rb:7
        require at org/jruby/RubyKernel.java:1054
        require at /Users/brandon/.rvm/rubies/jruby-1.7.4/lib/ruby/shared/rubygems/custom_require.rb:36
         (root) at /Users/brandon/.rvm/gems/jruby-1.7.4@sandbox/gems/shoulda-3.5.0/lib/shoulda.rb:3
        require at org/jruby/RubyKernel.java:1054
        require at /Users/brandon/.rvm/rubies/jruby-1.7.4/lib/ruby/shared/rubygems/custom_require.rb:60
         (root) at -e:1

This pull request resolves the issue and all tests pass successfully under:

  • MRI 1.9.3
  • MRI 2.0.0
  • JRuby 1.7.4
Collaborator

rmm5t commented Jun 4, 2013

(restarted the erred build)

@rmm5t rmm5t added a commit that referenced this pull request Jun 4, 2013

@rmm5t rmm5t Merge pull request #25 from brandonblack/jruby-fix
Fatal exception under JRuby: uninitialized constant ActiveSupport
bd9a63b

@rmm5t rmm5t merged commit bd9a63b into thoughtbot:master Jun 4, 2013

1 check passed

default The Travis CI build passed
Details
Collaborator

rmm5t commented Jun 4, 2013

Looks good. Thanks!

brandonblack deleted the unknown repository branch Jun 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment