Elastic beanstalk [Rails]部署问题 - 无法分配内存

时间:2022-04-26 17:25:40

I'm experiencing the below error when deploying to Elastic beanstalk. This is a ruby app running Rails 4.1.9 and Ruby 2.1.4 on Puma.

部署到Elastic beanstalk时遇到以下错误。这是一个在Puma上运行Rails 4.1.9和Ruby 2.1.4的ruby应用程序。

The stacktrace is as follows:

堆栈跟踪如下:

Errno::ENOMEM: Cannot allocate memory - node
(in /var/app/ondeck/app/assets/javascripts/my_javascript.js)

My javascript file is pretty basic, it looks like this

我的javascript文件非常基本,看起来像这样

//= require jquery
//= require jquery_ujs
//= require ../../../vendor/assets/components/bootstrap/dist/js/bootstrap.min
//= require ../../../vendor/assets/components/thirdpartylib.js

... and then basic functions

Unsure why exactly this is failing. I have not changed anything in the javascript file or the vendor assets.

不确定为什么这个失败了。我没有更改javascript文件或供应商资产中的任何内容。

Any ideas on how to resolve will be greatly appreciated.

任何关于如何解决的想法将不胜感激。

1 个解决方案

#1


The issue has been resolved by removing a large amount of assets that were not needed or used, for instance i had the entire bootstrap project source and a few 3rd party library project source tree's and corresponding files, instead of just the src files that i was using.

通过删除大量不需要或使用的资产解决了这个问题,例如我有整个引导项目源和一些第三方库项目源代码树和相应的文件,而不仅仅是我的src文件使用。

#1


The issue has been resolved by removing a large amount of assets that were not needed or used, for instance i had the entire bootstrap project source and a few 3rd party library project source tree's and corresponding files, instead of just the src files that i was using.

通过删除大量不需要或使用的资产解决了这个问题,例如我有整个引导项目源和一些第三方库项目源代码树和相应的文件,而不仅仅是我的src文件使用。