rbenv: All rbenv commands yield "env: bash\r: No such file or directory"

All my rbenv calls comes back as bash\r: No such file or directory

See below for more info.

krirou@iHAL ~> rbenv --version
env: bash\r: No such file or directory
krirou@iHAL ~> which rbenv
/Users/krirou/.rbenv/bin/rbenv
krirou@iHAL ~/.rbenv (master) [141]> fish --version
fish, version 2.1.0
krirou@iHAL ~ [127]> cat .config/fish/config.fish 
set -x LC_CTYPE sv_SE.UTF-8
# https://github.com/sstephenson/rbenv/issues/459
set PATH $HOME/.rbenv/bin $PATH
status --is-interactive ; and source (rbenv init - | psub)
krirou@iHAL ~> cd .rbenv/
krirou@iHAL ~/.rbenv (master)> git status
# On branch master
nothing to commit, working directory clean
krirou@iHAL ~/.rbenv (master)> git log HEAD
commit 14bc162ca606e0c61da8d82e1b99b0946d7be13f
Merge: 6d0bf9b 1a6bada
Author: Mislav Marohnić <mislav.marohnic@gmail.com>
Date:   Thu Jan 2 22:44:19 2014 +0100

    Merge branch 'openbsd'

    Closes #524

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

krirou@iHAL ~ [255]> git config --global core.autocrlf false
krirou@iHAL ~> git config core.autocrlf
false
krirou@iHAL ~> git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
Cloning into '/Users/krirou/.rbenv'...
remote: Reusing existing pack: 1857, done.
remote: Total 1857 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1857/1857), 290.90 KiB | 354.00 KiB/s, done.
Resolving deltas: 100% (1162/1162), done.
Checking connectivity... done
krirou@iHAL ~> rbenv
rbenv 0.4.0-89-g14bc162
Usage: rbenv <command> [<args>]

Some useful rbenv commands are:
   commands    List all available rbenv commands
   local       Set or show the local application-specific Ruby version
   global      Set or show the global Ruby version
   shell       Set or show the shell-specific Ruby version
   install     Install a Ruby version using the ruby-build plugin
   uninstall   Uninstall a specific Ruby version
   rehash      Rehash rbenv shims (run this after installing executables)
   version     Show the current Ruby version and its origin
   versions    List all Ruby versions available to rbenv
   which       Display the full path to an executable
   whence      List all Ruby versions that contain the given executable

See `rbenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/sstephenson/rbenv#readme

Still think this is a bit odd though. I’m cloning on my mac; so line endings “should” be same right?

Interesting… Thanks!

Me neither. Might be a good idea to add a .gitattributes file to the root and set up

* text eol=lf

or such.

https://help.github.com/articles/dealing-with-line-endings That might prevent future problems.

Cheers and thx again for all the help!

These people say that setting git config core.autocrlf to false solves the problem (I guess you have to re-clone rbenv in order to apply it, as hinted in the second link)