Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Herman verschooten's Profile

GitHub User: Hermanverschooten

Comments by Herman verschooten

Avatar

If you are using these recipes and get an error on

run %q{eval "$(rbenv init -)"}

executing "eval \"$(rbenv init -)\"" servers: ["ip_removed"] [ip_removed] executing command ** 
[out :: ip_removed] sh: 2: /home/deployer/.rbenv/libexec/../completions/rbenv.bash: ** 
[out :: ip_removed] Syntax error: "(" unexpected (expecting "}") ** 
[out :: ip_removed] command finished in 427ms failed: "sh -c 'eval \"$(rbenv init -)\"'" on ip_removed

You can just remove that line and replace the PATH line above with:

run %q{export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"}

See:
Syntax error running rbenv init
and
Running rbenv from capistrano

Avatar

I just ran into this problem again..

I ended up changing the script in recipes/rbenv.rb, the line that runs the bootstrap to:

run %q{sed "s/sudo/sudo -p 'sudo password: '/g" $HOME/.rbenv/plugins/rbenv-installer/bin/rbenv-} + rbenv_bootstrap + " | bash"

I change the sudo to the format capistrano wants and run it through bash.

Avatar

I have the same issue, couldn't resolve it.
So I ran the command manually and commented it out.