Bug #9339

Can't Compile Ruby 2.1 without baseruby (Win7, MSYS/MinGW)

Added by ntor (Peter Wildemann) over 6 years ago. Updated about 1 year ago.

Target version:
ruby -v:


On my Win7 System in an MSYS/MinGW-environment (more precisely the 'mingw-builds' version) I have been trying to compile Ruby 2.1 from source.
I unpacked and entered:

configure --prefix=/c/path/to/my/ruby/install

The first ran well, the second aborted with the error message:

generating miniprelude.c
executable host ruby is required. use --with-baseruby option. recipe for target `miniprelude.c' failed
make: *** [miniprelude.c] Error 1"

I tried the same for Ruby 2.0. Here the same proedure runs fine.

Updated by luislavena (Luis Lavena) over 6 years ago

  • Status changed from Open to Feedback


Even that you're using MSYS bash and make to trigger the compilation process, please use Windows-style paths for the installation directory.

configure --prefix=C:/some/folder

Depending on the way the source code was extracted, timestamps might trigger the need to rebuild the files that a base Ruby is required for compilation.

I recommend you install an existing binary of Ruby to be used when building.

Last but not least, RubyInstaller already packages lot of these steps to automate and build Ruby 2.0 and 2.1, please take a look to the recipes:

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

If you want to extract from a tarball, you need 'p' option.

I recommend not to include drive letter and even use of environment dependent path.
As windows binaries are always relocatable, I configure with --prefix=/. and use DESTDIR at the installation, instead.


Updated by jeremyevans0 (Jeremy Evans) about 1 year ago

  • Backport deleted (1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN)
  • Status changed from Feedback to Closed

Also available in: Atom PDF