解决ubuntu中新建rails程序无法打开ruby内置服务器问题!

安装好了ruby和rails的运行环境,新建了个rails程序!当在终端运行 $ rails s 时,却无法像许多教程里出现这样的内置服务器,反而提示这样的错误:

There was an error while trying to load the gem ‘uglifier’. (Bundler::GemRequireError)

如图
这里写图片描述

这里写图片描述

而无法像这样:
这里写图片描述

点击http://localhost:3000却无法打开ruby的内置服务器:
这里写图片描述

其实这个问题很简单,你只需要在终端输入

$ sudo apt-get install nodejs

猜你喜欢

转载自blog.csdn.net/qq_24805141/article/details/51319350