Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing Ruby 2.0.0-preview1 with RVM on OS X
# First, make sure that you have the most recent rvm. Several bugs with 2.0.0-preview1
# have recently been fixed.
#
# Second, the openssl that comes with MacOS is too old for Ruby 2.0. You need to install
# a newer one with homebrew or the rvm pkg command.
# Option 1, with homebrew openssl:
brew update
brew install openssl
rvm get head
rvm install "ruby-2.0.0-preview1" --with-openssl-dir=`brew --prefix openssl`
# Option 2, with rvm pkg install openssl:
rvm get head
rvm pkg install openssl
rvm install "ruby-2.0.0-preview1" --with-openssl-dir=$rvm_path/usr
if compiled failed with output include "Building 'ruby-2.0.0-preview1' using clang - but it's not (fully) supported, expect errors.",
you should append confirgure opts -C --with-gcc=clang , like below
rvm install "ruby-2.0.0-preview1" --with-openssl-dir=`brew --prefix openssl` -C --with-gcc=clang
@wonbyte

This comment has been minimized.

Copy link

commented Feb 25, 2013

Does rvm install "ruby-2.0.0-preview1" --with-openssl-dir=brew --prefix openssl -C --with-gcc=clang command work with the new 2.0 release?

@jakevose

This comment has been minimized.

Copy link

commented Feb 25, 2013

I just did this with 2.0.0 and the -C -with-gcc=clang option (from homebrew) and can confirm that it works.

@douyw

This comment has been minimized.

Copy link

commented Feb 26, 2013

Here is another ruby 2.0.0 install guide: https://coderwall.com/p/tptocq

@wonbyte

This comment has been minimized.

Copy link

commented Feb 26, 2013

You can just do rvm install 2.0 --with-gcc=clang.

Any idea how to install ruby 2 from source?

@heliocola

This comment has been minimized.

Copy link

commented Feb 26, 2013

[UPDATE] After installing newest version of XCode and Cmd line tools it is now compiling!

I tried that and I'm having a scary error:
linking miniruby
internal:prelude:1: [BUG] Bus Error
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin11.4.2]

It is also generating ~/Library/Logs/CrashReporter and ~/Library/Logs/DiagnosticReports with stuff like this:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff94851ce2 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff8ca167d2 pthread_kill + 95
2 libsystem_c.dylib 0x00007fff8ca07a7a abort + 143
3 miniruby 0x00000001090eecb9 rb_bug + 185
4 miniruby 0x00000001091a85d6 sigbus + 54
5 libsystem_c.dylib 0x00007fff8ca68cfa _sigtramp + 26
6 miniruby 0x0000000109202adc vm_exec_core + 2460 (vm.inc:446)
7 miniruby 0x000000010921300e vm_exec + 94 (vm.c:1176)
8 miniruby 0x0000000109212f73 rb_iseq_eval + 307 (vm.c:1411)
9 miniruby 0x00000001091a38d2 ruby_process_options + 2034 (ruby.c:1172)
10 miniruby 0x00000001090f3940 ruby_options + 128 (eval.c:99)
11 miniruby 0x00000001090b61b7 main + 71 (main.c:36)
12 miniruby 0x00000001090b6164 start + 52

./Helio

@membLoper

This comment has been minimized.

Copy link

commented Mar 7, 2013

@heliocola I'm running into the exact same error. Any hints on why this occurs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.