-
Notifications
You must be signed in to change notification settings - Fork 492
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
working with rbenv/rvm etc? #5
Comments
Hmm. I'll issue a fix to make bash commands read You're correct that each queued deploy command is executed in it's own subshell, you can try to do task :deploy do
queue "export ..."
deploy do
# ...
# deploy stuff here
end
end ..and it will be invoked outside the deploy script (not in a subshell). |
Sounds good -- thanks! Adding the |
v0.1.2 should now honor .bashrc by default. I've also introduced a relevant setting I'd like to implement better RVM integration in the future. The example @ledbettj cited was for rbenv (which by the way, will not be needed in 0.1.2+), but for RVM it's |
@ledbettj |
Putting
Would of course be nice to have this integrated in Mina, but not sure how hard it'd be seeing as you have different kinds of installs (user/system-wide) - not sure if there is a universal way of loading it in. But, sourcing it yourself from the |
@meskyanichi thanks for the comment there, fixed my issues. Would be nice if mina supported rvm like capistrano does. Keep up the good work! |
@ianmurrays no prob! |
I really love mina.....it is super fast and super simple but my rvm path is "/usr/local/rvm/bin" i have added the below lines to ~/.bashrc |
@perumal Mina opens up a pseudo-tty connection ( |
The above problem disappeared after tweaking around but i got the following error
But when executed as 'root'
This is part of my deploy.rb code
|
Assuming you setup your box as most people do, you won't be able to ssh in directly as root (nor should you or even need to). So that second response isn't a big deal. Anyhow, can can you scrub out any private details (if you have any in there) from your dotfiles (really just You really shouldn't have to worry about invoking environment details like that from your scripts -- it can be bad enough in general, but it gets really untenable when you're dealing with a team and/or multiple servers. |
Hi bluestrike, sorry to ask this basic question but I am not an expert in ubuntu i am getting this following error
|
@perumal if you want to execute your bashrc, try But @bluestrike2 is looking for you to paste the contents of the file to him (ie, open it in a text editor and copying the contents to http://gist.github.com). Be use to scrub any personal details if any, like he said. |
Anyway: I've ran into a similar problem before, and I would venture to guess this is a multi-user RVM installation. Did you install RVM with If so, you're running a multi-user, system-wide RVM installation. The best solution probably is to load the RVM environment manually: task :env do
queue %{
echo "-----> Loading environment"
#{echo_cmd %[source "/usr/local/rvm/environments/ruby-1.9.3-p135@gemset"]}
}
end Please ignore this advice if you're not using a multi-user RVM installation. |
Hi rstacruz, You are right, I am using multi-user RVM installation I confirmed this by running the following command But when i tired your above task :env code i got this error Here is my deploy.rb code my $rvm info command shows following information
|
Also Please guide me on how to avoid multi-user RVM installation. |
Change the: |
Am I missing something crucial here? @rstacruz implemented the ability to define bash options through Although this setting is applied, executing
How come the shell executed isn't running interactively as one would expect? I probably missing something here, so I would love if someone could clarify this issue. |
@KevinSjoberg The easy fix now is to put the RVM invocation in your |
Anyway, reopening because I want explicit rbenv/rvm support implemented. This is a common hurdle people are running into and I want the experience to be as smooth as possible. |
+1 for reopening this issue. |
See mina-deploy/mina#5, mina-deploy/mina#39, mina-deploy/mina#27, among others.
http://nadarei.co/mina/docs/lib/mina/rbenv.html http://nadarei.co/mina/docs/lib/mina/rvm.html In there in v0.2.1. Hooray! |
Still don't works! |
Same problem ... If I uncomment the line
i.e. rbenv is installed and working... But if I leave the line commented (i.e. If I log in into the Vagrant box and execute the
|
Similar problem, in Ubuntu 12.04... # ruby.deploy
...
require 'mina/rbenv'
...
task :environment do
invoke :'rbenv:load'
end
... ...results in the following failure:
Whereas, logged in as the same user, I can succeed in executing the problematic command manually:
|
Try changing the SSH user shell to bash
|
Still a problem here! Ubuntu 14. |
Hi there, I just started using Mina, and I'm not using rbenv nor RVM at the moment. I believe there has been some kind of regression here because I have the same initial problem of this thread: my bashrc is not taken into account. The export clauses fixed it aswell. Thanks! Edit: Not loading etc/profile either. |
Hi,
I'm trying to deploy to a server where ruby is installed using
rbenv
for the deploy user. However, mina doesn't seem to pick it up:I'm never sure which init file gets run on ssh login -- I tried adding the required
export PATH=...
statements to.bashrc
,.bash_profile
, and.profile
none of which seemed to help. I also tried setting up thePATH
manually in the deploy task:without success (I assume each task runs in a subshell maybe?)
Any advice on how to get this setup working?
Thanks!
The text was updated successfully, but these errors were encountered: