I'm deploying a rails app to Google Cloud App Engine. Since adding
config.action_mailer.default_url_options = { host: 'foobar.appspot.com'}
to production.rb, the build fails on deploy. Here are the logs:
INFO[0108] RUN bundle install --deployment --without="development test" && rbenv rehash
INFO[0108] cmd: /bin/sh
INFO[0108] args: [-c bundle install --deployment --without="development test" && rbenv rehash]
/bin/sh: 1: bundle: not found
error building image: error building stage: waiting for process to exit: exit status 127
There are 2 options, which you should to try:
Change bundle to bundler.
install bundler manually with something like gem install bundler -v 1.17.1
Related
I'm upgrading my Gitlab install but have an issue: the migration fails because it misses a dependency. Which look installed. That's weird.
$ sudo -u git -H bundle install --without postgres development test --deployment
Using timfel-krb5-auth 0.8.3
# ...
Using vmstat 2.3.0
Using webpack-rails 0.9.9
Using wikicloth 0.8.1
Bundle complete! 187 Gemfile dependencies, 266 gems now installed.
Gems in the groups postgres, development and test were not installed.
Bundled gems are installed into `./vendor/bundle`
Looks like timfel-krb5-auth is installed. But here is the output of migrating:
$ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
Could not find timfel-krb5-auth-0.8.3 in any of the sources
Run `bundle install` to install missing gems.
Any idea how to fix this?
I fixed it by dropping all installed dependencies:
$ rm -rf ./vendor ./.bundle/
Then re-install:
$ sudo -u git -H bundle install --without postgres development test --deployment
And finally, I got errors due to the wrong Gemfile. I found a solution here: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11787/diffs
My tests were all passing yesterday on circle and are still passing today locally but now I this error message. Whats going on?
bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
bash: line 1: bundle: command not found
bash: line 1: bundle: command not found
bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 returned exit code 127
Action failed: bundle install
I fully believe that CircleCI doesn't test anything before pushing it out:
https://discuss.circleci.com/t/bundle-command-not-found/3783
Basically, you know have to explicitly install bundler.
Add gem install bundler to the pre stage of the dependencies in your circle.yml file
I had the same issue for CircleCI 2.0 that uses docker images.
Solution was to delete my .ruby-gemset from repo, after that CI was able to use default gemset and bundler could continue.
I defined ruby version 2.0.0-p645 in .ruby_version file
cap production deploy stops with bundler error:
INFO [11dd01a8] Running /usr/local/rvm/bin/rvm default do bundle install --path /var/www/p4-site/shared/bundle --without development test --deployment --quiet on p4-ocean
DEBUG [11dd01a8] Command: cd /var/www/p4-site/releases/20160206090913 && /usr/local/rvm/bin/rvm default do bundle install --path /var/www/p4-site/shared/bundle --without development test --deployment --quiet
DEBUG [11dd01a8] ruby-2.0.0-p481 is not installed.
DEBUG [11dd01a8] To install do: 'rvm install ruby-2.0.0-p481'
DEBUG [11dd01a8] /usr/local/rvm/scripts/set: line 19: exec: bundle: not found
(Backtrace restricted to imported tasks)
Gemfile doesn't contain ruby command
.bundle/config file contains
---
BUNDLE_WITHOUT: production
Where does bundler store ruby version 2.0.0-p481 ?
I am trying to install gitLab server in my Virtual Machines, When I Execute the command: sudo -u git -H bundle install --deployment --without development test mysql aws, I got this:
Some gems seem to be missing from your vendor/cache directory.
Could not find rake-10.3.2 in any of the sources
And my gem source is:
root#ubuntu:/home/git/gitlab# gem sources -l
*** CURRENT SOURCES ***
https://ruby.taobao.org/
https://rubygems.org/
When I run gem install rake-10.3.2, I got this:
ERROR: Could not find a valid gem 'rake-10.3.2' (>= 0) in any repository
How do I resolve this problem?
Try installing rake with this command
gem install rake -v 10.3.2
Do one thing. Delete your Gemfile.lock
and run the command:
bundle install
When I run cap production deploy in my rails project directory, I get error like this:
INFO[6be9dff4] Running RBENV_ROOT=/usr/local/rbenv RBENV_VERSION=2.1.1 /usr/local/rbenv/bin/rbenv exec bundle install --binstubs /var/www/example.com/shared/bin --path /var/www/example.com/shared/bundle --without development test --deployment --quiet on example.com
DEBUG[6be9dff4] Command: cd /var/www/example.com/releases/20140624143014 && ( RBENV_ROOT=/usr/local/rbenv RBENV_VERSION=2.1.1 RBENV_ROOT=/usr/local/rbenv RBENV_VERSION=2.1.1 /usr/local/rbenv/bin/rbenv exec bundle install --binstubs /var/www/example.com/shared/bin --path /var/www/example.com/shared/bundle --without development test --deployment --quiet )
DEBUG[6be9dff4] Errno::EACCES: Permission denied # rb_sysopen - /var/www/example.com/shared/bundle/ruby/2.1.0/cache/rake-10.3.2.gem
DEBUG[6be9dff4] An error occurred while installing rake (10.3.2), and Bundler cannot continue.
DEBUG[6be9dff4] Make sure that `gem install rake -v '10.3.2'` succeeds before bundling.
So I login server and change user to deploy user, then run command like this:
$ su - deployer
Password:
deployer#server ~$ cd /var/www/example.com/releases/20140624143014 && ( RBENV_ROOT=/usr/local/rbenv RBENV_VERSION=2.1.1 RBENV_ROOT=/usr/local/rbenv RBENV_VERSION=2.1.1 /usr/local/rbenv/bin/rbenv exec bundle install --binstubs /var/www/example.com/shared/bin --path /var/www/example.com/shared/bundle --without development test --deployment --quiet )
Errno::EACCES: Permission denied # rb_sysopen - /var/www/example.com/shared/bundle/ruby/2.1.0/cache/rake-10.3.2.gem
An error occurred while installing rake (10.3.2), and Bundler cannot continue.
Make sure that `gem install rake -v '10.3.2'` succeeds before bundling.
rbenv and ruby is installed like this:
$ rbenv versions
system
2.0.0-p451
* 2.1.1 (set by /usr/local/rbenv/version)
I'm tring to deploy from LinuxMint16 to CentOS 6.5 with Capistrano 3 and prior deploy was successful when I used 2.0.0-p451.
How and what should I check to find out what causes error?