错误:服务错误 - 无法部署应用程序。在 ElasticBeanstalk 上

Zep*_*Lim 5 ruby-on-rails amazon-web-services amazon-elastic-beanstalk

因此,我使用 Elasticbeanstalk 启动我的应用程序,并在我的应用程序中使用 Ruby on Rails。但是,当我运行命令“eb deploy {name}”时,它向我显示了错误

\n\n
Creating application version archive "app-4f49-180904_151051".\nUploading: [##################################################] 100% \nDone...\n2018-09-04 07:12:09    INFO    Environment update is starting.      \n2018-09-04 07:12:15    INFO    Deploying new version to instance(s).\n2018-09-04 07:12:47    ERROR   [Instance: i-0ae9e24acc3308f6d] Command \nfailed on instance. Return code: 1 Output: \n(TRUNCATED)...c65750cc.js.gz\nrake aborted!\nAutoprefixer doesn\xe2\x80\x99t support Node v4.6.0. Update it.\n/opt/rubies/ruby-2.5.1/bin/bundle:23:in `load\'\n/opt/rubies/ruby-2.5.1/bin/bundle:23:in `<main>\'\nTasks: TOP => assets:precompile\n(See full trace by running task with --trace). \nHook /opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh \nfailed. For more detail, check /var/log/eb-activity.log using console \nor EB CLI.\n2018-09-04 07:12:47    INFO    Command execution completed on all \ninstances. Summary: [Successful: 0, Failed: 1].\n2018-09-04 07:12:47    ERROR   Unsuccessful command execution on \ninstance id(s) \'i-0ae9e24acc3308f6d\'. Aborting the operation.\n2018-09-04 07:12:48    ERROR   Failed to deploy application.        \n\nERROR: ServiceError - Failed to deploy application.\n
Run Code Online (Sandbox Code Playgroud)\n\n

但是,我检查了我的 gemfile,没有看到任何类型的 Autoprefix。我希望我提供了足够的信息,如果没有,请指导我提供更多详细信息并找到答案。先感谢您。

\n\n

我的宝石文件

\n\n
source \'https://rubygems.org\'\ngit_source(:github) { |repo| "https://github.com/#{repo}.git" }\n\nruby \'2.5.1\'\n\n# Bundle edge Rails instead: gem \'rails\', github: \'rails/rails\'\ngem \'rails\', \'~> 5.2.0\'\n# Use mysql as the database for Active Record\ngem \'mysql2\', \'>= 0.4.4\', \'< 0.6.0\'\n# Use Puma as the app server\ngem \'puma\', \'~> 3.11\'\n# Use SCSS for stylesheets\ngem \'sass-rails\', \'~> 5.0\'\n# Use Uglifier as compressor for JavaScript assets\ngem \'uglifier\', \'>= 1.3.0\'\n# See https://github.com/rails/execjs#readme for more supported runtimes\n# gem \'mini_racer\', platforms: :ruby\n\n# Use CoffeeScript for .coffee assets and views\ngem \'coffee-rails\', \'~> 4.2\'\n# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks\ngem \'turbolinks\', \'~> 5\'\n# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder\ngem \'jbuilder\', \'~> 2.5\'\n# Use Redis adapter to run Action Cable in production\n# gem \'redis\', \'~> 4.0\'\n# Use ActiveModel has_secure_password\n# gem \'bcrypt\', \'~> 3.1.7\'\n\n# Use ActiveStorage variant\n# gem \'mini_magick\', \'~> 4.8\'\n\n# Use Capistrano for deployment\n# gem \'capistrano-rails\', group: :development\n\n# Reduces boot times through caching; required in config/boot.rb\ngem \'bootsnap\', \'>= 1.1.0\', require: false\n\ngroup :development, :test do\n  # Call \'byebug\' anywhere in the code to stop execution and get a debugger console\n  gem \'byebug\', platforms: [:mri, :mingw, :x64_mingw]\nend\n\ngroup :development do\n  # Access an interactive console on exception pages or by calling \'console\' anywhere in the code.\n  gem \'web-console\', \'>= 3.3.0\'\n  gem \'listen\', \'>= 3.0.5\', \'< 3.2\'\n  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring\n  gem \'spring\'\n  gem \'spring-watcher-listen\', \'~> 2.0.0\'\nend\n\ngroup :test do\n  # Adds support for Capybara system testing and selenium driver\n  gem \'capybara\', \'>= 2.15\', \'< 4.0\'\n  gem \'selenium-webdriver\'\n  # Easy installation and use of chromedriver to run system tests with Chrome\n  gem \'chromedriver-helper\'\nend\n\n# Windows does not include zoneinfo files, so bundle the tzinfo-data gem\ngem \'tzinfo-data\', platforms: [:mingw, :mswin, :x64_mingw, :jruby]\ngem \'devise\'\ngem \'figaro\'\ngem \'omniauth-google-oauth2\'\ngem \'twitter\'\ngem \'omniauth-twitter\'\ngem \'carrierwave\', \'~> 1.0\'\ngem "mini_magick"\ngem \'omniauth-facebook\'\ngem "recaptcha", require: "recaptcha/rails"\ngem \'impressionist\'\ngem \'social-share-button\'\ngem \'fog-aws\'\n\n# include bootstrap\ngem \'bootstrap\', \'~> 4.1.0\'\n\n#include fontawesome\ngem \'font-awesome-rails\'\n\n#include jquery & jquery ujs\ngem \'jquery-rails\'\ngem \'acts-as-taggable-on\', \'~> 6.0\'\ngem \'will_paginate\', \'~> 3.1.0\'\ngem \'autosize\'\ngem \'jquery-ui-rails\'\ngem \'select2-rails\'\n
Run Code Online (Sandbox Code Playgroud)\n

Eli*_*ray 2

同样的问题\xe2\x80\x93通过取消注释修复了它mini-racer我有用,就像上面建议的@KedarnagMukanahallipatna一样。

\n\n

更改自

\n\n
# Gemfile\n\n# gem 'mini_racer', platforms: :ruby\n
Run Code Online (Sandbox Code Playgroud)\n\n

改成

\n\n
# Gemfile\n\ngem 'mini_racer', platforms: :ruby\n
Run Code Online (Sandbox Code Playgroud)\n