Skip to content

Instantly share code, notes, and snippets.

@TvL2386
Created November 4, 2011 21:26
Show Gist options
  • Save TvL2386/1340527 to your computer and use it in GitHub Desktop.
Save TvL2386/1340527 to your computer and use it in GitHub Desktop.
rvm issue: Cannot select ruby-1.9.2-head-shay (patched ruby-1.9.2-head)
# Reproduction path:
# This was done on 2011-07-17
# Ubuntu 10.04 LTS x64
bash < <( curl https://rvm.beginrescueend.com/releases/rvm-install-head )
apt-get install build-essential bison openssl libreadline5 libreadline-dev curl git-core zlib1g zlib1g-dev libssl-dev vim libsqlite3-0 libsqlite3-dev sqlite3 libreadline-dev libxml2-dev git-core subversion autoconf
rvm version
# rvm 1.6.23 by Wayne E. Seguin ([email protected]) [https://rvm.beginrescueend.com/]
# patch included in gist
# this was the url: https://github.com/michaeledgar/ruby-patches/blob/master/1.9/optimized_require/by_xavier_shay.diff
rvm install 1.9.2-head --patch by_xavier_shay.diff -n shay
rvm --default use ruby-1.9.2-head-shay
rvm get latest
rvm version
# rvm 1.9.2 by Wayne E. Seguin ([email protected]) [https://rvm.beginrescueend.com/]
rvm reload
rvm install ruby-1.9.3-head
rvm list
#
# rvm rubies
#
# => ruby-1.9.2-head-shay [ x86_64 ]
# ruby-1.9.3-head [ x86_64 ]
rvm use ruby-1.9.3-head --default
# Using /usr/local/rvm/gems/ruby-1.9.3-head
rvm list
#
# rvm rubies
#
# ruby-1.9.2-head-shay [ x86_64 ]
# => ruby-1.9.3-head [ x86_64 ]
rvm use ruby-1.9.2-head-shay
# WARN: ruby ruby-1.9.2-head is not installed.
# To install do: 'rvm install ruby-1.9.2-head'
### NOW I'M STUCK! I could install ruby-1.9.2-head of course... but that's a workaround
# mpapis suggestion: change shay to xshay:
root@rails1:~/ruby1.9.2-patches# rvm install 1.9.2-head --patch by_xavier_shay.diff -n xshay
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.2-head-xshay, this may take a while depending on your cpu(s)...
ruby-1.9.2-head-xshay - #fetching
HEAD is now at 4197f33 merges r32345 from trunk into ruby_1_9_2.
From git://github.com/ruby/ruby
* branch ruby_1_9_2 -> FETCH_HEAD
Already up-to-date.
error: pathspec 'hay' did not match any file(s) known to git.
ERROR: There has been an error while trying to checkout the source branch.
Halting the installation.
ERROR: There has been an error fetching the ruby interpreter. Halting the installation.
### REPLACING INSTALL WITH REINSTALL
root@rails1:~/ruby1.9.2-patches# rvm reinstall 1.9.2-head --patch by_xavier_shay.diff -n xshay
it seems that /usr/local/rvm/src/ruby-1.9.2-head-xshay is already non existent.
it seems that /usr/local/rvm/rubies/ruby-1.9.2-head-xshay is already non existent.
Removing ruby-1.9.2-head-xshay aliases...
Removing ruby-1.9.2-head-xshay wrappers...
Removing ruby-1.9.2-head-xshay environments...
Removing ruby-1.9.2-head-xshay binaries...
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.2-head-xshay, this may take a while depending on your cpu(s)...
ruby-1.9.2-head-xshay - #fetching
HEAD is now at 4197f33 merges r32345 from trunk into ruby_1_9_2.
From git://github.com/ruby/ruby
* branch ruby_1_9_2 -> FETCH_HEAD
Already up-to-date.
error: pathspec 'hay' did not match any file(s) known to git.
ERROR: There has been an error while trying to checkout the source branch.
Halting the installation.
ERROR: There has been an error fetching the ruby interpreter. Halting the installation.
#
root@rails1:~/ruby1.9.2-patches# env | grep ^rvm
rvm_dump_environment_flag=0
rvm_bin_path=/usr/local/rvm/bin
rvm_clang_flag=0
rvm_verbose_flag=0
rvm_path=/usr/local/rvm
rvm_debug_flag=0
rvm_prefix=/usr/local
rvm_patch_original_pwd=/root/ruby1.9.2-patches
rvm_ruby_sha=shay
rvm_version=1.9.2
rvm_reload_flag=0
#########
root@rails1:~/ruby1.9.2-patches# rvm reinstall 1.9.2-head --patch by_xavier_shay.diff -n xshay
it seems that /usr/local/rvm/src/ruby-1.9.2-head-xshay is already non existent.
it seems that /usr/local/rvm/rubies/ruby-1.9.2-head-xshay is already non existent.
Removing ruby-1.9.2-head-xshay aliases...
Removing ruby-1.9.2-head-xshay wrappers...
Removing ruby-1.9.2-head-xshay environments...
Removing ruby-1.9.2-head-xshay binaries...
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.2-head-xshay, this may take a while depending on your cpu(s)...
ruby-1.9.2-head-xshay - #fetching
HEAD is now at 4197f33 merges r32345 from trunk into ruby_1_9_2.
From git://github.com/ruby/ruby
* branch ruby_1_9_2 -> FETCH_HEAD
Already up-to-date.
Copying from repo to src path...
Applying patch 'by_xavier_shay.diff' (located at /root/ruby1.9.2-patches/by_xavier_shay.diff)
ERROR: Error running 'patch -F25 -p1 -f <"/root/ruby1.9.2-patches/by_xavier_shay.diff"', please read /usr/local/rvm/log/ruby-1.9.2-head-xshay/patch.apply.by_xavier_shay.diff.log
Running autoreconf
Fetching yaml-0.1.4.tar.gz to /usr/local/rvm/archives
Extracting yaml-0.1.4.tar.gz to /usr/local/rvm/src
Configuring yaml in /usr/local/rvm/src/yaml-0.1.4.
Compiling yaml in /usr/local/rvm/src/yaml-0.1.4.
ERROR: Error running 'make ', please read /usr/local/rvm/log/ruby-1.9.2-head-xshay/yaml/make.log
Installing yaml to /usr/local/rvm/usr
ERROR: Error running 'make install', please read /usr/local/rvm/log/ruby-1.9.2-head-xshay/yaml/make.install.log
ruby-1.9.2-head-xshay - #configuring
ruby-1.9.2-head-xshay - #compiling
ERROR: Error running 'make ', please read /usr/local/rvm/log/ruby-1.9.2-head-xshay/make.log
ERROR: There has been an error while running make. Halting the installation.
#######
root@rails1:~/ruby1.9.2-patches# cat /usr/local/rvm/log/ruby-1.9.2-head-xshay/patch.apply.by_xavier_shay.diff.log
[2011-11-04 22:52:09] patch -F25 -p1 -f <"/root/ruby1.9.2-patches/by_xavier_shay.diff"
patching file array.c
patching file enc/make_encmake.rb
patching file enumerator.c
patching file ext/extmk.rb
patching file file.c
patching file lib/enumerator.rb
patching file load.c
Hunk #3 FAILED at 145.
Hunk #4 succeeded at 492 (offset 3 lines).
Hunk #5 succeeded at 504 (offset 3 lines).
Hunk #6 succeeded at 520 (offset 3 lines).
Hunk #7 succeeded at 612 (offset 3 lines).
Hunk #8 succeeded at 1088 (offset 3 lines).
Hunk #9 succeeded at 1100 (offset 3 lines).
Hunk #10 succeeded at 1112 (offset 3 lines).
1 out of 10 hunks FAILED -- saving rejects to file load.c.rej
patching file test/ruby/test_require.rb
patching file variable.c
Hunk #2 succeeded at 1482 (offset 1 line).
Hunk #3 succeeded at 1515 (offset 1 line).
patching file vm.c
patching file vm_core.h
############
root@rails1:~/ruby1.9.2-patches# rvm reinstall 1.9.2-head -n xshay
it seems that /usr/local/rvm/src/ruby-1.9.2-head-xshay is already non existent.
it seems that /usr/local/rvm/rubies/ruby-1.9.2-head-xshay is already non existent.
Removing ruby-1.9.2-head-xshay aliases...
Removing ruby-1.9.2-head-xshay wrappers...
Removing ruby-1.9.2-head-xshay environments...
Removing ruby-1.9.2-head-xshay binaries...
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.2-head-xshay, this may take a while depending on your cpu(s)...
ruby-1.9.2-head-xshay - #fetching
HEAD is now at 4197f33 merges r32345 from trunk into ruby_1_9_2.
From git://github.com/ruby/ruby
* branch ruby_1_9_2 -> FETCH_HEAD
Already up-to-date.
Copying from repo to src path...
Running autoreconf
Fetching yaml-0.1.4.tar.gz to /usr/local/rvm/archives
Extracting yaml-0.1.4.tar.gz to /usr/local/rvm/src
Configuring yaml in /usr/local/rvm/src/yaml-0.1.4.
Compiling yaml in /usr/local/rvm/src/yaml-0.1.4.
ERROR: Error running 'make ', please read /usr/local/rvm/log/ruby-1.9.2-head-xshay/yaml/make.log
Installing yaml to /usr/local/rvm/usr
ERROR: Error running 'make install', please read /usr/local/rvm/log/ruby-1.9.2-head-xshay/yaml/make.install.log
ruby-1.9.2-head-xshay - #configuring
ruby-1.9.2-head-xshay - #compiling
ruby-1.9.2-head-xshay - #installing
Removing old Rubygems files...
Installing rubygems-1.8.10 for ruby-1.9.2-head-xshay ...
Installation of rubygems completed successfully.
ruby-1.9.2-head-xshay - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.2-head-xshay - #importing default gemsets (/usr/local/rvm/gemsets/)
Install of ruby-1.9.2-head-xshay - #complete
root@rails1:~/ruby1.9.2-patches# rvm list
rvm rubies
ruby-1.9.2-head-shay [ x86_64 ]
ruby-1.9.2-head-xshay [ x86_64 ]
ruby-1.9.3-head [ x86_64 ]
root@rails1:~/ruby1.9.2-patches# rvm use ruby-1.9.2-head-xshay
Using /usr/local/rvm/gems/ruby-1.9.2-head-xshay
root@rails1:~/ruby1.9.2-patches# rvm use ruby-1.9.3-head
Using /usr/local/rvm/gems/ruby-1.9.3-head
root@rails1:~/ruby1.9.2-patches# rvm use ruby-1.9.2-head-xshay
Using /usr/local/rvm/gems/ruby-1.9.2-head-xshay
root@rails1:~/ruby1.9.2-patches# rvm use ruby-1.9.2-head-shay
WARN: ruby ruby-1.9.2-head is not installed.
To install do: 'rvm install ruby-1.9.2-head'
root@rails1:~/ruby1.9.2-patches# rvm use ruby-1.9.2-head-xshay
Using /usr/local/rvm/gems/ruby-1.9.2-head-xshay
root@rails1:~/ruby1.9.2-patches#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment