我正在尝试在rails app(在Cygwin,Win7下)运行coffescript代码,我有以下错误日志:
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)
我的coffescript是关于aplicacao.js.coffee:
jQuery ->
$('#states').sortable(
axis: 'y'
update: ->
alert('updated!')
);
任何想法? TKS
答案 0 :(得分:1)
看起来像是一组混合的路径。我看到dos样式C:\tmp\execjs20130227-4044-6cws3p.js
和cygwin(unix)样式:/cygdrive/c/Users/IBM_ADMIN/Programming/Rails/...
看起来应用程序在Cygwin中运行,所以我将所有路径更改为unix样式并重试。