bundle exec rake assets:在Dev Environment中预编译失败

时间:2015-07-27 17:16:59

标签: ruby-on-rails ruby-on-rails-3

这是我的development.rb文件

config.assets.debug = false
config.assets.compile = true
config.assets.enabled = true
config.assets.digest = true
config.assets.raise_runtime_errors = true

当我运行命令bundle exec rake assets:precompile --trace时,我收到以下错误。

Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
rake aborted!
ExecJS::ProgramError: TypeError: Object doesn't support this property or method
c:/Ruby193/lib/ruby/gems/1.9.1/gems/execjs-

2 个答案:

答案 0 :(得分:1)

将此添加到您的Gemfile

gem 'coffee-script-source', '1.8.0'

并执行此操作

bundle update coffee-script-source

参考:Rails-4, ExecJS::ProgramError in Pages#welcome

答案 1 :(得分:1)

如果您使用Windows,请尝试安装NodeJS并重新启动计算机。 应该运行。