Guilherme
Guilherme

Reputation: 1103

Can't run coffeescript on Cygwin

I'm trying to run coffescript code on rails app (under Cygwin, Win7) and i have the following error log:

ActionView::Template::Error (
module.js:340
    throw err;
          ^
Error: Cannot find module 'C:\tmp\execjs20130227-4044-6cws3p.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

  (in /cygdrive/c/Users/IBM_ADMIN/Programming/Rails/AdmApp/app/assets/javascripts/aplicacao.js.coffee)):
    3: <head>
    4:   <title>AdmApp</title>
    5:   <%= stylesheet_link_tag    "application", :media => "all" %>
    6:   <%= javascript_include_tag "application" %>
    7:   <%= csrf_meta_tag %>
    8: </head>
    9: <body>
  app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb__1024687483__1068178198'


  Rendered /usr/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1)
  Rendered /usr/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_onse.erb (1.0ms)
  Rendered /usr/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/template_errob within rescues/layout (81.0ms)

My coffescript is on aplicacao.js.coffee:

jQuery ->
  $('#states').sortable(
    axis: 'y'
    update: ->
      alert('updated!')
  );

any idea? Tks

Upvotes: 2

Views: 159

Answers (1)

AlG
AlG

Reputation: 15157

Looks like a mixed set of pathing here. I see both dos style C:\tmp\execjs20130227-4044-6cws3p.js and cygwin (unix) style: /cygdrive/c/Users/IBM_ADMIN/Programming/Rails/...

It looks like the app is running in Cygwin, so I'd change all the paths to unix style and retry.

Upvotes: 1

Related Questions