Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

后端 未结 9 1406
甜味超标
甜味超标 2021-01-30 03:58

My website has been broken since Dreamhost upgraded their servers a couple of weeks ago. I have been tearing my hair out trying to get it fixed and made some progress but am stu

相关标签:
9条回答
  • 2021-01-30 04:37

    You just need to get libv8, for OS with Brew just do:

    brew install v8
    
    0 讨论(0)
  • 2021-01-30 04:38

    i use this gems on Dreamhost with Rails 3.1 for the Asset Pipeline

    group :assets do
      gem 'execjs'
      gem 'therubyracer', :platforms => :ruby
      gem 'johnson'
      gem 'sass-rails', "  ~> 3.1.0"
      gem 'coffee-rails', "~> 3.1.0"
      gem 'uglifier'
    end
    

    therubyracer as precompiler, and johnson as runtime.

    This work for me in 2 Rails 3.1 apps hosted by Dreamhost.

    0 讨论(0)
  • 2021-01-30 04:42

    I'm in dreamhost shared server.

    I installed nodejs without using root/sudo. On the server:

    #download node js (check last version from web)
    $ wget http://nodejs.org/dist/v0.8.16/node-v0.8.16-linux-x86.tar.gz
    #untar
    $ tar xzf node-v0.8.16-linux-x86.tar.gz
    

    Finnaly add its path to the deploy.rb, adding the following line (some more paths are added in this case):

    default_environment["PATH"] = ":/home/myUser/soft/node-v0.8.16-linux-x86/bin:/home/myUser/.gems/bin:/usr/lib/ruby/gems/1.8/bin/:$PATH"
    

    You are done

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