Rake Aborted, Error While Trying to Load the Gem 'Uglifier'

Rake aborted, Error while trying to load the gem 'uglifier'

install nodejs

apt-get install nodejs

There was an error while trying to load the gem 'uglifier'. - Wercker

As the comments on the question suggest, you need to install a javascript runtime.

You have a few options:

  1. add gem 'therubyracer' to your Gemfile.
  2. Install nodejs via apt-get, brew, etc.

I'd go for option 2 as to not unnecessarily add gems to your project.

First rails install: Rake aborted no javascript runtime

Try fix it:

/usr/local/lib/ruby/gems/ruby_ver/gems/execjs-ver/lib/execjs/runtimes.rb

Node = ExternalRuntime.new(
:name => "Node.js (V8)",
:command => ["nodejs", "/usr/local/bin/node"],
:runner_path => ExecJS.root + "/support/node_runner.js",
:encoding => 'UTF-8'
)

In Rubymine, Rails fails to load 'uglifier' gem

I finally got it working, here's the context and solution if someone else has the same issue.

I have defined a user scoped Path variable which was refering to my system Path as :

%Path%;C:\tools\…

In RedMine, this %Path% was not interpreted anymore (don't know why). I saw it by typing in RubyMine Terminal :

echo %Path%

The result was displaying "%Path%", not its content.

I solved the problem by simply rebooting the computer.

Error in rake db:create in new rails project

I simply reinstalled ruby+rails and things were alright.

I deleted the ~/.rbenv folder and ran sudo apt-get purge ruby

Then installed ruby and rails using Official Page.

Importantly, once I created a new project I was prompted to install another gem to resolve some dependency gem install rdoc-data

rake aborted! cannot load such file -- ap

This line in the Gemfile seems strange to me

gem "awesome_print", require:"ap"

Can you remove the require: "ap" and check if it works then?



Related Topics



Leave a reply



Submit