3

当我尝试部署我的应用程序时,我收到此错误:

rake aborted!
NoMethodError: undefined method each_key' for false:FalseClass /var/deploy/dcaclab/web_head/shared/bundle/ruby/2.2.0/gems/tinymce-rails-4.1.6/lib/tinymce/rails/asset_manifest.rb:41:ineach'
/var/deploy/dcaclab/web_head/shared/bundle/ruby/2.2.0/gems/tinymce-rails-4.1.6/lib/tinymce/rails/asset_installer.rb:26:in cleanup_assets' /var/deploy/dcaclab/web_head/shared/bundle/ruby/2.2.0/gems/tinymce-rails-4.1.6/lib/tinymce/rails/asset_installer.rb:13:ininstall'
/var/deploy/dcaclab/web_head/shared/bundle/ruby/2.2.0/gems/tinymce-rails-4.1.6/lib/tasks/tinymce-assets.rake:12:in `block in '
Tasks: TOP => assets:precompile

有人可以帮忙吗?

4

1 回答 1

1

首先请检查 config/environments 下的 production.rb 文件

把这些线放在那里

config.serve_static_assets = true
config.assets.compile = false

然后运行此命令以编译您的资产以进行生产

rake assets:precompile RAILS_ENV=production

但是,如果您希望单独包含 tinymce-jquery.js,则需要将其添加到 config/environments/production.rb 的预编译列表中:

config.assets.precompile << "tinymce-jquery.js"
于 2015-03-16T05:35:58.247 回答