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

There was an error while trying to load the gem 'uglifier' #1433

Closed
Astrades opened this issue Aug 23, 2017 · 3 comments · Fixed by #1591
Closed

There was an error while trying to load the gem 'uglifier' #1433

Astrades opened this issue Aug 23, 2017 · 3 comments · Fixed by #1591

Comments

@Astrades
Copy link

Astrades commented Aug 23, 2017

Hey guys. I am on Ubuntu 16.04 running ruby 2.4.1. I have Chrome installed at the moment, but the problem isn't browser-side.

I've gotten every gem to install and from the looks of every other issue and problem along with their fixes, mine should work now. However, whenever I try to start beef with sudo ./beef I get a long error saying that uglifier is having a problem. I have therubyracer 0.12.2 installed and everything else looks fine. What's the problem?

Obviously, I expect ruby to install the gem and allow me to run beef.

I'm not sure what you can do to re-create this. I'm on a fresh install of ubuntu and I was following the install instructions perfectly.

How can I fix this ?

@Astrades Astrades changed the title Bundle Install Error Json 1.8.6 There was an error while trying to load the gem 'uglifier' Aug 23, 2017
@Astrades
Copy link
Author

Here's the error that gets returned. I look forward to this being fixed :)

/var/lib/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:85:in rescue in block (2 levels) in require': There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError) Gem Load Error is: wrong argument type Class (expected Module) Backtrace for gem load error is: /var/lib/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:23:in include'
/var/lib/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:23:in block (2 levels) in <top (required)>' /var/lib/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:22:in class_eval'
/var/lib/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:22:in block in <top (required)>' /var/lib/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:21:in each'
/var/lib/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:21:in <top (required)>' /var/lib/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8.rb:22:in require'
/var/lib/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8.rb:22:in <top (required)>' /var/lib/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/ruby_racer_runtime.rb:108:in require'
/var/lib/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/ruby_racer_runtime.rb:108:in available?' /var/lib/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in each'
/var/lib/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in find' /var/lib/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in best_available'
/var/lib/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:57:in autodetect' /var/lib/gems/2.4.0/gems/execjs-2.7.0/lib/execjs.rb:5:in module:ExecJS'
/var/lib/gems/2.4.0/gems/execjs-2.7.0/lib/execjs.rb:4:in <top (required)>' /var/lib/gems/2.4.0/gems/uglifier-3.2.0/lib/uglifier.rb:5:in require'
/var/lib/gems/2.4.0/gems/uglifier-3.2.0/lib/uglifier.rb:5:in <top (required)>' /var/lib/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:82:in require'
/var/lib/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:82:in block (2 levels) in require' /var/lib/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:77:in each'
/var/lib/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:77:in block in require' /var/lib/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:66:in each'
/var/lib/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:66:in require' /var/lib/gems/2.4.0/gems/bundler-1.15.4/lib/bundler.rb:108:in require'
/home/hades/beef/core/loader.rb:10:in <top (required)>' /usr/local/lib/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require'
/usr/local/lib/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require' ./beef:25:in

'
Bundler Error Backtrace:
from /var/lib/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:81:in block (2 levels) in require' from /var/lib/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:77:in each'
from /var/lib/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:77:in block in require' from /var/lib/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:66:in each'
from /var/lib/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:66:in require' from /var/lib/gems/2.4.0/gems/bundler-1.15.4/lib/bundler.rb:108:in require'
from /home/hades/beef/core/loader.rb:10:in <top (required)>' from /usr/local/lib/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require'
from /usr/local/lib/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require' from ./beef:25:in '

@bcoles
Copy link
Collaborator

bcoles commented Aug 23, 2017

Make sure your BeEF is up to date. Make sure you've installed NodeJS.

You can try removing the Gemfile.lock file, then changing the version of therubyracer in Gemfile to 0.12.3, then do bundle install.

@Astrades
Copy link
Author

@bcoles thanks so much! that fixed my installation :)

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

Successfully merging a pull request may close this issue.

2 participants