0

Possible Duplicate:
Error installing Ruby with RVM (OSX 10.8)

I'm trying to upgrade my Ruby version - right now I'm on p194 - and I saw that there's p362 available. Note: I'm new at this, sorry if I'm misunderstanding something.

I'm on Macbook Pro, OSX 10.7.5, and my ruby versions is:

[~]$ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0]

So when I try to upgrade using RVM, I run this command:

[~]$rvm upgrade 1.9.3-p194 1.9.3-p362

And then it asks me for confirmation, I say Yes, and it runs, and then it gives me error:

Installing new ruby ruby-1.9.3-p362
No binary rubies available for: downloads/ruby-1.9.3-p362.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p362, this may take a while depending on your cpu(s)...
ruby-1.9.3-p362 - #downloading ruby-1.9.3-p362, this may take a while depending on your connection...
ruby-1.9.3-p362 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p362 (already extracted)
Patch segfault_fix_7629 was already applied.
ruby-1.9.3-p362 - #configuring
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p362 --with-opt-dir=/usr/local/rvm/usr', please read /usr/local/rvm/log/ruby-1.9.3-p362/configure.log
There has been an error while running configure. Halting the installation.
Migrating gems from 1.9.3-p194 to ruby-1.9.3-p362
Ruby 'ruby-1.9.3-p362' is not installed - please install it first.
Error migrating gems.

So then I run:

[~]$rvm install ruby-1.9.3-p362

and I get this for error:

No binary rubies available for: downloads/ruby-1.9.3-p362.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p362, this may take a while depending on your cpu(s)...
ruby-1.9.3-p362 - #downloading ruby-1.9.3-p362, this may take a while depending on your connection...
ruby-1.9.3-p362 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p362 (already extracted)
Patch segfault_fix_7629 was already applied.
ruby-1.9.3-p362 - #configuring
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p362 --with-opt-dir=/usr/local/rvm/usr', please read /usr/local/rvm/log/ruby-1.9.3-p362/configure.log
There has been an error while running configure. Halting the installation.

So then I went to open up that log file that it's referencing to, and here are the contents:

[2013-01-15 23:01:13] env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p362 --with-opt-dir=/usr/local/rvm/usr
checking build system type... x86_64-apple-darwin11.4.2
checking host system type... x86_64-apple-darwin11.4.2
checking target system type... x86_64-apple-darwin11.4.2
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.

Please advise on what's happening here and how to correct this issue.

Thank you in advance.

Community
  • 1
  • 1
Xander
  • 955
  • 1
  • 11
  • 15
  • Ruby 1.9.3-p362 has [some reports](http://www.google.com/search?q=ruby+1.9.3-p362+segmentation+fault) of causing segmentation faults. You might want to upgrade to 1.9.3-p327 instead. – the Tin Man Jan 16 '13 at 05:36
  • 1
    possible duplicate of "[How can I install Ruby 1.9.3 in Mac OS X Lion?](http://stackoverflow.com/questions/8139138/how-can-i-install-ruby-1-9-3-in-mac-os-x-lion)" and [Error installing Ruby with RVM (OSX 10.8)](http://stackoverflow.com/questions/14072524/error-installing-ruby-with-rvm-osx-10-8) – the Tin Man Jan 16 '13 at 05:41
  • What is in `config.log`? – Yevgeniy Anfilofyev Jan 16 '13 at 06:32
  • @theTinMan I've tried running 'rvm install 1.9.3 --with-gcc=clang' earlier today and yesterday, same result, and I actually came across those posts before also. So I just ran 'rvm get head' and it told me that I had an issue with some ruby parts and told me to run this command: 'sudo sed -i'' -e "s#rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include')#rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include')#" /etc/rvmrc' Ran install again and it works! – Xander Jan 16 '13 at 07:37
  • @YevgeniyAnfilofyev The contents of that log file is the last one that's pasted in my question:
    [2013-01-15 23:01:13] env LDFLAGS=-L/opt/s.....
    – Xander Jan 16 '13 at 08:48

0 Answers0