Ruby Ruby 2.4.0-preview1 发布啦

huacnlee · 2016年06月21日 · 最后由 chenjau 回复于 2016年06月23日 · 3475 次阅读

Ruby 2.4.0-preview1 is the first preview of Ruby 2.4.0. This preview1 is released earlier than usual because it includes so many new features and improvements. Feel free to send feedback since you can still change the features.


  • Unify Fixnum and Bignum into Integer
  • String supports Unicode case mappings
  • Performance improvements (Array, Regex)


rvm get head
rvm install 2.4.0-preview1
ruby-2.4.0-preview1 - #removing src/ruby-2.4.0-preview1 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/ruby-2.4.0-preview1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/jason/.rvm/rubies/ruby-2.4.0-preview1, this may take a while depending on your cpu(s)...
ruby-2.4.0-preview1 - #downloading ruby-2.4.0-preview1, this may take a while depending on your connection...
ruby-2.4.0-preview1 - #extracting ruby-2.4.0-preview1 to /Users/jason/.rvm/src/ruby-2.4.0-preview1 - please wait
ruby-2.4.0-preview1 - #configuring - please wait
ruby-2.4.0-preview1 - #post-configuration - please wait
ruby-2.4.0-preview1 - #compiling - please wait
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/jason/.rvm/log/1466474295_ruby-2.4.0-preview1/make.log
compiling safe.c
compiling signal.c
compiling sprintf.c
compiling st.c
compiling strftime.c
compiling string.c
compiling struct.c
compiling symbol.c
compiling thread.c
thread.c:1088:27: error: implicit conversion loses integer precision: 'long' to '__darwin_suseconds_t' (aka 'int') [-Werror,-Wshorten-64-to-32]
        tp->tv_usec = ts.tv_nsec / 1000;
                    ~ ~~~~~~~~~~~^~~~~~
1 error generated.
make: *** [thread.o] Error 1
+__rvm_make:0> return 2
There has been an error wh

额,macOS 10.12 Beta 下面编译不过

#2 楼 @huacnlee 升级了一次 10.11 之后就不敢随便升级了,到现在还是 10.10 不知道什么时候能发布 3.0 啊


删掉 Makefile 中的 -Werror=shorten-64-to-32 , 然后 make install 试试?

刚测了下,2.4.0preview1 和 rails5 rc2 配合好像没什么问题。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号