Create a gist now

Instantly share code, notes, and snippets.

> rvm install ruby-1.9.2-p180 --patch /tmp/load.patch -n patched
Installing Ruby from source to: /Users/mperham/.rvm/rubies/ruby-1.9.2-p180-patched, this may take a while depending on your cpu(s)...
ruby-1.9.2-p180-patched - #fetching
ruby-1.9.2-p180-patched - #downloading ruby-1.9.2-p180, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8609k 100 8609k 0 0 138k 0 0:01:02 0:01:02 --:--:-- 262k
ruby-1.9.2-p180-patched - #extracted to /Users/mperham/.rvm/src/ruby-1.9.2-p180-patched (already extracted)
Applying patch '/tmp/load.patch' (located at //tmp/load.patch)
ERROR: Error running 'patch -F25 -p1 -f <"//tmp/load.patch"', please read /Users/mperham/.rvm/log/ruby-1.9.2-p180-patched/patch.apply.load.patch.log
Fetching yaml-0.1.3.tar.gz to /Users/mperham/.rvm/archives
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 455k 100 455k 0 0 244k 0 0:00:01 0:00:01 --:--:-- 893k
Extracting yaml-0.1.3.tar.gz to /Users/mperham/.rvm/src
> more /Users/mperham/.rvm/log/ruby-1.9.2-p180-patched/patch.apply.load.patch.log
[2011-06-07 20:00:21] patch -F25 -p1 -f <"//tmp/load.patch"
patching file load.c
Hunk #1 FAILED at 40.
Hunk #2 FAILED at 73.
2 out of 2 hunks FAILED -- saving rejects to file load.c.rej

I get this too


Same here


hi @drnic, @oreoshake, If you already have p180 installed you can try applying the patch directly to your source.

Take the first revision I created of the patch e.g. the one without the leading a/ and b/

cd .rvm/src/ruby-1.9.2-p180/ && patch -p0 < ~/load.patch

assuming load.patch is in your $HOME and you've removed the leading a/, b/ this whole process will take even less time because you're just recompiling the one file...

make && make install


I think Mike said that he just tried it all again and.. it worked second time.

I'm wondering if GitHub doles out a dodgy file or redirect the first time you request that URL? Make sure to check that /tmp/load.patch looks sane.


That said, I ran it on three machines (two OS X + one Ubuntu) and didn't have any issues, but still..


I get that error too and I had to remove the previous patched version to work

rvm remove ruby-1.9.2-p180-patched

and then start over


Tried to install several times, it gives me the following when I call "rake -T"

/Users/me/.rvm/gems/ruby-1.9.2-p180-patched@rails3.0.x/gems/sqlite3-1.3.3/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]

it's causing sqlite to fail.


I ran into this problem, too. The fix is to run "rvm cleanup all" before trying to install. My theory is that the patch is applied into the source directly, and then kept there, so any repeat attempts to install ruby with a patch will be patching an already-patched version and... KABOOM


i got the same but rvm cleanup all solved the error

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