You are trying to install in deployment mode after changing the gemfile

I am trying to deploy my Rails application on my DigitalOcean server using

cap production deploy

But I get an error message,

(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@178.62.204.53: 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 deploy@178.62.204.53: 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

Something is wrong with my Gemfile and Gemfile.lock, and it is related to rails-assets-angular-devise, but I cannot figure out how to fix it.

I tried to run bundle installon my server, but still the same error. I tried to delete the Gemlock.file file and make it bundle installon my local computer, and then execute it and direct it to the deployment branch, but still the same error.

This is part of rails-assets- angular -devise in the gemfile.

source "https://rails-assets.org" do
  gem "rails-assets-angular-devise"
end
+4
source share
1 answer

gemset - , gemset gem ( rvm )

, :

  • rvm
  • $ gem update bundler
  • ssh cap [env] deploy
+6

Source: https://habr.com/ru/post/1605781/


All Articles