Trouble installing Ruby with RVM on Cygwin -
i'm on windows , have ruby v2.1.5 came railsinstaller. however, need downgrade 2.1.1 project , i'm not sure how to.
i have installed rvm on cygwin , i'm getting these problems when trying execute rvm install 2.1.1
searching binary rubies, might take time. no binary rubies available for: cygwin/unknown/x86_64/ruby-2.1.1. continuing compilation. please read 'rvm mount' more information on binary rubies. and
checking requirements cygwin. installing requirements cygwin. updating system. installing required packages: mingw64-i686-gcc, mingw64-x86_64-gcc. requirements installation successful. installing ruby source to: /home/k/.rvm/rubies/ruby-2.1.1, may take while depending on cpu(s)... ruby-2.1.1 - #downloading ruby-2.1.1, may take while depending on connection... ruby-2.1.1 - #extracting ruby-2.1.1 /home/k/.rvm/src/ruby-2.1.1.... ruby-2.1.1 - #applying patch /home/k/.rvm/patches/ruby/2.1.1/libyaml.patch. ruby-2.1.1 - #applying patch /home/k/.rvm/patches/ruby/changeset_r45225.diff. ruby-2.1.1 - #applying patch /home/k/.rvm/patches/ruby/changeset_r45240.diff. ruby-2.1.1 - #configuring.................................................... ruby-2.1.1 - #post-configuration.. ruby-2.1.1 - #compiling.................................................... error running '__rvm_make -j4', showing last 15 lines of /home/k/.rvm/log/1433355357_ruby-2.1.1/make.log make[2]: leaving directory '/home/k/.rvm/src/ruby-2.1.1/ext/-test-/printf' exts.mk:109: recipe target 'ext/-test-/printf/all' failed make[1]: *** [ext/-test-/printf/all] error 2 make[1]: *** waiting unfinished jobs.... installing default rational libraries installing default recursion libraries make[2]: leaving directory '/home/k/.rvm/src/ruby-2.1.1/ext/-test-/postponed_job' linking shared-object -test-/rational.so linking shared-object -test-/recursion.so make[2]: leaving directory '/home/k/.rvm/src/ruby-2.1.1/ext/-test-/recursion' make[2]: leaving directory '/home/k/.rvm/src/ruby-2.1.1/ext/-test-/rational' make[1]: leaving directory '/home/k/.rvm/src/ruby-2.1.1' uncommon.mk:180: recipe target 'build-ext' failed make: *** [build-ext] error 2 ++ return 2 there has been error while running make. halting installation. any appreciated. thanks
you need patch ruby soure code compile on cygwin. thankfully rvm supports patches out of box!
create file called cygwin.patch following content:
--- /ext/-test-/printf/printf.c 2014-06-29 10:17:20.000000000 -0700 +++ /ext/-test-/printf/printf.c 2015-07-08 16:58:15.882479100 -0700 @@ -1,3 +1,4 @@ +#define __strict_ansi__ /* avoid conflicting utoa */ #include <ruby.h> #include <ruby/encoding.h> and execute rvm --patch parameter shown below:
rvm install 2.2-head --patch cygwin.patch
Comments
Post a Comment