issues with updating to ruby 1.9.3

583 views
Skip to first unread message

Ranjna Goyal

unread,
Mar 14, 2013, 2:14:57 PM3/14/13
to rubyversi...@googlegroups.com
I am using a Mac and needed to upgrade to ruby 1.9.3. I tried following command:
\curl -L https://get.rvm.io | bash -s stable --ruby

and received error:

---------------------------
Extracting rubygems-2.0.3 ...
Removing old Rubygems files...
Installing rubygems-2.0.3 for ruby-2.0.0-p0 ...
Error running 'env GEM_PATH=/Users/eTouch/.rvm/gems/ruby-2.0.0-p0:/Users/eTouch/.rvm/gems/ruby-2.0.0-p0@global:/Users/eTouch/.rvm/gems/ruby-2.0.0-p0:/Users/eTouch/.rvm/gems/ruby-2.0.0-p0@global GEM_HOME=/Users/eTouch/.rvm/gems/ruby-2.0.0-p0 /Users/eTouch/.rvm/rubies/ruby-2.0.0-p0/bin/ruby /Users/eTouch/.rvm/src/rubygems-2.0.3/setup.rb', please read /Users/eTouch/.rvm/log/ruby-2.0.0-p0/rubygems.install.log
Installation of rubygems did not complete successfully.

Saving wrappers to '/Users/eTouch/.rvm/bin'.
ruby-2.0.0-p0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-2.0.0-p0 - #importing default gemsets, this may take time ...
Install of ruby-2.0.0-p0 - #complete 
Creating alias default for ruby-2.0.0-p0.
Recording alias default for ruby-2.0.0-p0.
Creating default links/files
Saving wrappers to '/Users/eTouch/.rvm/bin'.

  * To start using RVM you need to run `source /Users/eTouch/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.
----------------------------

then I had tried running above command as suggested: source /Users/eTouch/.rvm/scripts/rvm and by running this, when I did ran ruby -v, it gave me 2.0.2p0

however i could not install any gems. So I tried installing ruby again as: rvm install ruby-1.9.2-p290 and received following error:

-----------------
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.2-p290.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Fetching yaml-0.1.4.tar.gz to /Users/eTouch/.rvm/archives
Extracting yaml to /Users/eTouch/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/eTouch/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/eTouch/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/eTouch/.rvm/usr
The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.
----------------

then i tried 'rvm get head' and received following error:

--------------
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   185  100   185    0     0    239      0 --:--:-- --:--:-- --:--:--   428
100 11745  100 11745    0     0   6352      0  0:00:01  0:00:01 --:--:-- 25700
Downloading RVM from wayneeseguin branch master
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   124  100   124    0     0    156      0 --:--:-- --:--:-- --:--:--   367
100   166  100   166    0     0      1      0  0:02:46  0:02:01  0:00:45    41
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
Could not extract RVM sources.
Could not update RVM, get some help at #rvm IRC channel at freenode servers.
------------------

Please help ...
Thanks, Ranjna

mpapis

unread,
Mar 14, 2013, 5:26:57 PM3/14/13
to rubyversi...@googlegroups.com
try:

    rvm get head
    rvm install 1.9.3 --autolibs=3
    rvm install 2.0.0 --autolibs=3

you need to switch to the ruby you want to use:

    rvm use 2.0.0 --default

Richard Michael

unread,
Mar 14, 2013, 3:20:04 PM3/14/13
to rubyversi...@googlegroups.com
If you only want Ruby 1.9.3, you can install (it should compile with
your LLVM GCC) directly with:

"\curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3"

Concerning your Ruby 2.0.0p0 install, what do you mean "I could not
install gems"? Assuming you want to try and get this working, can you
please post error output?

It is possible you'll need RVM 'head' for a fix at some point, but to
start with, I'd avoid it and stay with 'stable' / 'latest'.

Finally, regarding GCC. I think Ruby 1.9.2 will not compile with an
LLVM GCC, but 1.9.3 will. So, as you said you want 1.9.3, you should
be fine.

However, I can't be sure about the specifics of the GCC error, I've
not used MacOS 10.8. My hunch is you have a new GCC LLVM from Apple
(/usr/bin/gcc). I think Xcode >= 4.2 starting using LLVM GCC. If you
need non-LLVM GCC, you can use either MacPorts or possibly HomeBrew.
It might be possible to run an old Xcode on 10.8, but I have no idea;
you'll have to research that.

In short, "rm -rf ~/.rvm" if you don't want to keep Ruby 2, then
directly install 1.9.3 as above, and you should be fine.

I hope this helps!
> --
> --
> Please visit http://rvm.io/ for documentation on rvm.
> Please visit https://www.pivotaltracker.com/projects/26822 to see what is
> being worked on currently.
>
> You received this message because you are subscribed to the Google
> Groups "rvm (Ruby Version Manager)" group.
> To post to this group, send email to rubyversi...@googlegroups.com
> To unsubscribe from this group, send email to
> rubyversionmana...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/rubyversionmanager?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "RVM (Ruby Version Manager)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyversionmana...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Richard Michael

unread,
Mar 14, 2013, 2:52:53 PM3/14/13
to rubyversi...@googlegroups.com
It appears to me that you are installing RVM for the first time..? If
that is true, I'll assume it means you can delete the installation
you've just attempted, which will probably make things easier, e.g.
start from scratch.

You mention you need Ruby 1.9.3, however the command you ran to
install RVM will install the latest Ruby, hence the Ruby 2
installation. You should not need to use RVM ("rvm get head"), I
suggest avoiding it unless you are intending to work with and debug
RVM itself.

So, to remove the existing RVM:

"rvm implode"

OR, if RVM is not running properly, simply do:
"rm -rf $HOME/.rvm"

and possibly restart your shell.

Then, to install stable RVM with Ruby 1.9.3:

"\curl -L https://get.rvm.io | bash -s stable --ruby 1.9.3"

(RVM will install the latest patch level of 1.9.3, which is currently p392.)

This installation procedure should be quite reliable. If you have
problems, please post your results. I hope this helps.

On Thu, Mar 14, 2013 at 7:14 PM, Ranjna Goyal <ranjna...@gmail.com> wrote:

Richard Michael

unread,
Mar 14, 2013, 2:56:40 PM3/14/13
to rubyversi...@googlegroups.com
Arg, sorry, I made a typo in the last message:

"\curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3"

Note the "=1.9.3" ^^^^

Rgoyal

unread,
Mar 19, 2013, 6:29:47 PM3/19/13
to rubyversi...@googlegroups.com
I am having same issue. I tried your commands and received following error: please help ...

Fetching yaml-0.1.4.tar.gz to /Users/eTouch/.rvm/archives
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  460k  100  460k    0     0   413k      0  0:00:01  0:00:01 --:--:--  426k
Extracting yaml to /Users/eTouch/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/eTouch/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/eTouch/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/eTouch/.rvm/usr
Installing Ruby from source to: /Users/eTouch/.rvm/rubies/ruby-1.9.3-p392, this may take a while depending on your cpu(s)...
ruby-1.9.3-p392 - #downloading ruby-1.9.3-p392, 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 9789k  100 9789k    0     0   144k      0  0:01:07  0:01:07 --:--:--  150k
ruby-1.9.3-p392 - #extracting ruby-1.9.3-p392 to /Users/eTouch/.rvm/src/ruby-1.9.3-p392
ruby-1.9.3-p392 - #extracted to /Users/eTouch/.rvm/src/ruby-1.9.3-p392
ruby-1.9.3-p392 - #configuring
ruby-1.9.3-p392 - #compiling
Error running 'make -j2', please read /Users/eTouch/.rvm/log/ruby-1.9.3-p392/make.log
There has been an error while running make. Halting the installation.


Rgoyal

unread,
Mar 19, 2013, 6:32:29 PM3/19/13
to rubyversi...@googlegroups.com
sorry, here is the error from log:
compiling st.c
st.c:520:35: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
            i = table->num_entries++;
              ~ ~~~~~~~~~~~~~~~~~~^~
1 error generated.
make: *** [st.o] Error 1
make: *** Waiting for unfinished jobs....

David Gethings

unread,
May 15, 2013, 3:56:18 PM5/15/13
to rubyversi...@googlegroups.com
I'm seeing exactly the same error. Trying to upgrade to Ruby 1.9.3-p392 (from 1.9.3-p362) on a Mac. Here's the full make.log file.

[2013-05-15 20:53:20] make
        CC = clang
        LD = ld
        LDSHARED = clang -dynamiclib
        CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration  -fno-common -pipe
        XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
        CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/Users/dgethings/.rvm/usr/include -I. -I.ext/include/x86_64-darwin12.3.0 -I./include -I.
        DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/dgethings/.rvm/rubies/ruby-1.9.3-p392/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1  -Wl,-u,_objc_msgSend
        SOLIBS =
compiling st.c
st.c:520:35: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
            i = table->num_entries++;
              ~ ~~~~~~~~~~~~~~~~~~^~
1 error generated.
make: *** [st.o] Error 1

mpapis

unread,
May 18, 2013, 3:01:33 AM5/18/13
to rubyversi...@googlegroups.com
You are using clang to compile ruby-1.9.3 - on OSX it was working better with gcc-4.2, are you using older RVM? always update rvm before reporting problem
Reply all
Reply to author
Forward
0 new messages