【发布时间】:2012-07-23 03:42:01
【问题描述】:
在我的 application.js 我有这个:
//= require jquery_ujs
//= require jquery.validate.min
//= require jquery.tokeninput
//= require script
在我的 gemfile 中,如果我想在每次部署时“实时编译”资产,我应该把它放在某个地方。
gem 'therubyracer', :require => 'v8'
当我输入这个时,我可以成功运行cap deploy 和cap deploy:assets:precompile。
我还从here 中了解到,这是一个非常糟糕的主意。所以现在我很困惑我是否应该这样做......当我没有将 therubyracer 放在我的 gemfile 中时,我在部署时(如下)出现错误,即使我在部署之前先运行 assets:prcompile ......但它我的理解是,如果我确实使用这是一笔巨大的开销......?
could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
【问题讨论】:
标签: ruby-on-rails ruby ruby-on-rails-3 deployment capistrano