Can't install therubyracer, error

后端 未结 1 1847
余生分开走
余生分开走 2021-01-23 18:27

I am trying to instal therubyracer/ therubyracer-heroku to my app, cause it doesn\'t work in heroku server cause I don\'t have javascript runtime enviroment.
When I am tryin

1条回答
  •  孤独总比滥情好
    2021-01-23 19:05

    As far as I know, therubyracer(-heroku) simply does not work on Windows. But Windows has its own JavaScript engine, which execjs should be able to locate. So that should work for your development on Windows.

    For serving the app on Heroku, you can add the therubyracer-heroku gem as following:

    gem 'therubyracer-heroku', '~> 0.8.1.pre3', :platform => :ruby
    

    :platform => :ruby will use it on C Ruby (MRI) or Rubinius but not Windows.

    Also, see Heroku's docs for the Cedar Stack;

    If you were previously using therubyracer or therubyracer-heroku, these gems are no longer required and strongly discouraged as these gems use a very large amount of memory.

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