Ruby installation problems #93

Open
jamiees2 opened this Issue May 14, 2014 · 42 comments

Projects

None yet
@jamiees2

I have been attempting to install ruby for a while now. Neither RVM or Rbenv seem to actually be able to build ruby under this shell. RVM complains that it cannot find setup-x64.exe, and rbenv just seems to hang and spit out no useful error. I am attempting to install ruby 2.1.1.

@jamiees2

I should note that i have installed mingw-i686-gcc-g++, and other dependencies.

@jamiees2

Scratch that, rbenv managed to install after a while. However, i am leaving this open due to the rvm issue. The errors are caused here: https://github.com/wayneeseguin/rvm/blob/master/scripts/functions/requirements/cygwin#L10-L19. and here: https://github.com/wayneeseguin/rvm/blob/a8542c174a8f0dcd6e96bdf0e174c2dba57f5303/scripts/functions/utility_system#L410

@tombujok
Contributor

Keep fighting plz, ruby users will appreciate it!

@jamiees2

Haha, thanks. I managed to install it, but gem kept complaining about child_info_fork. The solution listed here worked for me: http://www.kopfnickerchen.de/articles/2013-08-02-cygwin-ruby-rbenv-remap-errors.html , for future reference. Now im trying to figure out why rails coffeescript seems to have turned into chinese characters...

@tombujok
Contributor

Awesome! Would be great to have a fully working ruby solution - there's a couple of ruby users out there :)
Could you document afterwards what you did to install rvm and ruby?

@tombujok tombujok added the feedback label May 15, 2014
@jamiees2

Sure!
I definitely agree, this is actually the least pain i have had to go through to install ruby on windows 😆 .
To start, i followed the rbenv install instructions found here: https://github.com/sstephenson/rbenv#installation
, along with ruby-build here:
https://github.com/sstephenson/ruby-build#readme

Then i ran rbenv install 2.1.1, which just takes a really long time to run.

At this point i had ruby installed, and then i needed to apply the fix mentioned in the previous comment.

Now im trying to install node, which seems to have compile errors for some reason :(.

I can add this to the wiki once i have solved all of this, although no promises that it will be soon.

@tombujok
Contributor

perfect! step by step forward
It took me a couple of months to develope babun - but the idea is that once you go through such a pain in the neck (like with ruby) thousands of people will profit from it.
I am totally delighted with how the community reacted! kudos to everybody 👍

@tombujok
Contributor

BTW, "pact install ruby" is of no good?

@jamiees2

It would be, if the package repos were updated. It contains only ruby 1.9.3 atm.

@xjlin0
Contributor
xjlin0 commented Sep 25, 2014

Just my personal interesting observation here:

Happily found Babun, downloaded 1.0.1 &installed it. After typing "pact install ruby" in Babun shell as FAQ listed, the default installed Ruby version was ruby 1.9.3p545 (2014-02-24), as expected. (And you got Rails 4.0.10 if typing "pact install ruby-rails")

Because I prefer color syntax highlighting in irb, I then typed "gem install irbtools" in Babun shell to install irbtools and add "require 'irbtools'" in ~/.irbrc

(you can also install RVM by typing "curl -sSL https://get.rvm.io | bash -s stable" after typing "pact install getent")

Guess what? the Ruby version became ruby 2.0.0p576 (2014-09-19)! However, rails still complained cannot find 'railties', so I typed the following commands in Babun shell to install rails

gem install rails

Rails 4.1.6 installed after long waiting! Just 3 lines of commands, plus easy installation of mysql, ruby-mysql2, libmysqlclient-devel and ImageMagick by pact install, totally fall in love here. What a painless Ruby/RoR installation on Windows! Kudos to everybody here!

ps. To reconfirm It works, I followed cygwin-ports blog by testing commands below in Babun (be sure to gem install spring and jbuilder first) and http://localhost:3000/

rails new testapp1 --skip-bundle
cd testapp1
bundle install --local
rails server

=> Booting WEBrick
=> Rails 4.1.6 application starting in development on http://0.0.0.0:3000
=> Run rails server -h for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
[2014-10-26 11:13:35] INFO WEBrick 1.3.1
[2014-10-26 11:13:35] INFO ruby 2.0.0 (2014-09-19) [i386-cygwin]
[2014-10-26 11:13:35] INFO WEBrick::HTTPServer#start: pid=4608 port=3000

Started GET "/" for 127.0.0.1 at 2014-10-26 11:13:40 -0700
Processing by Rails::WelcomeController#index as HTML
Rendered /home/xjlin0/.gem/ruby/gems/railties-4.1.6/lib/rails/templates/rails/welcome/index.html.erb (32.0ms)
Completed 200 OK in 314ms (Views: 233.0ms | ActiveRecord: 0.0ms)

@xjlin0
Contributor
xjlin0 commented Dec 2, 2014

In case you wonder how to install the different version of Ruby, here is my log of trying installing Ruby 2.1.5 by RVM:

rvm install ruby-2.1.5
Error running 'requirements_cygwin_libs_install patch libyaml-devel libtool bison mingw64-i686-gcc mingw64-x86_64-gcc patch',
showing last 15 lines of /home/j/.rvm/log/1417539351_ruby-2.1.5/package_install_patch_libyaml-devel_libtool_bison_mingw64-i686-gcc_mingw64-x86_64-gcc_patch.log

OK it complained missing something, so I install what's missing by direct copying what's missed in the error message. If your error message contains more package names, please also include them after the pact install command too.

pact install patch libyaml-devel libtool bison mingw64-i686-gcc mingw64-x86_64-gcc patch
rvm get head
rvm install ruby-2.1.5
bash --login
rvm use ruby-2.1.5

The new Ruby 2.1.5 is ready to rock! (but my irbtools was unable to be loaded under 2.1.5)

@nemilya
nemilya commented Dec 29, 2014

There is problem in RVM install now:

{ ~ }  » curl -sSL https://get.rvm.io | bash -s stable                                        ~ 2
Downloading https://github.com/wayneeseguin/rvm/archive/1.26.7.tar.gz
Downloading https://github.com/wayneeseguin/rvm/releases/download/1.26.7/1.26.7.tar.gz.asc
gpg: can't open `/home/User/.rvm/archives/rvm-1.26.7.tgz.asc'
gpg: verify signatures failed: file open error
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found.
Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).

GPG signature verification failed for '/home/User/.rvm/archives/rvm-1.26.7.tgz' - 'https://github.com/wayneeseguin/rvm/releases/download/1.26.7/1.26.7.tar.gz.asc'!
try downloading the signatures:

    gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

or if it fails:

    command curl -sSL https://rvm.io/mpapis.asc | gpg --import -

the key can be compared with:

    https://rvm.io/mpapis.asc
    https://keybase.io/mpapis
@xjlin0
Contributor
xjlin0 commented Dec 29, 2014

Installing RVM now requires GPG keys for security, can you try the procedures listed in your error message by downloading Michal Papis's public key? (If you don't have gpg, please pact install gnupg )

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -#LO https://rvm.io/mpapis.asc
gpg --import mpapis.asc

rvm/rvm#3110

@nemilya
nemilya commented Dec 29, 2014

Get this:

{ ~ }  » gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: system error while calling external program: No such file or directory
gpg: WARNING: unable to remove tempfile (out) `C:\babun\.babun\cygwin\tmp\gpg-sAP3wj\tempout.txt': No such file or directory
gpg: no handler for keyserver scheme `hkp'
gpg: keyserver receive failed: Keyserver error

Btw, gpg was taken from other installations at my machine (probaly Git), not from babun.

Now I install: pact install gnupg (it is ok), and start again -- same result..

@xjlin0
Contributor
xjlin0 commented Dec 29, 2014

Babun come with git, where did you get gpg before? Please manually remove the tempfile and find alternative way to solve this gpg problem, since I can't recreate your issue on my Babun, and have no problems creating $HOME/.gnupg/trustdb.gpg. I started gpg commend without any options first.

{ blog } master » gpg                                           ~/MyProject/xjlin0.github.io/blog
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/documentation/faqs.html for more information
gpg: directory `/home/J/.gnupg' created
gpg: new configuration file `/home/J/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/J/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/J/.gnupg/secring.gpg' created
gpg: keyring `/home/J/.gnupg/pubring.gpg' created
gpg: Go ahead and type your message ...
(pressed Ctrl-C here)
gpg: Interrupt caught ... exiting
{ blog } master » gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/documentation/faqs.html for more information
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: /home/J/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
@nemilya
nemilya commented Dec 30, 2014

Thanks!

gpg

Was the solution.

Then:

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

Then

curl -sSL https://get.rvm.io | bash -s stable

Was error of conflict with other installed gpg, detected by --debug option:

curl -sSL https://get.rvm.io | bash -s stable --debug

Installed ok:

{ ~ }  » rvm list                                                                           ~ 127

rvm rubies


# No rvm rubies installed yet. Try 'rvm help install'.

Then:

pact install patch libyaml-devel libtool bison mingw64-i686-gcc mingw64-x86_64-gcc patch
rvm get head
rvm install ruby-2.1.5

And get this message:

{ ~ }  » rvm install ruby-2.1.5                                                                 ~
Searching for binary rubies, this might take some time.
No binary rubies available for: cygwin/unknown/i386/ruby-2.1.5.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
/home/User/.rvm/scripts/functions/support: line 338: rvm_debug: command not found
Checking requirements for cygwin.
Installing requirements for cygwin.
Updating system - please wait
Installing required packages: sqlite3 - please wait
Error running 'requirements_cygwin_libs_install sqlite3',
showing last 15 lines of /home/User/.rvm/log/1419923092_ruby-2.1.5/package_install_sqlite3.log
+requirements_cygwin_libs_install:2> typeset __packages_list __manager
+requirements_cygwin_libs_install:4> [[ i386 == x86_64 ]]
+requirements_cygwin_libs_install:6> __manager=setup-x86.exe
+requirements_cygwin_libs_install:8> rvm_debug '__manager: setup-x86.exe'
+rvm_debug:2> ((  0  ))
+rvm_debug:2> return 0
+requirements_cygwin_libs_install:10> __packages_list=sqlite3
+requirements_cygwin_libs_install:11> setup-x86.exe -q -P sqlite3
requirements_cygwin_libs_install:11: command not found: setup-x86.exe
+requirements_cygwin_libs_install:11> return 127
Requirements installation failed with status: 127.

Where is setup-x86.exe?

UPDATE:

pact install sqlite3

Solved this issue.

@nemilya
nemilya commented Dec 30, 2014

In the end of installation this message:

Error running 'env GEM_HOME=/home/User/.rvm/gems/ruby-2.1.5@global GEM_PATH= /home/User/.rvm/rubies/ruby-2.1.5/bin/ruby -d /home/User/.rvm/src/rubygems-2.4.5/setup.rb --no-document',
showing last 15 lines of /home/User/.rvm/log/1419923614_ruby-2.1.5/rubygems.install.log
/home/User/.rvm/src/rubygems-2.4.5/lib/rubygems/core_ext/kernel_require.rb:54:in `require': No such process - /home/User/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/i386-cygwin/psych.so (LoadError)
        from /home/User/.rvm/src/rubygems-2.4.5/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /home/User/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/psych.rb:1:in `<top (required)>'
        from /home/User/.rvm/src/rubygems-2.4.5/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /home/User/.rvm/src/rubygems-2.4.5/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /home/User/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/yaml.rb:5:in `<top (required)>'
        from /home/User/.rvm/src/rubygems-2.4.5/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /home/User/.rvm/src/rubygems-2.4.5/lib/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /home/User/.rvm/src/rubygems-2.4.5/lib/rubygems.rb:624:in `load_yaml'
        from /home/User/.rvm/src/rubygems-2.4.5/lib/rubygems/config_file.rb:328:in `load_file'
        from /home/User/.rvm/src/rubygems-2.4.5/lib/rubygems/config_file.rb:197:in `initialize'
        from /home/User/.rvm/src/rubygems-2.4.5/lib/rubygems/gem_runner.rb:74:in `new'
        from /home/User/.rvm/src/rubygems-2.4.5/lib/rubygems/gem_runner.rb:74:in `do_configuration'
        from /home/User/.rvm/src/rubygems-2.4.5/lib/rubygems/gem_runner.rb:39:in `run'
        from setup.rb:45:in `<main>'
@xjlin0
Contributor
xjlin0 commented Dec 30, 2014

In the beginning of my second post in this thread, before installing rvm, I needed to install everything missing in the error message by

pact install patch libyaml-devel libtool bison mingw64-i686-gcc mingw64-x86_64-gcc patch

(there's no requirement of setup-x86.exe since I had all libraries)
I don't know your system configuration and error log, but could you check every of them by pact?

@Ginja
Ginja commented Feb 13, 2015

@nemilya was able to get around this problem by using RVM to install libyaml, and then pointing to it while (re)installing:

# It's suggested to use RVM's autolibs functionality 
 rvm pkg install libyaml
# In my case I was simply re-installing
 rvm reinstall 2.0.0 --with-libyaml-dir=/home/[username]/.rvm/usr
@vlebedev

After some some struggle with gnupg I get stuck with installing ruby-2.1.5 using @xjlin0 scenario. I got the following error during compilation phase:

[...]
installing default printf libraries
installing default rational libraries
installing default path_to_class libraries
printf.c:31:1: error: conflicting types for ‘utoa’
 utoa(char *p, char *e, unsigned int x)
 ^
In file included from /usr/include/stdio.h:29:0,
                 from ../../.././include/ruby/defines.h:26,
                 from ../../.././include/ruby/ruby.h:29,
                 from ../../.././include/ruby.h:33,
                 from printf.c:1:
/usr/include/stdlib.h:184:8: note: previous declaration of ‘utoa’ was here
 char * _EXFUN(utoa,(unsigned, char *, int));
        ^
installing default recursion libraries
Makefile:228: recipe for target 'printf.o' failed
make[2]: *** [printf.o] Error 1
make[2]: Leaving directory '/home/wal/.rvm/src/ruby-2.1.5/ext/-test-/printf'
exts.mk:110: recipe for target 'ext/-test-/printf/all' failed
make[1]: *** [ext/-test-/printf/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[...]

Any ideas how to fix it?

@dmattes
dmattes commented Mar 16, 2015

I had the same problem with utoa and found a solution on http://d.hatena.ne.jp/takehikom/20150221/1424462400

In your case: Edit the file /home/wal/.rvm/src/ruby-2.1.5/ext/-test-/printf and replace "utoa" with "uutoa" and save it.
Afterwords go to the directory /home/wal/.rvm/src/ruby-2.1.5
make
make install

and ruby should be installed.

@aestrro
aestrro commented Apr 11, 2015

Thanks @dmattes this absolutely fixed it for me.

@darrinmcdougald

EDITED

Using the instructions from @dmattes I was was able to install the 4 rubies I need to run for testing:

MRI Rubies I installed: (and the issues I encountered with each)

1.9.3-p551 - rvm install 1.9.3-p551 had no issues with patch, configure or complie. >> Easy clean install.

2.0.0-p643 - Patch "step" warns/fails but script continues & Needed to edit printf.c followed by make && make install
$ rvm install 2.0.0-p643
Searching for binary rubies, this might take some time.
No binary rubies available for: cygwin/unknown/i386/ruby-2.0.0-p643.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for cygwin.
Requirements installation successful.
Installing Ruby from source to: /home/dmcdougald/.rvm/rubies/ruby-2.0.0-p643, this may take a while depending on your cpu(s)...
ruby-2.0.0-p643 - #downloading ruby-2.0.0-p643, 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 10.2M 100 10.2M 0 0 658k 0 0:00:15 0:00:15 --:--:-- 750k
ruby-2.0.0-p643 - #extracting ruby-2.0.0-p643 to /home/dmcdougald/.rvm/src/ruby-2.0.0-p643....
ruby-2.0.0-p643 - #applying patch /home/dmcdougald/.rvm/patches/ruby/GH-433.patch.
Error running '__rvm_patch -F 25 -p1 -N -f -i /home/dmcdougald/.rvm/patches/ruby/GH-433.patch',
showing last 15 lines of /home/dmcdougald/.rvm/log/1429018641_ruby-2.0.0-p643/patch.apply.GH-433.log
[2015-04-14 09:38:38] __rvm_patch
__rvm_patch ()
{
\patch "$@" || return $?
}
current path: /home/dmcdougald/.rvm/src/ruby-2.0.0-p643
GEM_HOME=/home/dmcdougald/.rvm/gems/ruby-1.9.3-p551
PATH=/home/dmcdougald/.rvm/usr/bin:/home/dmcdougald/.rvm/gems/ruby-1.9.3-p551/bin:/home/dmcdougald/.rvm/gems/ruby-1.9.3-p551@global/bin:/home/dmcdougald/.rvm/rubies/ruby-1.9.3-p551/bin:/home/dmcdougald/.rvm/bin:/usr/local/bin:/usr/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0/%c:/MinGW:/cygdrive/c/Users/dmcdougald/.babun
GEM_PATH=/home/dmcdougald/.rvm/gems/ruby-1.9.3-p551:/home/dmcdougald/.rvm/gems/ruby-1.9.3-p551@global
command(8): __rvm_patch -F 25 -p1 -N -f -i /home/dmcdougald/.rvm/patches/ruby/GH-433.patch
++ patch -F 25 -p1 -N -f -i /home/dmcdougald/.rvm/patches/ruby/GH-433.patch
patching file file.c
Hunk #1 FAILED at 4301.
1 out of 1 hunk FAILED -- saving rejects to file file.c.rej
++ return 1
ruby-2.0.0-p643 - #configuring.................................................|
ruby-2.0.0-p643 - #post-configuration..
ruby-2.0.0-p643 - #compiling..............................................
Error running '__rvm_make -j4',
showing last 15 lines of /home/dmcdougald/.rvm/log/1429018641_ruby-2.0.0-p643/make.log
make[2]: Leaving directory '/home/dmcdougald/.rvm/src/ruby-2.0.0-p643/ext/-test-/printf'
exts.mk:92: recipe for target 'ext/-test-/printf/all' failed
make[1]: *** [ext/-test-/printf/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: Entering directory '/home/dmcdougald/.rvm/src/ruby-2.0.0-p643/ext/-test-/st/numhash'
compiling numhash.c
installing default numhash libraries
make[2]: Leaving directory '/home/dmcdougald/.rvm/src/ruby-2.0.0-p643/ext/-test-/old_thread_select'
linking shared-object -test-/st/numhash.so
make[2]: Leaving directory '/home/dmcdougald/.rvm/src/ruby-2.0.0-p643/ext/-test-/path_to_class'
make[2]: Leaving directory '/home/dmcdougald/.rvm/src/ruby-2.0.0-p643/ext/-test-/st/numhash'
make[1]: Leaving directory '/home/dmcdougald/.rvm/src/ruby-2.0.0-p643'
uncommon.mk:179: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2
++ return 2
There has been an error while running make. Halting the installation.

2.1.5 - No patch attempted by rvm - Needed to edit printf.c followed by make && make install
SAME error output on compile as 2.0.0

EDIT
2.2.1 - **CORRECTION rvm install 2.2.1 DID patch successfully.
ruby-2.2.1 - #applying patch /home/dmcdougald/.rvm/patches/ruby/2.2.1/fix_installing_bundled_gems.patch.

Needed to edit printf.c followed by make && make install
SAME error output on compile as 2.0.0

=== Steps I used to install rubies 2.0.0-p643, 2.1.5 & 2.2.1: ===

  1. rvm install IE: rvm install 2.2.1 && wait for error

  2. Edit the file ~/.rvm/src/ruby-/ext/-test-/printf/printf.c and replace "utoa" with "uutoa" and save it.
    sed -i.bak 's/utoa/uutoa/g' ~/.rvm/src/ruby-\<VERSION\>/ext/-test-/printf/printf.c
    *You can omit the .bak if you do now want to bakup the original printf.c ( IE: sed -i 's/utoa/uutoa/g' <FILE>)

  3. cd ~/.rvm/src/ruby-
    make
    make install

***REPEAT Steps 1 - 3 for each of the rubies you need to install

  1. Fix ruby environment rvm get stable --auto-dotfiles
  • I was not able to change default (rvm default ) or use other version(s) without performing this step
  • This also installed the missing gemsets for the manually installed rubies.
  • I was getting a message like the following everytime I issue a rvm untill I performed this step:
    Warning! PATH is not properly set up, '/home/dmcdougald/.rvm/gems/ruby-1.9.3-p551/bin' is not at first place,
    usually this is caused by shell initialization files - check them for 'PATH=...' entries,
    it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
    to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p551'.

$ rvm --default use 2.0.0-p643
Gemset '' does not exist, 'rvm ruby-2.0.0-p643 do rvm gemset create ' first, or append '--create'.

Tue Apr 14 @ 14:45:34 ~/rubyscripts
$ rvm use 2.0.0-p643
Gemset '' does not exist, 'rvm ruby-2.0.0-p643 do rvm gemset create ' first, or append '--create'.

$ rvm ruby-2.0.0-p643 do rvm gemset create
Ruby ruby-2.0.0-p643 is not installed.

Tue Apr 14 @ 14:47:53 ~/rubyscripts
$ rvm get stable --auto-dotfiles
Downloading https://get.rvm.io
Downloading https://raw.githubusercontent.com/wayneeseguin/rvm/master/binscripts/rvm-installer.asc
Verifying /home/dmcdougald/.rvm/archives/rvm-installer.asc
gpg: Signature made Mon, Apr 13, 2015 8:05:41 PM EDT using RSA key ID BF04FF17
gpg: Good signature from "Michal Papis (RVM signing) mpapis@gmail.com"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3
Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17
GPG verified '/home/dmcdougald/.rvm/archives/rvm-installer'
Turning on auto dotfiles mode.
Downloading https://github.com/rvm/rvm/archive/1.26.11.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc
gpg: Signature made Mon, Mar 30, 2015 5:52:13 PM EDT using RSA key ID BF04FF17
gpg: Good signature from "Michal Papis (RVM signing) mpapis@gmail.com"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3
Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17
GPG verified '/home/dmcdougald/.rvm/archives/rvm-1.26.11.tgz'
Upgrading the RVM installation in /home/dmcdougald/.rvm/
Removing rvm PATH line from /home/dmcdougald/.profile /home/dmcdougald/.bashrc.
Adding rvm PATH line to /home/dmcdougald/.profile /home/dmcdougald/.mkshrc /home/dmcdougald/.bashrc /home/dmcdougald/.zshrc.
Removing rvm loading line from /home/dmcdougald/.profile /home/dmcdougald/.bashrc /home/dmcdougald/.bash_profile.
Adding rvm loading line to /home/dmcdougald/.profile /home/dmcdougald/.bash_profile /home/dmcdougald/.zlogin.
Fixing environment for ruby-2.0.0-p643.
ruby-2.0.0-p643 - #gemset created /home/dmcdougald/.rvm/gems/ruby-2.0.0-p643
ruby-2.0.0-p643 - #importing gemsetfile /home/dmcdougald/.rvm/gemsets/default.gems evaluated to empty gem list
rvm get stable --auto-dotfiles
ruby-2.0.0-p643 - #generating default wrappers...................................
Installing rvm gem in 1 gemsets.
Installing gem-wrappers gem in 1 gemsets.
Regenerating gem wrappers in 1 rubies
Upgrade of RVM in /home/dmcdougald/.rvm/ is complete.

darrinmcdougald,

Thank you for using RVM!

We sincerely hope that RVM helps to make your life easier and more enjoyable!!!

~Wayne, Michal & team.

In case of problems: http://rvm.io/help and https://twitter.com/rvm_io

Upgrade Notes:

  • WARNING: You have '~/.profile' file, you might want to load it,
    to do that add the following line to '/home/dmcdougald/.bash_profile':

    source ~/.profile

/home/dmcdougald/.rvm/scripts/functions/utility_system: line 206: getent: command not found
Error checking user shell via getent ... something went wrong, report a bug.

  • No new notes to display.

RVM reloaded!

  1. Verify install(s) with rvm list && rvm use <VERSION> && which ruby

Tue Apr 14 @ 15:17:56 ~
$ rvm list

rvm rubies

=* ruby-1.9.3-p551 [ i386 ]
ruby-2.0.0-p643 [ i386 ]
ruby-2.1.5 [ i386 ]
ruby-2.2.1 [ i386 ]

=> - current

=* - current && default

* - default

Tue Apr 14 @ 15:19:18 ~
$ rvm --default use ruby-2.0.0-p643
Using /home/dmcdougald/.rvm/gems/ruby-2.0.0-p643

Tue Apr 14 @ 15:20:50 ~
$ rvm use 2.0.0
Using /home/dmcdougald/.rvm/gems/ruby-2.0.0-p643

Tue Apr 14 @ 15:21:54 ~
$ rvm list

rvm rubies

ruby-1.9.3-p551 [ i386 ]
=* ruby-2.0.0-p643 [ i386 ]
ruby-2.1.5 [ i386 ]
ruby-2.2.1 [ i386 ]

=> - current

=* - current && default

* - default

Tue Apr 14 @ 15:23:11 ~
$ which ruby
/home/dmcdougald/.rvm/rubies/ruby-2.0.0-p643/bin/ruby

@tombujok
Contributor

Guys, we would need a RVM plugin that would automate all these steps. Would
anybody be willing to contribute it?

On Tue, Apr 14, 2015 at 9:56 PM, darrinmcdougald notifications@github.com
wrote:

Using the instructions from dmattes, I was was able to install the 4
rubies I need to run for testing:
MRI Rubies I installed: (and the issues I encountered with each)

1.9.3-p551 - rvm install 1.9.3-p551 had no issues with patch, configure
or complie. >> Easy clean install.

2.0.0-p643 - Patch "step" warns/fails but script continues & Needed to
edit printf.c followed by make && make install
$ rvm install 2.0.0-p643
Searching for binary rubies, this might take some time.
No binary rubies available for: cygwin/unknown/i386/ruby-2.0.0-p643.
Continuing with compilation. Please read 'rvm help mount' to get more
information on binary rubies.
Checking requirements for cygwin.
Requirements installation successful.
Installing Ruby from source to:
/home/dmcdougald/.rvm/rubies/ruby-2.0.0-p643, this may take a while
depending on your cpu(s)...
ruby-2.0.0-p643 - #downloading ruby-2.0.0-p643, 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 10.2M 100 10.2M 0 0 658k 0 0:00:15 0:00:15 --:--:-- 750k
ruby-2.0.0-p643 - #extracting ruby-2.0.0-p643 to
/home/dmcdougald/.rvm/src/ruby-2.0.0-p643....
ruby-2.0.0-p643 - #applying patch
/home/dmcdougald/.rvm/patches/ruby/GH-433.patch.
Error running '__rvm_patch -F 25 -p1 -N -f -i
/home/dmcdougald/.rvm/patches/ruby/GH-433.patch',
showing last 15 lines of
/home/dmcdougald/.rvm/log/1429018641_ruby-2.0.0-p643/patch.apply.GH-433.log
[2015-04-14 09:38:38] __rvm_patch
__rvm_patch ()
{
\patch "$@" || return $?
}
current path: /home/dmcdougald/.rvm/src/ruby-2.0.0-p643
GEM_HOME=/home/dmcdougald/.rvm/gems/ruby-1.9.3-p551

PATH=/home/dmcdougald/.rvm/usr/bin:/home/dmcdougald/.rvm/gems/ruby-1.9.3-p551/bin:/home/dmcdougald/.rvm/gems/ruby-1.9.3-p551@global
/bin:/home/dmcdougald/.rvm/rubies/ruby-1.9.3-p551/bin:/home/dmcdougald/.rvm/bin:/usr/local/bin:/usr/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0/%c:/MinGW:/cygdrive/c/Users/dmcdougald/.babun

GEM_PATH=/home/dmcdougald/.rvm/gems/ruby-1.9.3-p551:/home/dmcdougald/.rvm/gems/ruby-1.9.3-p551@global
command(8): __rvm_patch -F 25 -p1 -N -f -i
/home/dmcdougald/.rvm/patches/ruby/GH-433.patch
++ patch -F 25 -p1 -N -f -i /home/dmcdougald/.rvm/patches/ruby/GH-433.patch
patching file file.c
Hunk #1 #1 FAILED at 4301.
1 out of 1 hunk FAILED -- saving rejects to file file.c.rej
++ return 1
ruby-2.0.0-p643 -
#configuring.................................................|
ruby-2.0.0-p643 - #post-configuration..
ruby-2.0.0-p643 - #compiling..............................................
Error running '__rvm_make -j4',
showing last 15 lines of
/home/dmcdougald/.rvm/log/1429018641_ruby-2.0.0-p643/make.log
make[2]: Leaving directory
'/home/dmcdougald/.rvm/src/ruby-2.0.0-p643/ext/-test-/printf'
exts.mk:92: recipe for target 'ext/-test-/printf/all' failed
make[1]: *** [ext/-test-/printf/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: Entering directory
'/home/dmcdougald/.rvm/src/ruby-2.0.0-p643/ext/-test-/st/numhash'
compiling numhash.c
installing default numhash libraries
make[2]: Leaving directory
'/home/dmcdougald/.rvm/src/ruby-2.0.0-p643/ext/-test-/old_thread_select'
linking shared-object -test-/st/numhash.so
make[2]: Leaving directory
'/home/dmcdougald/.rvm/src/ruby-2.0.0-p643/ext/-test-/path_to_class'
make[2]: Leaving directory
'/home/dmcdougald/.rvm/src/ruby-2.0.0-p643/ext/-test-/st/numhash'
make[1]: Leaving directory '/home/dmcdougald/.rvm/src/ruby-2.0.0-p643'
uncommon.mk:179: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2
++ return 2
There has been an error while running make. Halting the installation.

2.1.5 - No patch attempted by rvm - Needed to edit printf.c followed by make
&& make install
SAME error output on compile as 2.0.0

2.2.1 - No patch attempted by rvm -

=== Steps I used to install rubies 2.0.0-p643, 2.1.5 & 2.2.1: ===

  1. rvm install IE: rvm install 2.2.1 && wait for error

  2. Edit the file ~/.rvm/src/ruby-/ext/-test-/printf/printf.c and replace
    "utoa" with "uutoa" and save it.
    sed -i.bak 's/utoa/uutoa/g'
    ~/.rvm/src/ruby-/ext/-test-/printf/printf.c
    *You can omit the .bak if you do now want to bakup the original printf.c (
    IE: sed -i 's/utoa/uutoa/g' )

  3. cd ~/.rvm/src/ruby-
    make
    make install

***REPEAT Steps 1 - 3 for each of the rubies you need to install

  1. Fix ruby environment rvm get stable --auto-dotfiles
  • I was not able to change default (rvm default ) or use other
    version(s) without performing this step
  • This also installed the missing gemsets for the manually installed
    rubies.
  • I was getting a message like the following everytime I issue a rvm
    untill I performed this step: Warning! PATH is not properly set up,
    '/home/dmcdougald/.rvm/gems/ruby-1.9.3-p551/bin' is not at first place,
    usually this is caused by shell initialization files - check them for
    'PATH=...' entries, it might also help to re-add RVM to your dotfiles: 'rvm
    get stable --auto-dotfiles', to fix temporarily in this shell session run:
    'rvm use ruby-1.9.3-p551'.

$ rvm --default use 2.0.0-p643
Gemset '' does not exist, 'rvm ruby-2.0.0-p643 do rvm gemset create '
first, or append '--create'.

Tue Apr 14 @ 14:45:34 ~/rubyscripts
$ rvm use 2.0.0-p643
Gemset '' does not exist, 'rvm ruby-2.0.0-p643 do rvm gemset create '
first, or append '--create'.

$ rvm ruby-2.0.0-p643 do rvm gemset create
Ruby ruby-2.0.0-p643 is not installed.

Tue Apr 14 @ 14:47:53 ~/rubyscripts
$ rvm get stable --auto-dotfiles
Downloading https://get.rvm.io
Downloading
https://raw.githubusercontent.com/wayneeseguin/rvm/master/binscripts/rvm-installer.asc
Verifying /home/dmcdougald/.rvm/archives/rvm-installer.asc
gpg: Signature made Mon, Apr 13, 2015 8:05:41 PM EDT using RSA key ID
BF04FF17
gpg: Good signature from "Michal Papis (RVM signing) mpapis@gmail.com"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3
Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17
GPG verified '/home/dmcdougald/.rvm/archives/rvm-installer'
Turning on auto dotfiles mode.
Downloading https://github.com/rvm/rvm/archive/1.26.11.tar.gz
Downloading
https://github.com/rvm/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc
gpg: Signature made Mon, Mar 30, 2015 5:52:13 PM EDT using RSA key ID
BF04FF17
gpg: Good signature from "Michal Papis (RVM signing) mpapis@gmail.com"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3
Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17
GPG verified '/home/dmcdougald/.rvm/archives/rvm-1.26.11.tgz'
Upgrading the RVM installation in /home/dmcdougald/.rvm/
Removing rvm PATH line from /home/dmcdougald/.profile
/home/dmcdougald/.bashrc.
Adding rvm PATH line to /home/dmcdougald/.profile /home/dmcdougald/.mkshrc
/home/dmcdougald/.bashrc /home/dmcdougald/.zshrc.
Removing rvm loading line from /home/dmcdougald/.profile
/home/dmcdougald/.bashrc /home/dmcdougald/.bash_profile.
Adding rvm loading line to /home/dmcdougald/.profile
/home/dmcdougald/.bash_profile /home/dmcdougald/.zlogin.
Fixing environment for ruby-2.0.0-p643.
ruby-2.0.0-p643 - #gemset created
/home/dmcdougald/.rvm/gems/ruby-2.0.0-p643
ruby-2.0.0-p643 - #importing gemsetfile
/home/dmcdougald/.rvm/gemsets/default.gems evaluated to empty gem list
rvm get stable --auto-dotfiles
ruby-2.0.0-p643 - #generating default
wrappers...................................
Installing rvm gem in 1 gemsets.
Installing gem-wrappers gem in 1 gemsets.
Regenerating gem wrappers in 1 rubies
Upgrade of RVM in /home/dmcdougald/.rvm/ is complete.
darrinmcdougald,

Thank you for using RVM! We sincerely hope that RVM helps to make your
life easier and more enjoyable!!!

~Wayne, Michal & team.

In case of problems: http://rvm.io/help and https://twitter.com/rvm_io

Upgrade Notes:

WARNING: You have '~/.profile' file, you might want to load it,
to do that add the following line to '/home/dmcdougald/.bash_profile':

source ~/.profile

/home/dmcdougald/.rvm/scripts/functions/utility_system: line 206: getent:
command not found
Error checking user shell via getent ... something went wrong, report a
bug.

  • No new notes to display.

RVM reloaded!

  1. Verify install(s) with rvm list && rvm use {VERSION} && which ruby

Tue Apr 14 @ 15:17:56 ~
$ rvm list

rvm rubies

=* ruby-1.9.3-p551 [ i386 ]
ruby-2.0.0-p643 [ i386 ]
ruby-2.1.5 [ i386 ]
ruby-2.2.1 [ i386 ]
=> - current =* - current && default * - default

Tue Apr 14 @ 15:19:18 ~
$ rvm --default use ruby-2.0.0-p643
Using /home/dmcdougald/.rvm/gems/ruby-2.0.0-p643

Tue Apr 14 @ 15:20:50 ~
$ rvm use 2.0.0
Using /home/dmcdougald/.rvm/gems/ruby-2.0.0-p643

Tue Apr 14 @ 15:21:54 ~
$ rvm list

rvm rubies

ruby-1.9.3-p551 [ i386 ]
=* ruby-2.0.0-p643 [ i386 ]
ruby-2.1.5 [ i386 ]
ruby-2.2.1 [ i386 ]
=> - current =* - current && default * - default

Tue Apr 14 @ 15:23:11 ~
$ which ruby
/home/dmcdougald/.rvm/rubies/ruby-2.0.0-p643/bin/ruby


Reply to this email directly or view it on GitHub
#93 (comment).

@xjlin0
Contributor
xjlin0 commented Apr 14, 2015

I just wrote a blog covering the installation of Ruby on Babun 1.1. Briefly, after babun update, you get ruby 2 and rails 4 by the following command:

pact install ruby ruby-nokogiri ruby-rails ruby-pg libxml2-devel libxslt-devel gcc-g++ patch

Also, as dmattes pointed out, currently there's a repetitive function name "utoa" in printf.c under Ruby 2.1.6~2.2.2 source blocking the compilation in both RVM and rbenv. So I created a patch to overcome it and now the installation of Ruby 2.2.0 on Babun 1.1.1 is possible by the following commend, if you have rbenv installed.

rbenv install --patch 2.2.0 < uutoa_printf.patch
rbenv rehash

Here is the content of "uutoa_printf.patch". Hopefully Ruby core team will fix it soon.

--- ext/-test-/printf/printf.c  2014-11-03 21:03:50.000000000 -0800
+++ ../new/ext/-test-/printf/printf.c   2015-04-14 17:30:20.808749300 -0700
@@ -20,7 +20,7 @@
 }

 static char *
-utoa(char *p, char *e, unsigned int x)
+uutoa(char *p, char *e, unsigned int x)
 {
     char *e0 = e;
     if (e <= p) return p;
@@ -71,12 +71,12 @@
        *p++ = '0';
    }
    if (!NIL_P(v = rb_hash_aref(opt, ID2SYM(rb_intern("width"))))) {
-       p = utoa(p, format + sizeof(format), NUM2UINT(v));
+       p = uutoa(p, format + sizeof(format), NUM2UINT(v));
    }
    if (!NIL_P(v = rb_hash_aref(opt, ID2SYM(rb_intern("prec"))))) {
        *p++ = '.';
        if (FIXNUM_P(v))
-       p = utoa(p, format + sizeof(format), NUM2UINT(v));
+       p = uutoa(p, format + sizeof(format), NUM2UINT(v));
    }
     }
     *p++ = cnv;

@tombujok
Contributor

Nice! You can find the doc in the Development section of the site:
http://babun.github.io/development.html

Cheers
Tom

On Wed, Apr 15, 2015 at 12:34 AM, Jack 0 notifications@github.com wrote:

Hi Tom:
I'm writing a blog of running ruby/rails on Babun 1.1+, where could I find
the documentation of making a plugin? I actually think the problem we got
in babun 1.1+ is because of the bug Ruby 2.1+ source, described by dmattes.
Thanks for your efforts and have a great one!


Reply to this email directly or view it on GitHub
#93 (comment).

@tombujok
Contributor

Here's an example of a plugin in one commit - it's dead simple to implement one :)
74713ed

@darrinmcdougald

FWIW, I tried an experiment with rvm + ruby-2.2.1.
(Excuse the version in the lines below, I did not capture output from the experiment so I am using lines from above post in my example)

I uninstalled ruby-2.2.1. with rvm remove 2.2.1

I then ran rvm install 2.2.1

When the install finished the "configure" step and hit the "post-configuration" step like this:
ruby-2.0.0-p643 - #configuring.................................................|
ruby-2.0.0-p643 - #post-configuration..

I (in another babun shell window) quickly ran:
sed -i.bak 's/utoa/uutoa/g' /home/dmcdougald/.rvm/src/ruby-2.2.1/ext/-test-/printf/printf.c

The rvm install finished successfully and 2.2.1 was installed and usable with no further actions needed.

The bad part is that it took 45-60 minuets to get through the install to the post-configuration step.
So I had to keep an eye on the progress and jump in when I saw the configure finish.

@xjlin0
Contributor
xjlin0 commented Apr 21, 2015

Hi Tom: Thanks for your suggestion and the example, I'll probably got some time next week to try the possibilities of coming up with a plugin for rbenv + ruby.

@xjlin0
Contributor
xjlin0 commented Jul 12, 2015

Hi Tom:
I haven't got time to compose packages, but I have updated my blog to install the ruby and rails. Here is the brief steps, should be easy enough:

  1. Install the Ruby2 and Rail4 without recompile, just 2 lines of commands with pact.
babun update
pact install ruby ruby-nokogiri ruby-rails ruby-pg libpq-devel libxml2-devel libxslt-devel gcc-g++ patch sqlite3 postgresql curl wget

2: If anybody want the latest Ruby 2.2.2 and Rails 4.2.1 with rbenv, 5 lines

curl -sSL https://raw.githubusercontent.com/xjlin0/getrbenv-installer/feature/fix_zshrc_install_dir_pathfix/bin/install.sh | bash -s -- --plugins sstephenson/ruby-build,rkh/rbenv-update

close and restart Babun terminal, then continue:

curl http://xjlin0.github.io/assets/imgs/uutoa_printf.patch | rbenv install --patch 2.2.2
rbenv rehash
rbenv global 2.2.2
gem install pg rails

ps. Postgres server needed to be start separately, so using sqlite is recommended.
ps2. Some gems, such as Puma or Turbolinks are not compatible with these settings as of now.

@xjlin0
Contributor
xjlin0 commented Aug 12, 2015

An update for Babun 1.2.0, as of Aug 12 2015.

Babun come out of pre-compiled Ruby 2.2.2 and Rails 4.2.3 by the following pact commands. Both are the latest stable versions available, great job!

pact install ruby ruby-nokogiri ruby-rails ruby-pg libpq-devel libxml2-devel libxslt-devel gcc-g++ patch sqlite3 postgresql curl wget libgmp-devel
@ylluminarious

After reading through this forum and trying to get Ruby working, I've had no success thus far. I have RVM correctly installed, but I cannot, for some reason, install Ruby 2.2.3 with RVM. Running $ rvm install ruby-2.2.3 outputs:

Searching for binary rubies, this might take some time.
No binary rubies available for: cygwin/unknown/i386/ruby-2.2.3.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for cygwin.
Installing requirements for cygwin.
Updating system.
Installing required packages: mingw64-i686-gcc-core, mingw64-x86_64-gcc-core..
Error running 'requirements_cygwin_libs_install mingw64-i686-gcc-core mingw64-x86_64-gcc-core',
showing last 15 lines of /home/gdp2/.rvm/log/1443906750_ruby-2.2.3/package_install_mingw64-i686-gcc-core_mingw64-x86_64-gcc-core.log
    ${__manager} -q -P "${__packages_list// /,}" || return $?
}
current path: /home/gdp2
PATH=/home/gdp2/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/home/gdp2/.local/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/cygdrive/c/Program Files (x86)/AMD/ATI.ACE/Core-Static:/cygdrive/c/.babun:/home/gdp2/.rvm/bin
command(3): requirements_cygwin_libs_install mingw64-i686-gcc-core mingw64-x86_64-gcc-core
++ typeset __packages_list __manager
++ [[ i386 == \x\8\6\_\6\4 ]]
++ __manager=setup-x86.exe
++ rvm_debug '__manager: setup-x86.exe'
++ ((  0  ))
++ return 0
++ __packages_list='mingw64-i686-gcc-core mingw64-x86_64-gcc-core'
++ setup-x86.exe -q -P mingw64-i686-gcc-core,mingw64-x86_64-gcc-core
/home/gdp2/.rvm/scripts/functions/requirements/cygwin: line 19: setup-x86.exe: command not found
++ return 127
Requirements installation failed with status: 127.

I have run $ pact install ruby ruby-nokogiri ruby-rails ruby-pg libpq-devel libxml2-devel libxslt-devel gcc-g++ patch sqlite3 postgresql curl wget libgmp-devel, but it seems to no avail. I've also run $ pact install sqlite3, as one user suggested in a problem similar to mine, but that also has not fixed the problem. I simply do not understand what is going wrong here or what status 127 means, which is what I get whenever I try to run something with Ruby or whenever I try to install Ruby. Does anyone have advice so that I can work with Ruby on babun?

@xjlin0
Contributor
xjlin0 commented Oct 3, 2015

Hi George! here is my thoughts:

You mentioned you execute the following but " it seems to no avail", what does it mean? what's the error message did you get from the following command?

pact install ruby ruby-nokogiri ruby-rails ruby-pg libpq-devel libxml2-devel libxslt-devel gcc-g++ patch sqlite3 postgresql curl wget libgmp-devel

_This won't work any more as of Oct 15 2015_

Pay attention to the line of Installing required packages: in your rvm error log, Try to install the missing packages, such as the following before your rvm install ruby-2.2.3.

pact install mingw64-i686-gcc-core mingw64-x86_64-gcc-core

Also, if you can switch to rbenv instead of rvm, please try my method under #Installation of rbenv and Ruby 2.2

@ylluminarious

@xjlin0 Hi, thanks for replying. What I mean by "to no avail" is that running that command does not solve the problem. All of the packages installed correctly and there is no error that is thrown, but I still cannot get Ruby working. I'll double check, though, and try again, and see if I need to install any missing packages.

Concerning Rbenv, I'd prefer not to have to use it since I like RVM better, but I guess I can try that if it comes down to it. Thanks again for the help!

@xjlin0
Contributor
xjlin0 commented Oct 5, 2015

That's wired. After pact install ruby (the first parameter) you should have ruby 2.2.2 working without any configuring/compiling. Did pact download ruby binaries and extract/install for you? Are you using Babun 1.2.0-dist? What's your output of ruby -v under Babun shell?

pact install ruby
@w4g3n3r
w4g3n3r commented Oct 14, 2015

I think I have the same issue as @ylluminarious. Executing ruby -v does nothing but print a 127 error status on my zsh shell.

{ ~ }  » babun --version                                                                     ~
babun version 1.2.0
Created and maintained by Tom Bujok (@tombujok)
Copyright (c) 2014-2015.
{ ~ }  » pact show | grep ruby                                                               ~
The following packages are installed:
ruby
ruby-json
ruby-minitest4
ruby-nokogiri
ruby-pg
ruby-rake
ruby-rdoc
rubygems
{ ~ }  » ruby -v                                                                             ~
{ ~ }  » ruby --version                                                                  ~ 127
{ ~ }  » whereis ruby                                                                    ~ 127
ruby: /usr/bin/ruby.exe /usr/lib/ruby /usr/share/ruby /usr/share/man/man1/ruby.1.gz
{ ~ }  »  

I've updated, uninstalled, reinstalled, etc.. the problem persists. I have to be missing something obvious.

@snowe2010

@w4g3n3r that's the exact same response I'm getting also.

@xjlin0
Contributor
xjlin0 commented Oct 15, 2015

I just reproduced the same difficulties. According to the pact print out, the pact install the ruby 2.2.3-1 instead of previous 2.2.2. And that resulted non-functional ruby. Here is a freshly installed Babun, and using rbenv can bypass such complication: This is only for fresh, completely new installed Babun (without previously pact install ruby)

curl -sSL https://raw.githubusercontent.com/xjlin0/getrbenv-installer/feature/fix_zshrc_install_dir_pathfix/bin/install.sh | bash -s -- --plugins sstephenson/ruby-build,rkh/rbenv-update

And close your babun, restart your babun

rbenv install 2.2.3
rbenv rehash
rbenv global 2.2.3
@chantisnake

I uses ruby 2.0.0p247 (2013-06-27 revision 41674) [i386-cygwin] and when I run gem install Jekyll it keep giving me some thing similar to this message:

 [main] ruby 11664 child_info_fork::abort: unable to remap openssl.so to same address as parent (0x27E0000) - try running rebaseall

all the error is related to child_info_fork...

@chantisnake
# 13501 at DESKTOP-0RQVO5L in ~ [19:36:20]
$ ruby --version
ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-cygwin]

# 13501 at DESKTOP-0RQVO5L in ~ [19:36:27]
$ gem --version
2.4.5.1

# 13501 at DESKTOP-0RQVO5L in ~ [19:36:34]
$ gem install jekyll
Fetching: fast-stemmer-1.0.2.gem (100%)
Building native extensions.  This could take a while...
      1 [main] ruby 1124 child_info_fork::abort: C:\Users\13501\.babun\cygwin\bin\cygssp-0.dll: Loaded to different address: parent(0x2D0000) != child(0x3E0000)
      0 [main] ruby 11688 child_info_fork::abort: address space needed by 'cygz.dll' (0x3E0000) is already occupied

same thing happened...

@numediaweb

@w4g3n3r me too; ruby -v doesn't do anything

@numediaweb

After some trial/error I figured out that babun doesn't support ruby/gem installed with pact.. So I to fix this I did

  • Remove the ruby pact packages
pact remove ruby
pact remove rubygems

The next commands must be done in the normal windows Command Prompt!

  • Download the Ruby Windows-based installer (which installs also rubygems), during install choose to add it to PATH, so wehn you run
ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x64-mingw32]

It shows the version number

  • Add an alias to the new installed gem
alias gem='D:/tools/ruby/bin/gem'

Now if you run

gem -v
2.4.5.1

You get the version outputed.

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