Edit: Workaround is simply to use ruby 1.9.3-p125 instead.

I've installed ruby version manager (I'm using Raspbian as downloaded this morning), and I ran rvm install ruby to download and compile the latest stable ruby (1.9.3-p194).

It spends a while compiling then fails with a message saying something about make failed (message has gone off screen so don't know exact text), and directing me to a log file at /home/pi/.rvm/log/ruby-1.9.3-p194/make.log:

[2012-07-25 02:14:58] make 
        CC = gcc
        LD = ld
        LDSHARED = gcc -shared
        CFLAGS = -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration  -fPIC 
        XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
        CPPFLAGS =   -I. -I.ext/include/armv6l-linux-eabi -I./include -I.
        DLDFLAGS = -Wl,-soname,libruby.so.1.9  
        SOLIBS = -lpthread -lrt -ldl -lcrypt -lm  
linking miniruby
math.o: file not recognized: File truncated
collect2: ld returned 1 exit status
make: *** [miniruby] Error 1

I've read through the output of both rvm notes and rvm requirements and I seem to have satisfied all of the listed dependencies.

How can I make it compile properly? TIA.

  • It looks like a bug with the build to me.
    – Jivings
    Jul 25, 2012 at 19:42

1 Answer 1


I would use the Debian packed Ruby to start with. Basically, if you don't have specific well defined needs, do use pre-packaged software. You will get updates when security bugs come. You will get controlled updates when a new version of the software arrives.

When it comes to libraries for Ruby, like Rails, I would suggest that you use the Debian package, because of the previous reason. But there there are some useful tools to download and run the bleeding edge if you really need that.

I would recommend you to check out Debian's wiki page about Ruby and how to use the packaged version. http://wiki.debian.org/Ruby

Have a good hacking time with Ruby.

  • 1
    At least on Ubuntu, I've had a pile of problems in the past using the packaged rubies. Also, I like to use RVM's gemset feature. Jul 26, 2012 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.