Git Product home page Git Product logo

Comments (4)

ydkn avatar ydkn commented on May 24, 2024

I have feared this could happen in some situations... when I introduced the check.

Can you please give me the output/commands that are running to check if there is a rails binary (right before the error)
In my case (with rvm and bundler) it's:

DEBUG [5360e6b7] Running /usr/local/rvm/bin/rvm default do which rails as deploy@foo
DEBUG [5360e6b7] Command: cd /foo/current && /usr/local/rvm/bin/rvm default do bundle exec which rails

from capistrano-rails-console.

kentaroi avatar kentaroi commented on May 24, 2024

This is the output:

DEBUG [3c230cc7] Running bundle exec which rails as [email protected]
DEBUG [3c230cc7] Command: cd /home/kentaroi/apps/a_radio/current && ( RBENV_ROOT=~/.rbenv RBENV_VERSION=2.2.1 bundle exec which rails )
DEBUG [3c230cc7]        bash: bundle: command not found
DEBUG [3c230cc7] Finished in 0.108 seconds with exit status 127 (failed).
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: Rails binary not found!

Rails binary not found!

Your comment reminds me of a PATH setting for rbenv.
I had placed following rbenv initialization code in .bash_profile according to the rbenv README.

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

I moved the above code from .bash_profile to the top of .bashrc, then rails:console task works perfectly.

This issue might be a rbenv environment problem or just my fault (my server is Debian and I might have to follow the instruction for Ubuntu Desktop).

However, everything works fine without the above fix except the check.

Thank you

from capistrano-rails-console.

ydkn avatar ydkn commented on May 24, 2024

I added the binary check only because I need to issue an remote command so the sshkit host is initialized correctly...
And instead of just doing something useless I added the check, but that was maybe a bit too optimistic...
so instead of checking if the rails binary could be found I switched to something useless (just executing 'true')

Can you please check if d19c32f works with your old environment?

from capistrano-rails-console.

kentaroi avatar kentaroi commented on May 24, 2024

Yes, d19c32f works with my old environment.

Thank you very much, @ydkn

from capistrano-rails-console.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.