I'm trying to deploy my Rails app to my DigitalOcean server with
cap production deploy
But I'm getting an error,
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: bundle exit status: 16
bundle stdout: You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have deleted from the Gemfile:
* rails-assets-angular-devise
You have changed in the Gemfile:
* rails-assets-angular-devise from `no specified source` to `rubygems repository
https://rubygems.org/, https://rails-assets.org/`
bundle stderr: Nothing written
SSHKit::Command::Failed: bundle exit status: 16
bundle stdout: You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have deleted from the Gemfile:
* rails-assets-angular-devise
You have changed in the Gemfile:
* rails-assets-angular-devise from `no specified source` to `rubygems repository
https://rubygems.org/, https://rails-assets.org/`
bundle stderr: Nothing written
Tasks: TOP => deploy:updated => bundler:install
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as [email protected]: bundle exit status: 16
bundle stdout: You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have deleted from the Gemfile:
* rails-assets-angular-devise
You have changed in the Gemfile:
* rails-assets-angular-devise from `no specified source` to `rubygems repository
https://rubygems.org/, https://rails-assets.org/`
bundle stderr: Nothing written
alucardu@alucardu-VirtualBox:~/sites/movieseat(Deploy) $ source "https://rails-assets.org" do
bash: https://rails-assets.org: No such file or directory
alucardu@alucardu-VirtualBox:~/sites/movieseat(Deploy) $ gem "rails-assets-angular-devise"
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command rails-assets-angular-devise
alucardu@alucardu-VirtualBox:~/sites/movieseat(Deploy) $ end
There is something wrong with my Gemfile and the Gemfile.lock and it has to do with rails-assets-angular-devise
but I can't figure out how to fix it.
I've tried running bundle install
on my server but still the same error. I've tried removing the Gemlock.file and doing bundle install
on my local and then commiting it and pushing it to my deploy branch but still the same error.
This is the rails-assets-angular-devise part in the gemfile.
source "https://rails-assets.org" do
gem "rails-assets-angular-devise"
end
Check bundler version on server in correctly gemset - probably you have old bundler version in your gemset or local gem (if you doesn't use rvm on server)
I have the same problem, steps to resolved it:
$ gem update bundler
cap [env] deploy
This problem occurs due to different bundler gem versions
on your deployment server and your development server. bundler gem version
must be equal on the server and your development environment
once the same bundler version is installed on both the production and development environment then deploy again using:
cap production deploy
check bundler version using gem info bundler
and install or uninstall version as per requirement
Install:
gem install bundler -v <bundler_version>
E.g.
gem install bundler -v 2.2.4
Uninstall:
gem uninstall bundler -v <bundler_version>
E.g.
gem uninstall bundler -v 2.2.4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With