Rails, rake does not work

后端 未结 3 1109
执念已碎
执念已碎 2021-02-04 11:43

I\'ve been trying to use Rails and when I use rake, I get this error. Any suggestions on which run time should I use?

ngzhongqin@ngzhongqin-linux:~/RailsProjects         


        
相关标签:
3条回答
  • 2021-02-04 12:05

    Add this to your Gemfile

    gem 'therubyracer', require: "v8"

    and run

    bundle install

    0 讨论(0)
  • 2021-02-04 12:15

    You need to install runtime for these.. some of the good options are

    therubyracer - Google V8 embedded within Ruby

    therubyrhino - Mozilla Rhino embedded within JRuby

    Johnson - Mozilla SpiderMonkey embedded within Ruby

    Mustang - Mustang V8 embedded within Ruby

    Node.js

    Apple JavaScriptCore - Included with Mac OS X

    Mozilla SpiderMonkey

    Microsoft Windows Script Host (JScript)

    you can find more details at https://github.com/sstephenson/execjs

    0 讨论(0)
  • 2021-02-04 12:15

    I have installed the gem therubyracer, execjs, mustang but nothing worked.

    On my linux (ubuntu) the command

    sudo apt-get install nodejs
    

    did the job finally for me.

    May be this post could also be helpful: https://github.com/intridea/rails_wizard/issues/31

    0 讨论(0)
提交回复
热议问题