lautis / uglifier

Ruby wrapper for UglifyJS JavaScript compressor.
http://www.rubydoc.info/gems/uglifier
MIT License
613 stars 82 forks source link

Uglifier doesn't load with Ruby 2.4.0 using The Ruby Racer JS runtime #105

Closed mantas closed 7 years ago

mantas commented 7 years ago

I'm getting following error when launch Rails application with Ruby 2.4.0

TypeError: wrong argument type Class (expected Module)

Running irb and then requiring Uglifier into it throws the same error as well.

fabdbt commented 7 years ago

Same for me. Backtrace first lines :


/home/fabien/.rvm/gems/ruby-2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:23:in `include'
/home/fabien/.rvm/gems/ruby-2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:23:in `block (2 levels) in <top (required)>'
/home/fabien/.rvm/gems/ruby-2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:22:in `class_eval'
/home/fabien/.rvm/gems/ruby-2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:22:in `block in <top (required)>'
/home/fabien/.rvm/gems/ruby-2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:21:in `each'
/home/fabien/.rvm/gems/ruby-2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:21:in `<top (required)>'
lautis commented 7 years ago

Thanks for the trace @Apokly. It seems that The Ruby Racer does not yet work with Ruby 2.4, but the fix is already merged: https://github.com/cowboyd/therubyracer/commit/f2ccbad7e9e3899e8743624d9b1436500100420a

ignisf commented 7 years ago

Hello,

therubyracer 0.12.3 was released to rubygems with Ruby 2.4 support. (https://github.com/cowboyd/therubyracer/issues/430)