Help us understand the problem. What is going on with this article?

There was an error while trying to load the gem 'uglifier'. rails でこんなこと言われたら

More than 3 years have passed since last update.
Bundler::GemRequireError: There was an error while trying to load the gem 'uglifier'.
Gem Load Error is: Could not find a JavaScript runtime. See for a list of available runtimes.
Backtrace for gem load error is:
/home/usr/vendor/bundle/ruby/2.5.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'

単純にGemfileの↓のコメントアウトを消してbundle installすると治ります

#gem 'therubyracer', platforms: :ruby

どうやらJavaScript のライブラリを、Rubyで使えるようにしたGemっぽいです。


Rubyを書いてます。 最近はAWSでAPI立てて、適当にクライアント作って遊んでます。
日本最大級の不動産・住宅情報サイト「LIFULL HOME'S」を始め、人々の生活に寄り添う様々な情報サービス事業を展開しています。
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away