-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
can't set rvm_path in 1.x #414
Comments
@devvmh how are you invoking the rvm:set ? Also can you output your |
ok here's the details. Using the latest mina 1.0.0.beta4 fails. Using my branch (master...devvmh-forks:fix/rvm-path) succeeds. Here's the output I get when it fails:
And here's the output of mina deploy --simulate. Note that this situation is a little strange, because I'm running the tests for mina-sidekiq so I'm sshing from localhost to localhost:
|
😓 I found it! I use rvm on my local machine, and it sets a bash environment variable called I can see a few possible solutions:
Is there a favoured way to go? I can set up a PR for this. |
Old precedence was to favour ENV[key], then variables[key], then the default passed to fetch New precedence is variables[key], then default, then ENV[key] This fixes mina-deploy#414, in which rvm_path is overridden by the $rvm_path bash environment variable
Old precedence was to favour ENV[key], then variables[key], then the default passed to fetch New precedence is variables[key], then default, then ENV[key] This fixes mina-deploy#414, in which rvm_path is overridden by the $rvm_path bash environment variable
I see. i would rather leave it as env first because this way you can change settings from the command line. RVM is a bit of a specific situation. Usually environment variables are all UPCASE. Maybe the best solution would be to change the setting key to something diferent thant rvm_path |
I'm having a mind bending issue while testing a fork of mina-sidekiq. In their test_env file, I've added
require 'mina/rvm'
I'm using the 1.0.0.beta2 version of mina, and I can verify which code is running by adding puts statements in the gem code on my machine.
No matter where I put my call to
set :rvm_path, '$HOME/.rvm/scripts/rvm'
, it continually returns me a value of/Users/devin/.rvm
, which is an invalid rvm path. I've set it in the task, I've set it in config/deploy.rb, I've set it in the mina 1.0.0.beta2 local code, and I've even set it inside the code forrvm:use
. I literally wrote this code and it still happened:Hacking the local mina code again and changing it use a variable
:rvm_cool
instead of:rvm_path
resolves the issue. I'm at a loss as to why.Seeing as it does resolve the issue, though, I'm wondering if you guys have thoughts of how to fix this, and/or would like a pull request changing the rvm_path variable name. Let me know.
The text was updated successfully, but these errors were encountered: