저는 Ruby의 초보자이며 첫 프로젝트에서 작업하고 있습니다. 여기에 내가 사용하고있는 버전 ...자바 스크립트를 레일에 추가하기
- 루비 2.1.1p76
- 레일 4.1.0
나는 문제가 내 자바 스크립트 파일을 추가하는 데 문제가 있습니다. 나는이 기사를 읽은 후 this article (특별히 사이트 전체 스크립트 부분) 다음하고, 나는 jquery.js & jquery.validate.min.js
에서 공급 업체/자산/자바 스크립트 및 응용 프로그램/자산/자바 스크립트/additionalJS에서 내 자신의 스크립트 accRefConfig.js
저장된 디렉토리
그래서 여기에 같은 (의견, 문제가되지 않습니다 희망을 삭제하지 않았다) :
// This is a manifest file that'll be compiled into application.js, which will include all the files listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details about supported directives.
//
// = require jquery
// = require jquery.validate.min
// = require_tree ./additionalJS
을 그리고 내 응용 프로그램 레이아웃 ... 내가 잘못 뭐하는 거지하지만이 나에게 다음과 같은 오류를주고있다
<head>
<title>Hello World</title>
<%= stylesheet_link_tag "application.css", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application" %>
</head>
....
? 시간 & 도움 :
에 미리 감사드립니다 BTW, 나는 또한 <%= javascript_include_tag "application.js" %>
을 시도했지만 같은 오류가 MSG
이것을 확인하십시오. http://stackoverflow.com/questions/7636934/rake-assetsprecompile-issue-invalid-utf-8-byte-sequence – kirqe
@railsr, 답장을 보내 주셔서 감사합니다. 지금 VM에 액세스 할 수 없으며 시도해 볼 기회가있을 때 알려줍니다. – AlwaysANovice