Bundler schlägt für die Bereitstellung von elastic beanstalk
Bin ich immer folgenden Fehler beim bereitstellen einer rails 4.2.1
app auf ec2-elastic beanstalk
on'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.
Fetching source index from https://rubygems.org/
Fetching [email protected]:bokmann/font-awesome-rails.git
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Retrying git clone 'git@github.com:bokmann/font-awesome-rails.git' "/var/app/ondeck/vendor/bundle/ruby/2.0/cache/bundler/git/font-awesome-rails-aa9211906101215f2656ef38ba0c26146ba4c6bc" --bare --no-hardlinks --quiet due to error (2/3): Bundler::Source::Git::GitCommandError Git error: command `git clone 'git@github.com:bokmann/font-awesome-rails.git' "/var/app/ondeck/vendor/bundle/ruby/2.0/cache/bundler/git/font-awesome-rails-aa9211906101215f2656ef38ba0c26146ba4c6bc" --bare --no-hardlinks --quiet` in directory /var/app/ondeck has failed.
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Git error: command `git clone 'git@github.com:bokmann/font-awesome-rails.git'
"/var/app/ondeck/vendor/bundle/ruby/2.0/cache/bundler/git/font-awesome-rails-aa9211906101215f2656ef38ba0c26146ba4c6bc"
--bare --no-hardlinks --quiet` in directory /var/app/ondeck has failed.
2014-07-13 15:16:48,672 [ERROR] (4743 MainThread) [directoryHooksExecutor.py-33] [root directoryHooksExecutor error] Script /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed with returncode 11
sowie .ebextensions/ruby.config
sieht wie folgt aus
# Install git in order to be able to bundle gems from git
packages:
yum:
git: []
patch: []
commands:
# Run rake with bundle exec to be sure you get the right version
add_bundle_exec:
test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
command: perl -pi -e 's/(rake)/bundle exec $1/' 11_asset_compilation.sh 12_db_migration.sh
# Bundle with --deployment as recommended by bundler docs
# cf. http://gembundler.com/v1.2/rationale.html under Deploying Your Application
add_deployment_flag:
test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
command: perl -pi -e 's/(bundle install)/$1 --deployment/' 10_bundle_install.sh
# Vendor gems to a persistent directory for speedy subsequent bundling
make_vendor_bundle_dir:
test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
command: mkdir /var/app/support/vendor_bundle
# Store the location of vendored gems in a handy env var
set_vendor_bundle_var:
test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
cwd: /opt/elasticbeanstalk/support
command: sed -i '12iexport
EB_CONFIG_APP_VENDOR_BUNDLE=$EB_CONFIG_APP_SUPPORT/vendor_bundle' envvars
# The --deployment flag tells bundler to install gems to vendor/bundle/, so
# symlink that to the persistent directory
symlink_vendor_bundle:
test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
command: sed -i 's/\(^cd $EB_CONFIG_APP_ONDECK\)/\1\nln -s $EB_CONFIG_APP_VENDOR_BUNDLE .\/vendor\/bundle/' 10_bundle_install.sh
# Don't run the above commands again on this instance
# cf. http://stackoverflow.com/a/16846429/283398
z_write_post_provisioning_complete_file:
cwd: /opt/elasticbeanstalk/support
command: touch .post-provisioning-complete%
Ich bin mit einem 64-bit Amazon Linux-server und versucht zu installieren, mit ruby-2.0.0
und passenger
InformationsquelleAutor Bhushan Lodha | 2014-07-13
Du musst angemeldet sein, um einen Kommentar abzugeben.
Ich vermute, das wird scheitern, weil in Ihrer ebextensions Sie laufen
bundle install --deployment
. Gibt es einen Grund, warum Sie wollen, verwenden Sie die --Bereitstellung Flagge. Werfen Sie einen Blick auf diese Antwort: https://stackoverflow.com/a/3681411/161628.Wenn Ihr Anwendungsfall nicht braucht, die --Bereitstellung Flagge, ich würde vorschlagen, benutze es nicht.
Können Sie lokal in einem Paket app-Abhängigkeiten mit vendor/cache über den Ansatz, dokumentiert in diese blog.
Können Sie aktualisieren die Frage nach dem Inhalt Ihres Gemfile. Sind Sie mit git@ URLs in Ihrem Gemfile? Sie möchten möglicherweise verwenden Sie eine URL wie "git://github.com:bokmann/font-awesome-Schienen.git" für den Fall, Sie haben "[email protected]:bokmann/font-awesome-rails.git" in Ihrem Gemfile.
Werfen Sie einen Blick auf diese Antwort.
Also, was schließlich gearbeitet? Entfernen der Bereitstellung Flagge oder ändern git-url?
Ändern der git url
Ich habe das gleiche Problem. Das problem ist, ich habe ein Juwel bezogen auf den relativen Pfad. Können Sie mir helfen wie ich es beheben kann? gem 'pushmeup', :path=>'Verkäufer/pushmeup'
InformationsquelleAutor Rohit Banga