My Gemfile for my rails app has a gem that I'm pulling off of Github using the following entry;
gem 'markable', github: 'chrome/markable'
I have a lot of other gems in the Gemfile but if I remove this one line it works fine so clearly this line is the issue.
This is the deploy output:
$ eb deploy
Creating application version archive "899e".
Uploading: [##################################################] 100% Done...
INFO: Environment update is starting.
INFO: Deploying new version to instance(s).
ERROR: [Instance: i-8c21232c] Command failed on instance. Return code: 11 Output: (TRUNCATED)...ps://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
You need to install git to be able to use gems from git repositories. For help
installing git, please refer to GitHub's tutorial at
https://help.github.com/articles/set-up-git.
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
ERROR: Unsuccessful command execution on instance id(s) 'i-8c21232c'. Aborting the operation.
ERROR: Failed to deploy application.
How do I get EB to correctly pull that gem or fix it so that this works?
I see other similar questions but they are old at this point and often refer to a .ebextensions/ruby.config file which doesn't exist anywhere in my system.
Thoughts?
Related
I'm presently trying to deploy a Rails API onto Elastic Beanstalk. It will not deploy due to the gemfile not being found. See log out put below:
[INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0",
"results":[{"status":"FAILURE","msg":"Engine execution has encountered
an error.","returncode":1,"events":[{"msg":"Instance deployment:
You didn't include a 'Gemfile' in your source bundle. The deployment
didn't install any Ruby gems.","timestamp":1601055941,"severity":"INFO"},
{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1601055944,"severity":"ERROR"}]}]}
I have tried doing bundle package in terminal so the cache gem file is used under vendor/bundle and it still doesn't not work.
Anyone have any ideas?
I tried to deploy my rails project to elastic beanstalk. However, the commands in the .ebextensions folder did not run. I am sure it did not run because I have a gem as such:
gem 'ckeditor', github: 'galetahub/ckeditor'
It requires git to clone the gem, and my deployment are failing at this exact point.
[Instance: i-000294aa0a767f205] Command failed on instance. Return code: 11 Output: (TRUNCATED)...t error: command `git clone 'https://github.com/galetahub/ckeditor.git'
"/opt/rubies/ruby-2.6.5/lib/ruby/gems/2.6.0/cache/bundler/git/ckeditor-1fd593e0d9f7d7cbd0713285fc8f7edcb38af06e"
I tried YAML linting and the file has no syntax error.
I checked the file location is also correct.
What is not working?
Thanks to this thread on reddit, I need to commit or at least stage the files
I would like to see the rails application in elastic beanstalk, but I can be angry at the ruby version.
However, no description of 2.4.1 can be found anywhere.
What kind of problem do you think?
Creating application version archive "xxx".
Uploading xxx.zip to S3. This may take a while.
Upload Complete.
2019-06-17 12:33:43 INFO Environment update is starting.
2019-06-17 12:33:49 INFO Deploying new version to instance(s).
2019-06-17 12:33:57 ERROR [Instance: xxx] Command failed on instance. Return code: 18 Output: (TRUNCATED)...e ']'
+ bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Your Ruby version is 2.6.3, but your Gemfile specified 2.4.1.
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2019-06-17 12:33:57 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2019-06-17 12:33:57 ERROR Unsuccessful command execution on instance id(s) 'xxx'. Aborting the operation.
2019-06-17 12:33:57 ERROR Failed to deploy application.
ruby '2.6.3'
local ruby version
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
Elastic Beanstalk
Puma with Ruby 2.6 running on 64bit Amazon Linux/2.9.5
The Elastic Beanstalk instance is set up to use Ruby 2.6, but in the Gemfile in the root of your application, you have a line like:
# Gemfile
ruby '2.4.1'
which declares that you are using Ruby 2.4.1.
You need to either change the Ruby version to '2.6.3' in the Gemfile and re-run bundle install to update the Gemfile.lock version, or you need to recreate your Elastic Beanstalk environment using the Ruby 2.4 version platform. If you recreate the Elastic Beanstalk environment, they may use a different patch version of Ruby 2.4, so you may have to update your Gemfile to match the Ruby version that Elastic Beanstalk is using anyway.
When I run eb deploy on the application, I get this error:
-hidden-#ruby:~/-hidden-$ eb deploy
WARNING: You have uncommitted changes.
Creating application version archive "app-9115-160205_135915".
Uploading -hidden-/app-9115-160205_135915.zip to S3. This may take a while.
Upload Complete.
INFO: Environment update is starting.
INFO: Deploying new version to instance(s).
ERROR: [Instance: i-024e83b0ed9b09096] Command failed on instance. Return code: 5 Output: (TRUNCATED)...ies/ruby-2.2.3/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/tiny_tds-0.6.2/gem_make.out
An error occurred while installing tiny_tds (0.6.2), and Bundler cannot
continue.
Make sure that `gem install tiny_tds -v '0.6.2'` succeeds before bundling.
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
ERROR: Unsuccessful command execution on instance id(s) 'i-024e83b0ed9b09096'. Aborting the operation.
ERROR: Failed to deploy application.
ERROR: Failed to deploy application.
I can install tiny_tds successfully on my local machine and on the EC2 instance, but I get this error when I deploy. I'm extremely new to ruby, rails, git and anything programming. Basically, I'm taking an application made for heroku and converting it into en EB environment.
Please remove the version of tiny_tds in Gemfile
And try again.
I have tried to deploy rails spree commerce project to ubuntu 14.04 server on digitalocean. Everything were well. But when I trying to deploy the project first time I get sidekiq error. I goggling something about that issue but I didn't get any solution.
after the
mina deploy
commad.
bundling and migrations work properly till the restarting of sidekiq.
The part of the deploying code which include the error is here:
-----> Launching
-----> Stop sidekiq
Skip stopping sidekiq (no pid file found)
-----> Start sidekiq
bundler: command not found: sidekiq
Install missing gem executables with `bundle install`
! ERROR: Deploy failed.
-----> Cleaning up build
Deleting release
Unlinking current
OK
I also experienced same problem when I execute command 'mina deploy' after I update version of mina. My workaround for this problem is by modifying my gemfile to return to the older version of
'kgio' to version 2.9.2
'mina' to version 0.3.1
'mina-sidekiq' to version 0.3.0
'mina-unicorn' to version 0.0.3
After that, it works again like before