LoginSignup
0
1

More than 5 years have passed since last update.

There was an error while trying to load the gem 'uglifier' と出て ruby のサーバーが起動できない件

Posted at

`rescue in block (2 levels) in require': There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.

こちらの記事で解決

・・・なんですけど、Gemfile とかいうのがどこにあるのか・・・・。
探しまわったら、Rakefile とかいうのと同じディレクトリにあるんだそうな。
場所はプロジェクトのディレクトリにありました。

そして

bundle install すると、追加のパッケージが開いて、
rails s できた!!

が、どうも外部からブラウザでアクセスできない・・・。

今度は、ポート3000番が開いてない?
すでに http や ssh は使ってるので、外部との接続やポート設定には問題はないはず。

と思ったら、こんどはこちらの記事で解決

rails s -b 0.0.0.0

としないと、ローカルホスト以外からアクセスできないのね。apache の listen とかと似てるな。

アクセスしたら、Yay! とか出てきた(笑)

毎回プチハマりになるなぁ

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1