gpt4 book ai didi

ruby-on-rails - 帮助在 Lion GM 上安装 Ruby 1.9.2

转载 作者:数据小太阳 更新时间:2023-10-29 07:43:32 24 4
gpt4 key购买 nike

尝试在我的 Lion GM 开发环境中设置 Ruby on Rails,但遇到了一些问题。安装了 rvm,当我尝试安装 ruby​​ 时,在我的 i5 iMAc 上使用 rvm install 1.9.2 总是会出错。它到达

ruby-1.9.2-p180 - #compiling

并停止并显示以下错误消息:

ERROR: There has been an error while running make. Halting the installation.
update_terminal_cwd;

in the log i get the following. Im also using Xcode 4.2 for lion. Thanks.


[2011-07-04 12:26:20] make
gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -L. -Wl,-u,_objc_msgSend main.o dmydln.o dmyencoding.o dmyversion.o miniprelude.o array.o bignum.o class.o compar.o complex.o dir.o dln_find.o enum.o enumerator.o error.o eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o math.o node.o numeric.o object.o pack.o parse.o process.o random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o sprintf.o st.o strftime.o string.o struct.o time.o transcode.o util.o variable.o compile.o debug.o iseq.o vm.o vm_dump.o thread.o cont.o ascii.o us_ascii.o unicode.o utf_8.o newline.o dmyext.o -lpthread -ldl -lobjc -o miniruby
<internal:prelude>: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin11.0.0]

-- control frame ----------
c:0003 p:0000 s:0006 b:0006 l:000005 d:000005 TOP
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001a68 d:001a68 TOP
---------------------------
-- Ruby level backtrace information ----------------------------------------
<internal:prelude>:0:in `<compiled>'

-- C level backtrace information -------------------------------------------

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

make: *** [.rbconfig.time] Abort trap: 6

最佳答案

我找到了答案 here ,@Lehi Sanchez 基本上是对的; Apple 正在为 llvm 离开 gcc,但这并不意味着 gcc 不包含在 Lion 中(前提是您安装了 Xcode/Developer Tools 包)。它位于 /usr/bin/gcc-4.2。只需在您的 .bashrc.zshrc 或其他任何内容中包含以下内容:

 export CC=/usr/bin/gcc-4.2

或者,我想您可以在使用 rvm 构建 1.9.2 之前在您的 shell 中触发该行。在任何一种情况下,请确保该行处于事件状态,然后启动你的 rvm install 1.9.2 和 presto!

关于ruby-on-rails - 帮助在 Lion GM 上安装 Ruby 1.9.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6573960/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com