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

主宰稳场 提交于 2019-12-11 23:33:08

问题


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. 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?!


回答1:


steps to Install Node.js

Go to nodejs website 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


来源:https://stackoverflow.com/questions/19827958/railstutorial-org-execjsruntimeerror-in-usersindex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!