lur*_*ker 0 coffeescript ruby-on-rails-4
我有以下rails配置:
Windows 7
Rails 4.1.1
Ruby 2.0.0p481
Gem: coffee-rails 4.0.1
Gem: coffee-script 2.3.0
Gem: coffee-script-source 1.9.1
Run Code Online (Sandbox Code Playgroud)
我有一个工作正常,但现在没有.我不记得改变什么(git diff没有透露任何东西).我得到的错误是:
TypeError: Object doesn't support this property or method
(in c:/Users/mbratc01/Documents/Rails/manpower/app/assets/javascripts/welcome.js.coffee)
Extracted source (around line #9):
7 <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => false %>
8 <%= javascript_include_tag 'jquery-1.11.1', 'data-turbolinks-track' => false %>
9 <%= javascript_include_tag 'application', 'data-turbolinks-track' => false %>
10 <%= csrf_meta_tags %>
11 </head>
Run Code Online (Sandbox Code Playgroud)
我真的没有Coffeescript项目了.内容welcome.js.coffee是:
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
Run Code Online (Sandbox Code Playgroud)
我发现如果我只是将此文件移动到另一个不可访问的位置,应用程序运行正常.此外,.coffee在app/assets/javascript文件夹中只放置一个空文件会产生相同的错误.
我在StackOverflow上看到过几个看起来非常相似的帖子,但在阅读完它们之后,我找不到问题的根本原因,也无法解决它而不只是删除.coffee文件.我怀疑这里的CoffeeScript功能设置有些不太正确,但不确定是什么给出了正确的宝石似乎安装.
有人建议可能导致此错误的原因是什么?
| 归档时间: |
|
| 查看次数: |
9873 次 |
| 最近记录: |