8
votes

I have been trying to install Ruby 1.9.2-head using RVM, but have been getting this error message:

echo executable host ruby is required

Is it compulsory to have system Ruby in order to install Ruby through RVM?

I have all the dependencies given in rvm notes, but I do not have any system Ruby installed. The error log shows:

[2011-05-02 07:42:19] make 
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC -I. -I.ext/include/i686-linux -I./include -I. -DRUBY_EXPORT   -o main.o -c main.c
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC -I. -I.ext/include/i686-linux -I./include -I. -DRUBY_EXPORT   -o dln.o -c dln.c
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC -I. -I.ext/include/i686-linux -I./include -I. -DRUBY_EXPORT   -o dmydln.o -c dmydln.c
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC -I. -I.ext/include/i686-linux -I./include -I. -DRUBY_EXPORT   -o dmyencoding.o -c dmyencoding.c
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC -I. -I.ext/include/i686-linux -I./include -I. -DRUBY_EXPORT   -o version.o -c version.c
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC -I. -I.ext/include/i686-linux -I./include -I. -DRUBY_EXPORT   -o dmyversion.o -c dmyversion.c
echo executable host ruby is required.  use --with-baseruby option.; false -I. ./tool/compile_prelude.rb ./prelude.rb miniprelude.c
executable host ruby is required. use --with-baseruby option.
make: *** [miniprelude.c] Error 1
2
It looks like you're on Linux. Ruby isn't installed by default on Linux, so it shouldn't be a prerequisite.the Tin Man
I confirmed that Ruby isn't a prerequisite by creating a new Linux Mint guest in VirtualBox, and installed RVM. It created the ~/.rvm directory correctly.the Tin Man

2 Answers

6
votes

rvm notes also says

To install Ruby 1.9.2 you need to have Ruby 1.8.7 installed and set.

So, install Ruby 1.8.7, load it to the environment and install ruby 1.9.2

rvm install ruby-1.8.7-head
rvm use ruby-1.8.7-head
rvm install ruby-1.9.2-head

This solution has been tested.

1
votes

You don't have to have a system Ruby, so long as you've installed another Ruby (probably Ruby MRI 1.8) through RVM.

Thankfully, Ruby 1.8 doesn't require you have Ruby installed, so you don't have a bootstrapping problem.