【问题标题】:config.assets.compile with therubyracer?config.assets.compile 与 therubyracer?
【发布时间】: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


    【解决方案1】:

    显然它们不是一回事,我只需将资产添加到对其进行注释的环境/production.rb

    【讨论】:

      猜你喜欢
      • 2012-07-20
      • 1970-01-01
      • 2020-10-06
      • 1970-01-01
      • 2011-09-15
      • 2012-03-25
      • 2012-08-11
      • 1970-01-01
      • 2016-01-25
      相关资源
      最近更新 更多