need help setting up ruby on rails javascript runtime environment

前端 未结 6 2362
一向
一向 2021-02-14 11:14

I\'m having trouble setting up ruby on rails on my machine. I\'ve been following the book \"Agile Web Development with Rails\" and up until now everything has been going fine.<

相关标签:
6条回答
  • 2021-02-14 11:49

    I think you need a runtime like rubyracer. Try

    sudo gem install therubyracer
    
    0 讨论(0)
  • 2021-02-14 11:51

    If you will add therubyracer gem , may be your problem woould be solved

    Code

    gem 'therubyracer'
    gem 'execjs'
    

    then just do a bundle install

    0 讨论(0)
  • 2021-02-14 12:09

    Your Gemfile should contain BOTH of the following lines:

    gem 'execjs'
    gem 'therubyracer'
    

    Then run bundle install and try again.

    0 讨论(0)
  • 2021-02-14 12:11

    Try this:

    $ sudo apt-get install nodejs
    
    0 讨论(0)
  • 2021-02-14 12:13

    I'd installed Node.js before Rails. Now its using Node.js as the javascript runtime by itself.

    JavaScript Runtime  Node.js (V8)
    
    0 讨论(0)
  • 2021-02-14 12:14

    If you're using Pacman packet manager you should use:

    # pacman -S nodejs 
    

    or

    $ sudo pacman -S nodejs
    
    0 讨论(0)
提交回复
热议问题