5

I get the following error:

ExecJS::RuntimeError in Devise::Sessions#new

Showing C:/Users/me/RubymineProjects/my_project/app/views/layouts/application.html.erb where line #6 raised:

  (in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/turbolinks-1.1.1/lib/assets/javascripts/turbolinks.js.coffee)
Extracted source (around line #6):
3  <head>
4    <title>HourlyTracker</title>
5    <%= stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true %>
6    <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7    <%= csrf_meta_tags %>
8  </head>
9  <body>

I'm using the 3.0.0rc version of Devise, which is supposed to work with Ruby 2.0 and Rails 4.0rc1. I'm on Windows x64.

at.
  • 50,922
  • 104
  • 292
  • 461
  • You might be missing `therubyracer` gem; see http://stackoverflow.com/a/8882423/429758 – Prakash Murthy May 23 '13 at 08:24
  • I believe that your issue could be possibly something to do with `data-turbolinks-track` I had a conflicting issue with turbolinks in my application. Once I had removed it from my application everything was fine – Deej May 23 '13 at 08:31
  • @PrakashMurthy - I read that too about therubyracer. Unfortunately I can't get therubyracer to install on Windows :(. Well, more specifically, libv8, which therubyracer depends on, doesn't work with Windows. – at. May 23 '13 at 08:45
  • @at you could try and look at the following link - http://stackoverflow.com/questions/6356450/therubyracer-gem-on-windows some of these answers may just help you. – Deej May 23 '13 at 08:57
  • @David - those responses seem to suggest therubyracer and libv8 won't install on Windows but it doesn't matter anyway. But Devise suddenly needs therubyracer and therefore won't run on Windows? – at. May 23 '13 at 09:22
  • include the 'execjs' and 'therubyracer' gems in your gem file and run 'bundle install' that's it. – Mohd Anas May 23 '13 at 11:54
  • @MohdAnas - execjs was already in my gem list, therubyracer seems like it doesn't install on Windows. – at. May 23 '13 at 14:56

3 Answers3

3

Click here and install node.js' windows version. It will solve your problem: http://nodejs.org/

On windows, on linux and on mac, the best V8 engine is nodejs and you don't have to install any other gem for this.

Zoltan
  • 4,936
  • 1
  • 35
  • 40
0

If you have "turbolinks" within assets group, get it out.

I had similar issue where my test failed because one or all of following gems were within test group,

  gem 'jquery-rails', '3.0.4'
  gem 'turbolinks', '1.1.1'
  gem "haml-rails"
  gem 'gumby-framework'
  gem "modernizr-rails"

but when I got them out of the group my test passed.

egyamado
  • 1,111
  • 4
  • 23
  • 44
0

This is 3 years late, but for anybody who finds this, the error the OP got most likely means that he has a typo in his coffee files. He likely typed something that Coffee doesn't recognize.

HighHopes
  • 2,014
  • 3
  • 23
  • 33