RailsTutorial.org – 用户中的ExecJS :: RuntimeError #index
我正在关注Michael Hartl的Ruby on Rails教程,在第二章中,我们设置了一个演示应用程序。 我遇到了错误,我无法找到原因!
我确保遵循教程中的每个命令:
- Ran
rails new to demo_app
创建项目 - 根据需要更新了gem文件
- 执行
rails generate scaffold User name:string email:string
- 使用
bundle exec rake db:migrate
- 启动服务器 –
rails s
-
http://localhost:3000/
显示正确 - 当我尝试导航到
http://localhost:3000/users/
,出现此错误
任何人都可以了解设置为什么会起作用?!
这个问题与这个问题重复
你会在这里找到答案ExecJS :: RuntimeError in Users#index(RoR)
安装Node.js的步骤
Go to
nodejs网站 and download the installer
Click on the downloaded file to run the install wizard. Click Next at each step to accept the defaults. Reboot your computer. Once your computer is back up, load Command Prompt with Ruby and Rails OR simple command prompt and... Type this in the terminal: node -v