Rails-4, ExecJS::ProgramError in Pages#welcome

后端 未结 8 1782
臣服心动
臣服心动 2020-11-27 22:06

I am trying to add login-logout functionality to my rails app. For that I added bcrypt gem for password encryption and also access controller. Now when I run it

相关标签:
8条回答
  • 2020-11-27 22:12

    Install node.js x86 version (Not x64 version even if have 64-bit computer) You can download it from https://nodejs.org/en/download/

    All the other answers are not neccesary.

    • No need for "coffee-script-source" or "execjs"
    • No need to modify even execjs files
    • No need to add path for Node.js as x86 adds it automatically

    After installing node.js, you need to restart the rails server AND the CMD shell where it is running, to update the path it will see.

    0 讨论(0)
  • 2020-11-27 22:14

    Just commenting this line in the above code segment solved my problem.

    <%=j avascript_include_tag 'application', 'data-turbolinks-track'=>true %> 
    

    Not sure if this is a preferred solution but certainly helped me move forward.

    0 讨论(0)
  • 2020-11-27 22:15

    @Chuchoo, commenting the <%=javascript_include_tag 'application', 'data-turbolinks-track'=>true %> solves the issue.

    For the many newbies out there, more details on how to get to the solution.

    Go to your app directory and access the application.html.erb file from your_app>app>views>layouts>application.html.erb and comment the javascript on line 6.

    <!--%= javascript_include_tag 'application', 'data-turbolinks-track' => true %-->
    

    Refresh your page and you are good to go.

    0 讨论(0)
  • 2020-11-27 22:15

    uncomment (app/assets/javascripts/application.js)

    //=  require jquery
    //=  require jquery_ujs
    //=  require turbolinks
    //=  require_tree .
    
    0 讨论(0)
  • 2020-11-27 22:18

    Go to your app directory and then open application.html.erb file inside app/views/layouts and comment these two lines (5th and 6th)like this:

     <!-- %= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
    %= javascript_include_tag 'application', 'data-turbolinks-track' => true %> -->
    

    refresh your webpage ,and Your problem is solved!

    0 讨论(0)
  • 2020-11-27 22:22

    There is a problem with coffee-script-source 1.9.0 running on windows.

    It seems you have to add this to your gemfile:

    gem 'coffee-script-source', '1.8.0'
    

    then do

    bundle update coffee-script-source
    
    0 讨论(0)
提交回复
热议问题