68

Starting a new app, when I create a controller page home and try to go to local host:3000/pages/home, I get the following error:

Showing c:/Users/Doesha/desktop/pinplug/app/views/layouts/application.html.erb where line #6 raised:

TypeError: Object doesn't support this property or method
  (in c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/turbolinks-2.5.3/lib/assets/javascripts/turbolinks.js.coffee)

application.html.erb file:

<!DOCTYPE html>
<html>
<head>
  <title>Pinplug</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
</head>
<body>

<%= yield %>

</body>
</html>

application_controller.rb file:

class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception
end

pages_controller.rb file:

class PagesController < ApplicationController
  def home
  end
end

routes.rb file:

Rails.application.routes.draw do
  get 'pages/home'

  # The priority is based upon order of creation: first created -> highest priority.
  # See how all your routes lay out with "rake routes".

  # You can have the root of your site routed with "root"
  # root 'welcome#index'

  # Example of regular route:
  #   get 'products/:id' => 'catalog#view'

  # Example of named route that can be invoked with purchase_url(id: product.id)
  #   get 'products/:id/purchase' => 'catalog#purchase', as: :purchase

  # Example resource route (maps HTTP verbs to controller actions automatically):
  #   resources :products

  # Example resource route with options:
  #   resources :products do
  #     member do
  #       get 'short'
  #       post 'toggle'
  #     end
  #
  #     collection do
  #       get 'sold'
  #     end
  #   end

  # Example resource route with sub-resources:
  #   resources :products do
  #     resources :comments, :sales
  #     resource :seller
  #   end

  # Example resource route with more complex sub-resources:
  #   resources :products do
  #     resources :comments
  #     resources :sales do
  #       get 'recent', on: :collection
  #     end
  #   end

  # Example resource route with concerns:
  #   concern :toggleable do
  #     post 'toggle'
  #   end
  #   resources :posts, concerns: :toggleable
  #   resources :photos, concerns: :toggleable

  # Example resource route within a namespace:
  #   namespace :admin do
  #     # Directs /admin/products/* to Admin::ProductsController
  #     # (app/controllers/admin/products_controller.rb)
  #     resources :products
  #   end
end

gemfile:

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

gem 'execjs', '~> 2.2.2'

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'

  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gemfile.lock file:

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.2.0)
      actionpack (= 4.2.0)
      actionview (= 4.2.0)
      activejob (= 4.2.0)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 1.0, >= 1.0.5)
    actionpack (4.2.0)
      actionview (= 4.2.0)
      activesupport (= 4.2.0)
      rack (~> 1.6.0)
      rack-test (~> 0.6.2)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.1)
    actionview (4.2.0)
      activesupport (= 4.2.0)
      builder (~> 3.1)
      erubis (~> 2.7.0)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.1)
    activejob (4.2.0)
      activesupport (= 4.2.0)
      globalid (>= 0.3.0)
    activemodel (4.2.0)
      activesupport (= 4.2.0)
      builder (~> 3.1)
    activerecord (4.2.0)
      activemodel (= 4.2.0)
      activesupport (= 4.2.0)
      arel (~> 6.0)
    activesupport (4.2.0)
      i18n (~> 0.7)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
    arel (6.0.0)
    binding_of_caller (0.7.2)
      debug_inspector (>= 0.0.1)
    builder (3.2.2)
    byebug (3.5.1)
      columnize (~> 0.8)
      debugger-linecache (~> 1.2)
      slop (~> 3.6)
    coffee-rails (4.1.0)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.0)
    coffee-script (2.3.0)
      coffee-script-source
      execjs
    coffee-script-source (1.9.0)
    columnize (0.9.0)
    debug_inspector (0.0.2)
    debugger-linecache (1.2.0)
    erubis (2.7.0)
    execjs (2.2.2)
    globalid (0.3.2)
      activesupport (>= 4.1.0)
    hike (1.2.3)
    i18n (0.7.0)
    jbuilder (2.2.6)
      activesupport (>= 3.0.0, < 5)
      multi_json (~> 1.2)
    jquery-rails (4.0.3)
      rails-dom-testing (~> 1.0)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    json (1.8.2)
    loofah (2.0.1)
      nokogiri (>= 1.5.9)
    mail (2.6.3)
      mime-types (>= 1.16, < 3)
    mime-types (2.4.3)
    mini_portile (0.6.2)
    minitest (5.5.1)
    multi_json (1.10.1)
    nokogiri (1.6.6.2-x86-mingw32)
      mini_portile (~> 0.6.0)
    rack (1.6.0)
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (4.2.0)
      actionmailer (= 4.2.0)
      actionpack (= 4.2.0)
      actionview (= 4.2.0)
      activejob (= 4.2.0)
      activemodel (= 4.2.0)
      activerecord (= 4.2.0)
      activesupport (= 4.2.0)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.2.0)
      sprockets-rails
    rails-deprecated_sanitizer (1.0.3)
      activesupport (>= 4.2.0.alpha)
    rails-dom-testing (1.0.5)
      activesupport (>= 4.2.0.beta, < 5.0)
      nokogiri (~> 1.6.0)
      rails-deprecated_sanitizer (>= 1.0.1)
    rails-html-sanitizer (1.0.1)
      loofah (~> 2.0)
    railties (4.2.0)
      actionpack (= 4.2.0)
      activesupport (= 4.2.0)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (10.4.2)
    rdoc (4.2.0)
      json (~> 1.4)
    sass (3.4.11)
    sass-rails (5.0.1)
      railties (>= 4.0.0, < 5.0)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (~> 1.1)
    sdoc (0.4.1)
      json (~> 1.7, >= 1.7.7)
      rdoc (~> 4.0)
    slop (3.6.0)
    sprockets (2.12.3)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sprockets-rails (2.2.4)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (>= 2.8, < 4.0)
    sqlite3 (1.3.10-x86-mingw32)
    thor (0.19.1)
    thread_safe (0.3.4)
    tilt (1.4.1)
    turbolinks (2.5.3)
      coffee-rails
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    tzinfo-data (1.2015.1)
      tzinfo (>= 1.0.0)
    uglifier (2.7.0)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    web-console (2.0.0)
      activemodel (~> 4.0)
      binding_of_caller (>= 0.7.2)
      railties (~> 4.0)
      sprockets-rails (>= 2.0, < 4.0)

PLATFORMS
  x86-mingw32

DEPENDENCIES
  byebug
  coffee-rails (~> 4.1.0)
  execjs (~> 2.2.2)
  jbuilder (~> 2.0)
  jquery-rails
  rails (= 4.2.0)
  sass-rails (~> 5.0)
  sdoc (~> 0.4.0)
  sqlite3
  turbolinks
  tzinfo-data
  uglifier (>= 1.3.0)
  web-console (~> 2.0)

application.rb file:

require File.expand_path('../boot', __FILE__)

require 'rails/all'

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module Pinplug
  class Application < Rails::Application
    # Settings in config/environments/* take precedence over those specified here.
    # Application configuration should go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded.

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
    # config.time_zone = 'Central Time (US & Canada)'

    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
    # config.i18n.default_locale = :de

    # Do not swallow errors in after_commit/after_rollback callbacks.
    config.active_record.raise_in_transactional_callbacks = true
  end
end

I also downgraded the turbolinks gem from 2.3.0 to 2.2.2, thinking that the newer version of the turbolinks gem was causing my app to have errors; obviously that didn't work for me.

Any suggestions on what could be going wrong with my app?

AB10
  • 1,003
  • 2
  • 14
  • 19
  • possible duplicate of [Rails-4, ExecJS::ProgramError in Pages#welcome](http://stackoverflow.com/questions/28241981/rails-4-execjsprogramerror-in-pageswelcome) – Michael Petch Mar 17 '15 at 00:11
  • In Rails 5 it is still a bug – Arthur Sep 28 '16 at 01:59
  • More steps would be required. A person more familiar with RoR fixed it for me: also need to rename files as follows application.css.scss becomes ./app/assets/stylesheets/default.css.scss and application.js -> ./app/assets/javascripts/default.js. Then I needed to install Node.js. Finally the last tweak was to amend assets.rb line #Rails.application.config.assets.precompile += %w( search.js ) with Rails.application.config.assets.precompile += %w( default.js default.css.scss ) Please note the line was commented with # that needs to be removed. Happy RoRing on Windows – Arthur Sep 29 '16 at 01:45

18 Answers18

141

In your /app/views/layouts/application.html.erb lines 5 and 6, change the first parameter from application to default.

I met the same problem, too for my situation, I don't know why, but it only happens on Windows. The parameter application works on the web server.

Sonu
  • 23
  • 7
FlyC
  • 1,844
  • 1
  • 15
  • 18
  • Thanks @felipe.zkn, I've been trying to figure this thing out for a while. I'll have to remember that rule!! – AB10 Feb 15 '15 at 13:42
  • @AB10 I just editted the answer. Please, notify the answerer. – felipe.zkn Feb 16 '15 at 01:52
  • 1
    Huh! Same thing for me after I upgraded from Rails 4.1.1 to 4.2 on Windows. Thanks for the answer. Nothing in the upgrade docs about this at all! #@^$@# So how did you figure this out? – MSC Feb 22 '15 at 05:55
  • 58
    `coffee-script source` >= `1.9.0` don't work properly under Windows. You can do this: `gem 'coffee-script-source', '1.8.0'` to force `1.8.0` and then issue `bundle update coffee-script-source` – Michael Petch Mar 17 '15 at 00:07
  • 2
    Thanks @MichaelPetch, your comment is the thing that worked for me! – armstrhb May 15 '15 at 02:36
  • 1
    @armstrhb I believe that my comment is probably the proper answer to this question (and the root cause of the problems). I should consider adding it as an actual answer to this question – Michael Petch May 17 '15 at 18:35
  • it works on mine also but if we try to look at the console default.js is 404 already – jameshwart lopez Jun 24 '15 at 10:23
  • 10
    Changing 'application' to 'default' won't solve the problem, if you check dev tools you'll see assets are not included due to 404. Downgrading coffe-script-source is the correct answer. – e-fisher Feb 18 '16 at 14:31
  • 2
    I agree with @excel66 - That's right, I can't believe people actually doing that or making this answer as a positive one, that's really not the solution because let's say you have CSS file on this folder \assets\stylesheets it won't load it, – user4571629 Mar 02 '16 at 03:15
  • I am on Windows 10 and I agree with e-fisher (above). Changing 'application' to 'default' merely prevented the app from finding the appropriate JS and CSS files. To get the app to find and execute application.js without error, I needed to downgrade coffee-script-source. – MSC Jun 21 '16 at 11:43
  • 1
    Over a year later now Rails 5.0.0.1 and the same bug. Looks like nobody cares about Windows, it is like a tax, if you chose Windows and develop in Ruby on Rails then you waste time. But seriously, this nuance has to be fixed please. – Arthur Sep 04 '16 at 01:07
  • By the way as a result of this seemingly benign change other parts break as for example integration with Bootstrap. Fixable, but requires to hop through the loops. – Arthur Sep 29 '16 at 14:26
  • 1
    This isn't the solution! The solution is: add in Gemfile gem 'coffee-script-source', '1.8.0' and run bundle update coffee-script-source – Angelo Dec 04 '16 at 18:51
  • Angelo's solution worked for me (I'm using Rails 4 on Windows 10 x64). Nothing else worked for me, but downgrading to coffee-script-source 1.8.0 did the trick. Thanks, Angelo! P.S. I really wish the Rails devs would fix this, Windows gets no love. :( – dbeachy1 Mar 17 '17 at 23:06
59

If you are running in WIndows, the coffee-script-source 1.9.0 does not work on windows.

Change it to a previous version adding this line to your Gemfile:

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

And then reinstall the bundle adjusting the dependencies for the new Gem version with:

bundle update coffee-script-source
evedovelli
  • 2,115
  • 28
  • 28
24

I've been having this issue for a while and having gone through all the answers in this thread and found them all to be unsuccessful, I've decided to add my solution in hopes that it helps future Rails users.

I've done everything in this thread - changing application to default allows it to go through without an error, but then once you actually try to use any JavaScript, an error is displayed regarding not being able to find default.js. I've installed NodeJS and put it in my Ruby/bin folder. That did nothing, so I removed it.

You can indeed temporarily get around this problem with the "switching out application with default" solution, but it's extremely short term. This solution may work for you if you have no intention of styling or adding JavaScript to your app through the Rails asset pipeline. I have not tested this myself, but I imagine including JavaScript and stylesheets in the application.html header file may work. But then you lose the magic of Rails.

I have had this issue on Windows 8, Windows 10, and Ubuntu platforms.

The only thing that solves it, for me, and still renders the JavaScript and stylesheets is to first change application to application.css for the stylesheets (even if you're using Sass/SCSS, because it still compiles down into css) and application.js for the JavaScript link. Once that is done, go into your /assets/javascripts/application.js file and delete the // in front of //= require turbolinks.

And now your application should work just fine.

This is probably a deeper issue with turbolinks, but this is a quick workaround that hasn't let me down yet.

MK McKenzie
  • 353
  • 3
  • 7
  • 1
    this solution worked for me on windows 10, and allowed ruby to see the other style sheets I had in the "pipeline". changing 'application' to 'default' - indeed breaks the stylesheets. perhaps it is just a coffescript error at the cause - but this solution worked great. – illiquent Jun 10 '16 at 00:42
  • 1
    wow; I'd give you +150 if I could. thank you so much. this worked on win 7 x64 – Sassy Llama Nov 30 '16 at 21:06
  • I had the same issue, and changing "application" to "default" threw the exception that "application.css" couldn't be found. but, this solution did work for me. thanks! – Chait Sep 21 '19 at 15:31
20

in windows coffee-script source >= 1.9.0 not work properly. just add in Gemfile

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

and run

bundle update coffee-script-source
Thorin
  • 2,004
  • 1
  • 19
  • 30
7

Just install NodeJS on your local machine (make sure the correspodning entry is added to the PATH) and add

gem 'execjs'

into the Gemfile.

  • I had not realized that NodeJS wasn't installed on my machine. I found this video which basically solves it the same way https://www.youtube.com/watch?reload=9&v=l04kFL3pnEk and speaks to installing NodeJS on a windows machine. – Forrest Jun 05 '18 at 02:00
5

On windows 10 version 1511, adding gem 'coffee-script-source', '1.8.0' to my gemfile and then ruby bin\bundle update coffee-script-source from the project directory worked. NB: the previous coffee-script-source version that got replaced was 1.10.0

Paul Leach
  • 51
  • 1
  • 1
5

(On Windows 8)

  1. Install Node.js!
  2. Add it to the PATH (ENV_VAR)
  3. restart the server
adhix11
  • 171
  • 2
  • 4
  • 2
    What makes you think this is a better solution than the year-old **accepted** answer? – TylerH Mar 07 '16 at 15:56
  • 2
    I think this is a better solution because changing "application" to "default" in the /layouts/application.html.erb can cause CSS and JS files throw a 404. Installing Node.js doesn't require you to make changes in your code that either produces undesired results (scripts and stylesheets not loading), or causes you to have to make widespread changes in code when moving to production. – Jonathan Harvey Jun 09 '16 at 19:38
  • 1
    Works on *Windows 10* too. Tested – Rafaf Tahsin Aug 02 '18 at 06:44
3

I had this issue too. I went into Sublime into my project folder. Then clicked the app folders, view folder, layout, clicked application.html.erb and changed lines 5 and 6 'application' to 'default'. Worked great. Thanks for posting your problem and thank you to those that answered!

I just wanted to add I went in through Sublime. I am just learning and I didn't understand how to access the .erb file. Just wanted to help others.

dmers
  • 31
  • 2
1

I just changed the 'application' to 'default' on lines 5 and 6, and resolved. /app/views/layouts/application.html.erb.

FROM:

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

TO:

<%= stylesheet_link_tag    '**default**', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag '**default**', 'data-turbolinks-track' => true %>
Mogsdad
  • 44,709
  • 21
  • 151
  • 275
1

Finally got it working what a sigh of relief. Even though I am not exactly sure what made it work. Tried all of the following. 1) Installed node.js , added coffescript npm to it, and restarted. 2) Added gem for exec.js and modified runtime.rb so that it is not able to use default windows script file. Refer to this link on how to do this: [https://github.com/sstephenson/execjs/issues/81][1] 3) To be safe, also added rubyracer gem gem 'therubyracer', platforms: :ruby

In summary added two scripting engines , nodejs and rubyracer and added execjs so that it chooses the best scripting engine , but is not able to choose windows scrpting engine.

I guess just installing nodejs alone might have worked after adding execjs. However I did not restart(post nodejs installation) and tried all the other things.

Rpant
  • 974
  • 2
  • 14
  • 37
1

I tried all of the solutions above, and the only one that worked properly was to install node.js, add the directory to the 'path' environment variable in windows (found in Advanced System Settings, Envirnment Variables, path) and then restart the computer and server. I think the later versions of coffee-script-source must be dependent on node.js, along with other gems. I had the identical error without using coffee-script-source.

Changing 'application' to 'default' is a terrible solution though, because it just removes all of the application's css styling. I do not recommend it at all.

Graeme Campbell
  • 364
  • 2
  • 4
  • 1
    this is working for me....for my case, node is already installed, but it doesn't include in ENVIRONMENT PATH VARIABLE....so i just add it to path variable....that's it – Syamsoul Azrien Feb 21 '19 at 10:07
1

Its problem with turbolinks gem so its creating error

So in app\views\layouts\application.html.erb change this

<%= stylesheet_link_tag    'application.css', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application.js', 'data-turbolinks-track': 'reload' %>

from

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

and uncomment the line no.15 in app\assets\javascripts\application.js

require turbolinks

and copy it into app\assets\stylesheets\application.css at the end of file

From this your css and js will be run

Arpit bandil
  • 204
  • 2
  • 9
1

I am on Rails 5.1.6. I had the same issue. As recommended above I degraded the coffee-script-source gem which solved the issue.

# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2' # <-- This existed already
gem 'coffee-script-source', '1.8.0' # <-- Adding this line solved the problem

Note: I didn't modify application.html.rb file

Kaz
  • 181
  • 2
  • 12
0

we should only change line 6 from application to default in /app/views/layouts/application.html.erb . changing line 5 will result in stylesheets not loading.

BENS
  • 185
  • 2
  • 7
0

You need to read the instruction in the rails page. You need ExecJS gem and some JS runtime.

More practical: 1.- Install some Runtime JS, for example node.js

2.- get ExecJS gem-> gem install execjs

Explication:

From the rails page:

"Compiling CoffeeScript and JavaScript asset compression requires you have a JavaScript runtime available on your system, in the absence of a runtime you will see an execjs error during asset compilation. Usually Mac OS X and Windows come with a JavaScript runtime installed. Rails adds the therubyracer gem to the generated Gemfile in a commented line for new apps and you can uncomment if you need it. therubyrhino is the recommended runtime for JRuby users and is added by default to the Gemfile in apps generated under JRuby. You can investigate all the supported runtimes at ExecJS."

From hte gitHub of ExecJS:

"ExecJS lets you run JavaScript code from Ruby. It automatically picks the best runtime available to evaluate your JavaScript program, then returns the result to you as a Ruby object.

ExecJS supports these runtimes:

therubyracer - Google V8 embedded within Ruby
therubyrhino - Mozilla Rhino embedded within JRuby
Duktape.rb - Duktape JavaScript interpreter
Node.js
Apple JavaScriptCore - Included with Mac OS X
Microsoft Windows Script Host (JScript)
Google V8
mini_racer - Google V8 embedded within Ruby" 

ExecJS Readme GitHub

Mauro
  • 93
  • 8
0

On Windwos 10

Just install node.js and make sure node executable is in path variable.

Rafaf Tahsin
  • 7,652
  • 4
  • 28
  • 45
0

(On Windows 10 - Rails 4.2.5): I solved by doing this:

1) Install nodes.js

2) Install the coffe-script-source gem

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

3) Add this line in "config\initializers\assets.rb"

Rails.application.config.assets.precompile + =% w (application.css)
Isa Souza
  • 1,621
  • 1
  • 12
  • 12
0

For Windows Users You can setup execjs runtime path to Node

config/boot.rb

ENV['EXECJS_RUNTIME'] = 'Node'
X zheng
  • 1,731
  • 1
  • 17
  • 25