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

undefined method `useMozillaStackStyle' #29

Closed
KaptajnKold opened this issue Feb 24, 2014 · 4 comments
Closed

undefined method `useMozillaStackStyle' #29

KaptajnKold opened this issue Feb 24, 2014 · 4 comments

Comments

@KaptajnKold
Copy link

As soon as I try to require "rhino", I get this error:

NoMethodError: undefined method `useMozillaStackStyle' for Java::OrgMozillaJavascript::RhinoException:Class
    from /Users/adam/.rvm/gems/jruby-1.7.8/gems/therubyrhino-1.73.5/lib/rhino/error.rb:71:in `JSError'
    from /Users/adam/.rvm/gems/jruby-1.7.8/gems/therubyrhino-1.73.5/lib/rhino/error.rb:3:in `Rhino'
    from /Users/adam/.rvm/gems/jruby-1.7.8/gems/therubyrhino-1.73.5/lib/rhino/error.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1084:in `require'
    from /Users/adam/.rvm/rubies/jruby-1.7.8/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1:in `(root)'
    from /Users/adam/.rvm/rubies/jruby-1.7.8/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
    from org/jruby/RubyKernel.java:1084:in `require'
    from /Users/adam/.rvm/gems/jruby-1.7.8/gems/therubyrhino-1.73.5/lib/rhino.rb:26:in `(root)'
    from /Users/adam/.rvm/rubies/jruby-1.7.8/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1123:in `eval'
    from /Users/adam/.rvm/rubies/jruby-1.7.8/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:135:in `require'
    from (irb):1:in `evaluate'
    from org/jruby/RubyKernel.java:1519:in `loop'
    from org/jruby/RubyKernel.java:1284:in `catch'
    from org/jruby/RubyKernel.java:1284:in `catch'
    from /Users/adam/.rvm/rubies/jruby-1.7.8/bin/irb:13:in `(root)'

This happens for in both version 1.73.5 and version 2.0.3 of therubyrhino. The only way to get it to work is to comment out the offending line. Any idea why this might be happening to me?

@kares
Copy link
Collaborator

kares commented Feb 24, 2014

it's very likely similar to #18 ... check your class-path for possible .jar files that contain an older version of rhino packaged.

@lolindrath
Copy link

I ran into the same issue. Both uglifier and jslint_on_rails were depending on execjs and I think somehow Rhino got pulled in twice. Once I removed jslint_on_rails it worked as expected.

My recommendation is to look at your Gemfile.lock and see who's depending on execjs and play around with removing different sets of those gems.

@kares
Copy link
Collaborator

kares commented Mar 7, 2014

@lolindrath excellent, thanks!

@kares kares closed this as completed Mar 7, 2014
@digitalextremist
Copy link

I notice this intermittently - unpredictably. One of my gems requires execjs > 0.3.0 and another doesn't specify. I am manually requiring 2.0.2 now. Has anyone determined which version is most likely to work without displaying the error shown?

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

No branches or pull requests

4 participants