0

In my application.html.haml I have = javascript_include_tag 'application', 'data-turbolinks-track' => true

Which is throwing the error: TypeError: Object doesn't support this property or method (in C:/Ruby193/lib/ruby/gems/1.9.1/gems/turbolinks-2.5.1/lib/assets/javascripts/turbolinks.js.coffee)

My app/assets/javascripts/application.js is:

//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require jquery.tablesorter
//= require_tree .

and my gemfile includes:

gem 'jquery-rails'
gem 'turbolinks'

Can anyone tell me what's going wrong? Thanks.

digitig
  • 1,989
  • 3
  • 25
  • 45

3 Answers3

0

While not positive if this will work for you I just dealt with a similar issue. Specifically for setting the application.html.erb javascript_include_tag to 'application'

What I read was that in newer versions of rails that include coffee-script-source that is a version greater than 1.8.0 it causes issues on Windows systems. The solution is to downgrade to 1.8.0.

Source: Rails ExecJS::ProgramError in Pages#home?

Credit to Michael Petch in the above link.

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 at 0:07

Community
  • 1
  • 1
0

Above solution by jordan fits perfectly..another solution is change your line to:
javascript_include_tag 'default', 'data-turbolinks-track' => true

Mayuresh Srivastava
  • 1,332
  • 17
  • 24
0

Its very easy.

Do not change application for default.

Do not move gems trying install coffee-script-source or 'execjs'

Just Install node.js and

remove the line(assets/javascript/application.js):

//= require_tree .

restart rails and reload the page.

Go!.

Divyang Desai
  • 7,483
  • 13
  • 50
  • 76
uomo_perfetto
  • 2,364
  • 1
  • 12
  • 7