RailsTutorial.org - ExecJS::RuntimeError in Users#index [英] RailsTutorial.org - ExecJS::RuntimeError in Users#index

查看:27
本文介绍了RailsTutorial.org - ExecJS::RuntimeError in Users#index的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习 Michael Hartl 的 Ruby on Rails 教程,并在第二章中设置了一个演示应用程序.我遇到了一个错误,我无法找到原因!!

I am following the Ruby on Rails tutorial by Michael Hartl and in the second chapter, a demo app is setup. I am up against an error and I am not able to find the cause!!

我确保我遵循了教程中的每个命令:

I made sure that I followed every command that was in the tutorial:

  1. 运行 rails new to demo_app 创建项目
  2. 根据需要更新了 gem 文件
  3. 执行rails 生成脚手架 用户名:string email:string
  4. 使用 bundle exec rake db:migrate
  5. 迁移数据库
  6. 启动服务器 - rails s
  7. http://localhost:3000/ 正确显示
  8. 当我尝试导航到 http://localhost:3000/users/ 时,出现此错误
  1. Ran rails new to demo_app create the project
  2. Updated the gem file as was required
  3. Executed rails generate scaffold User name:string email:string
  4. Migrated the DB using bundle exec rake db:migrate
  5. Started the server - rails s
  6. http://localhost:3000/ shows up right
  7. When I try to navigate to http://localhost:3000/users/, I am presented with this error

有人能解释一下为什么设置会起作用吗?!

Can anybody shed some light on why the setup is acting up?!

推荐答案

安装 Node.js 的步骤

steps to Install Node.js

转到 nodejs 网站 并下载安装程序

    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

这篇关于RailsTutorial.org - ExecJS::RuntimeError in Users#index的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆