Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage with Capistrando and capistrano/rbenv plugin #46

Closed
guillehorno opened this issue May 14, 2020 · 5 comments
Closed

Usage with Capistrando and capistrano/rbenv plugin #46

guillehorno opened this issue May 14, 2020 · 5 comments
Labels
external responsible It's not us, someone else will have to fix this

Comments

@guillehorno
Copy link

Hi,

I just installed fullstaq-ruby on a new server. Everything worked out fine. I followed the instructions regarding the rbenv integrations, got it working ok. When I write rbenv versions the output shows me the correct fullstaq-ruby installed version:

$ rbenv versions
* 2.7.1-jemalloc (set by /home/emeral/.rbenv/version

I added the line indicating the version in the deploy.rb file:

# config/deploy.rb
set :rbenv_ruby, '2.7.1-jemalloc'

When I try to run cap deploy it looks like it still tries to check if the ruby version is installed on the .rbenvhome folder:

00:00 rbenv:validate
      WARN  rbenv: 2.7.1-jemalloc is not installed or not found in /usr/local/rbenv/versions/2.7.1-jemalloc

I've tried setting the rbenv_custom_path to the fullstaq folder

set :rbenv_custom_path, '/usr/lib/fullstaq-ruby/'

It works initially (it fools this initial check) but then it fails when capistrano tries to use that path to execute rbenv

/usr/lib/fullstaq-ruby//bin/rbenv

Is there something else I'm missing? Thanks!!

@FooBarWidget
Copy link
Member

Fullstaq Ruby uses a modified rbenv which adds support for system-wide installed Rubies. It looks like capistrano-rbenv is written with the assumption that Rubies are always located in RBENV_DIR/versions, which is not the case in fullstaq-rbenv. You should submit a feature request to capistrano-rbenv.

@guillehorno
Copy link
Author

Ok. I'll explore a solution with the capistrano/rbenv plugin and collaborate with a PR if there's something to add to the documentation here, thanks!!

@FooBarWidget FooBarWidget added the external responsible It's not us, someone else will have to fix this label May 15, 2020
@guillehorno
Copy link
Author

Hi, I think I've found a way to do it. There's a "hidden" option (at least it was not documented) to set the rbenv_ruby_dir in the capistrano/rbenv plugin.

That, combined with altering a little bit the rbenv_prefix option, so it point to the correct rbenv bin, works ok. I've already submitted a PR on the capistrano/rbenv plugin to have that option documented (capistrano/rbenv#91).

I've just sumitted a PR to document the neccesary options to add for the capistrano/rbenv plugins #47

Thanks :)

@FooBarWidget
Copy link
Member

Thanks @guillehorno! I've posted some feedback in the PR.

@FooBarWidget
Copy link
Member

This has been implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external responsible It's not us, someone else will have to fix this
Projects
None yet
Development

No branches or pull requests

2 participants