Closed HappyEmu closed 7 years ago
I managed to reproduce it.
Have a logical error in my code. Will try to fix it.
@d4be4st so how to deal with this error? I looks like in all these tasks the environment task is not invoked.
Encountered the same error here. mina console
used to depend on the environment
task back in 0.3.8, but not anymore in 1.0.3. It definitely should depend on the 'environment' task.
Created #492 to address this
Is it ok that environment would be invoked twice, in Mina::DSL.run and in run_commands task?
You are correct @molfar
Need to add some specs to this but #aaf50c5 should fix this
That does not seems to fix (for me at least). I use rbenv and my gems shims are not anywhere in my $PATH
, so I have to force it in :environment
task
task :environment do
invoke 'rbenv:load'
command %[ export PATH="$PATH:$HOME/.rbenv/shims" ]
end
if I override default console task by prepending environment load, my rails console task works:
task console: :environment do
set :execution_mode, :exec
in_path fetch(:current_path).to_s do
command %{#{fetch(:rails)} console}
end
end
But when I quit the console, another one is launched... o_O
Mina 1.0.6 with rbenv still not working... bash: bundle: command not found It looks like bug is not really fixed yet
This is still there.
task :run_commands do
if commands.run_default?
invoke :environment
commands.run(:remote)
end
end
It appears that commands.run(:remote)
happens before invoke :environment
. I'm still figuring out why.
UPDATE: now I get what this means and why this is wrong:
The invoke
here: put this task in the queue
The :run_commands
task: comes after everything else.
Therefore this is merely appending the :environment
tasks after everything else, which is, too late.
Happy New Year!
And... any updates on this?
@xikaos 1.0.6 not work's for me
Hi. I have same problem on my vagrant Ubuntu machine ().
vagrant@vagrant-ubuntu-uidis:/data/form-builder-rails-mina$ mina -V
Mina, version v1.0.6
vagrant@vagrant-ubuntu-uidis:/data/form-builder-rails-mina$ mina console
vagrant@localhost's password:
bundler: command not found: rails
Install missing gem executables with `bundle install`
-----> Loading rbenv
Connection to localhost closed.
having same issue
@d4be4st Could we reopen this issue? Seems like the bug still persists.
I having same issue. mina 1.0.6 with rbenv
I gave up on mina console
-ing, I just ssh to my server and bundle exec rails console
now. :-/
Having same issue.
mina 1.0.6 with rvm.
Currently I just add the below codes in config/deploy.rb
and it seems it successfully inject the dependence :enviroment
and avoid launching the console twice mentioned by @bobmaerten.
# Fix https://github.com/mina-deploy/mina/issues/476
task :console => :environment do
end
@Martin288 or just
task console: :environment
I think everything should work out of the box, without any manipulations
@shvetsov right, you can omit the empty block. @molfar so do I.
Create #551 to fix this.
Hi
I am using Mina version 1.0.3 in a Rails project. When I try to connect to the production console using
mina console
I get the following error:bash: bundle: command not found
. I'm using rbenv on the server where the app is deployed, the:environment
task looks as follows:While
mina ssh
,mina log
andmina deploy
work flawlessly,mina console
,mina rake
and the likes all produce the above mentioned error.Am I doing something wrong or is this a bug?