相关疑难解决方法(0)

rake资产:预编译不起作用(rails 3.1.1)

我正在部署到heroku但我看到没有提供css文件(它们也无法在heroku上找到).

我读到我需要做rake资产:首先在本地预编译然后当我这样做时,我得到:

C:\project>bundle exec rake assets:precompile --trace

** Invoke assets:precompile (first_time)
** Execute assets:precompile
rake aborted!
undefined: Unexpected token: operator (<)
  (in C:/project/app/assets/javascripts/application.js)

Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
Run Code Online (Sandbox Code Playgroud)

我在application.js中什么也没有,所以我不明白错误在哪里..

application.js是

// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not …
Run Code Online (Sandbox Code Playgroud)

windows rake assets heroku ruby-on-rails-3

7
推荐指数
3
解决办法
7450
查看次数

标签 统计

assets ×1

heroku ×1

rake ×1

ruby-on-rails-3 ×1

windows ×1