Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Update Capistrano#57

Merged
Pontus4 merged 2 commits intomasterfrom
update-capistrano
Nov 24, 2020
Merged

Update Capistrano#57
Pontus4 merged 2 commits intomasterfrom
update-capistrano

Conversation

@Pontus4
Copy link
Copy Markdown
Contributor

@Pontus4 Pontus4 commented Nov 23, 2020

The previous versions were very old (2015 and 2016).

The update also resolves Ruby 2.7 warnings like https://github.com/twingly/blantyre/issues/101.

@Pontus4
Copy link
Copy Markdown
Contributor Author

Pontus4 commented Nov 23, 2020

twingly/test has been deployed successfully with these changes 👍

@walro
Copy link
Copy Markdown
Contributor

walro commented Nov 24, 2020

What was the exact error message?

@Pontus4
Copy link
Copy Markdown
Contributor Author

Pontus4 commented Nov 24, 2020

What was the exact error message?

One error led to many, but this was the first one:

00:08 deploy:export_service
      01 sudo systemctl stop twingly-test.target
    ✔ 01 deploy@tuor.sth.twingly.network 0.077s
    ✔ 01 deploy@haldir.sth.twingly.network 0.084s
    ✔ 01 deploy@fili.sth.twingly.network 0.077s
      02 sudo /usr/local/bin/chruby-exec 2.7 -- /home/deploy/twingly-test/shared/bin/foreman export systemd /etc/systemd/system -a twingly-test -u `whoami` -l /home/deploy/twingly-…
      02 /opt/rubies/ruby-2.7.1/lib/ruby/2.7.0/bundler/definition.rb:32:in `build': /home/deploy/twingly-test/releases/20201123133912/Gemfile not found (Bundler::GemfileNotFound)

@walro
Copy link
Copy Markdown
Contributor

walro commented Nov 24, 2020

Regarding the fix, isn't it possible to step version by version for, I suspect, Capistrano Bundler? To me it seems like we don't know why it broke down, but if we can pinpoint the exact release it should be easier to figure it out what happened.

A first step could be to try out 1.6.0.

That said, I think the change is good either way as it sets the "variable" where needed instead of the more global version we had before :)

Comment thread capistrano-twingly.gemspec Outdated
@Pontus4
Copy link
Copy Markdown
Contributor Author

Pontus4 commented Nov 24, 2020

Regarding the fix, isn't it possible to step version by version for, I suspect, Capistrano Bundler?

Okay, it works for v1.2.0 but not for v1.3.0, which must be because of this change: capistrano/bundler@v1.2.0...v1.3.0#diff-9d850614d36625acd080ece560b529927117cea9a22c20223e791219e51db489R77.

I guess set :bundle_binstubs, -> { shared_path.join('bin') } is overwritten by nil when it is defined in the namespace instead of in the task.

@Pontus4
Copy link
Copy Markdown
Contributor Author

Pontus4 commented Nov 24, 2020

I guess set :bundle_binstubs, -> { shared_path.join('bin') } is overwritten by nil when it is defined in the namespace instead of in the task.

This has now been confirmed!

@walro
Copy link
Copy Markdown
Contributor

walro commented Nov 24, 2020

Cool, maybe the commit message can be revised a bit with the new found information and then I think we're good to go

@roback
Copy link
Copy Markdown
Member

roback commented Nov 24, 2020

There was probably not much thinking behind the original placement of the set :bundle_binstubs, -> { shared_path.join('bin') } line in 50c4aee 😄. I think I just placed it there because it happened to work. The documentation for capistrano-bundler isn't the best...

@Pontus4
Copy link
Copy Markdown
Contributor Author

Pontus4 commented Nov 24, 2020

Cool, maybe the commit message can be revised a bit with the new found information and then I think we're good to go

Updated in f3f323c 👍

Stopped working after updating Capistrano.
Further investigation showed that the assignment was overwritten by nil
after a change in v1.3.0 of capistrano-bundler, which led to a broken path.
Copy link
Copy Markdown
Contributor

@walro walro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

caps his hands

@Pontus4 Pontus4 merged commit 5192354 into master Nov 24, 2020
@Pontus4 Pontus4 deleted the update-capistrano branch November 24, 2020 12:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants