Skip to content

Instantly share code, notes, and snippets.

@george
Created February 9, 2010 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save george/299654 to your computer and use it in GitHub Desktop.
Save george/299654 to your computer and use it in GitHub Desktop.
# installing RVM per http://rvm.beginrescueend.com/install/ from the github repository
# on a fresh Snow Leopard install (updated): OSX 10.6.2
new-host:~ george$ mkdir -p ~/.rvm/src/
new-host:~ george$ cd ~/.rvm/src
new-host:src george$ rm -rf ./rvm/
new-host:src george$ git clone git://github.com/wayneeseguin/rvm.git
Initialized empty Git repository in /Users/george/.rvm/src/rvm/.git/
remote: Counting objects: 8977, done.
remote: Compressing objects: 100% (2504/2504), done.
remote: Total 8977 (delta 5718), reused 8325 (delta 5265)
Receiving objects: 100% (8977/8977), 1.31 MiB | 1.13 MiB/s, done.
Resolving deltas: 100% (5718/5718), done.
new-host:src george$ cd rvm
new-host:rvm george$ ./install
env: bash\r: No such file or directory
# It's choking on the shebang line in ./install:
#!/usr/bin/env bash
# But...
new-host:rvm george$ which env
/usr/bin/env
new-host:rvm george$ which bash
/bin/bash
# If I change the shebang line in ./install to:
#!/bin/bash
# ... I get:
new-host:rvm george$ ./install
-bash: ./install: /bin/bash^M: bad interpreter: No such file or directory
# Interestingly, if I run `/usr/bin/env bash` in bash, it works. To wit:
new-host:rvm george$ /usr/bin/env bash
bash-3.2$ exit
exit
new-host:rvm george$
# ... so it seems as if it *should* work. I know this likely is not an RVM issue,
# but any hints/direction/nudges would be greatly appreciated. Thx.
# other details
new-host:rvm george$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0]
new-host:rvm george$ git --version
git version 1.6.6.1
new-host:rvm george$ bash --version
GNU bash, version 3.2.48(1)-release (i386-apple-darwin10.0)
Copyright (C) 2007 Free Software Foundation, Inc.
@fernandezpablo85
Copy link

Hey to solve this you need to change core.autocrlf to false on your gitconfig file

Cheers!

@george
Copy link
Author

george commented May 23, 2011

@fernandezpablo85: I don't remember how I addressed this issue, but thanks for tracking down the fix!

/g

@george
Copy link
Author

george commented May 23, 2011 via email

@fernandezpablo85
Copy link

Don't mention it.

I actually had the same issue, and strangely your gist ranks pretty high on the google search for the problem.

@george
Copy link
Author

george commented May 23, 2011 via email

@benwoodward
Copy link

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment