我正在尝试使用RVM在OS X Lion上安装Rails的问题.
到目前为止,我已经完成了以下工作:
rvm install 1.8.7.注意:我需要使用1.8.7而不是1.9.2.rvm 1.8.7.rvm gemset create rails3.rvm use 1.8.7@rails3.要安装Rails,我运行了命令,gem install rails但是我收到以下错误:
/Users/m/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/timeout.rb:60: [BUG]分段错误
尝试运行任何gem命令时会发生同样的错误,所以我认为这不是Rails的问题.
从下面的链接来看,我似乎并不是唯一有这个问题的人:
http://twitter.com/#!/pingles/status/66261101351927809 和https://github.com/carlhuda/bundler/issues/1058
我检查了所有其他类似的答案,没有一个与我的完全一样,这些解决方案都没有为我工作.
gem environment并sudo gem environment给出相同的结果:
RubyGems Environment:
- RUBYGEMS VERSION: 1.5.3
- RUBY VERSION: 1.8.7 (2011-12-28 patchlevel 357) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.8
- /home/ava/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
Run Code Online (Sandbox Code Playgroud)
rvm -v : rvm …
我将rvm升级到1.15.8,然后在zsh中出现问题后又回到了1.15.7.降级后,我的Ruby 1.9+版本恢复正常,但1.8.7将无法再次安装.
发生了两个错误:
Error running 'patch -F 25 -p1 -N -f <"/Users/me/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch"', please read /Users/me/.rvm/log/ruby-1.8.7-p352/patch.apply.stdout-rouge-fix.log
Run Code Online (Sandbox Code Playgroud)
该文件的内容是:
[2012-09-11 01:05:59] patch -F 25 -p1 -N -f <"/Users/me/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch"
patching file lib/mkmf.rb
Hunk #1 FAILED at 201.
1 out of 1 hunk FAILED -- saving rejects to file lib/mkmf.rb.rej
Run Code Online (Sandbox Code Playgroud)
和:
Error running 'make ', please read /Users/me/.rvm/log/ruby-1.8.7-p352/make.log
Run Code Online (Sandbox Code Playgroud)
运行make时出错.暂停安装.
并且该文件的内容是(只有以错误开头的前几行):
Fail to find [tclConfig.sh, tkConfig.sh]
Use MacOS X Frameworks.
Find Tcl/Tk libraries. Make tcltklib.so which is required by Ruby/Tk.
gcc-4.2 -I. -I../.. -I../../. -I../.././ext/tk -DHAVE_RB_SAFE_LEVEL …Run Code Online (Sandbox Code Playgroud) 当我尝试使用以下方法在Snow Leopard上安装Ruby 1.9.2时:
rvm install 1.9.2
Run Code Online (Sandbox Code Playgroud)
我得到以下内容:
ERROR: Error running 'make ', please read /Users/mary/.rvm/log/ruby-1.9.2-p180/make.log
ERROR: There has been an error while running make. Halting the installation.
Run Code Online (Sandbox Code Playgroud)
所以,我查看make.log.它的结尾是:
readline.c: In function ‘username_completion_proc_call’:
readline.c:1386: error: ‘username_completion_function’ undeclared (first use in this
function)
readline.c:1386: error: (Each undeclared identifier is reported only once
readline.c:1386: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [mkmain.sh] Error 1
Run Code Online (Sandbox Code Playgroud)
我已经咨询了这个问题的其他答案,并做了一切建议:
我的.bash_profile的结尾添加了以下行:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
Run Code Online (Sandbox Code Playgroud)我尝试更新readline,但无论如何,我继续收到有关运行'make'的错误消息.
rvm …
我可以在运行Mountain Lion的Mac上安装任何Ruby版本
我确保Brew Doctor一切都很好.
当我运行ie rvm intall 1.9.3-head我得到以下内容.
From git://github.com/ruby/ruby
* branch ruby_1_9_3 -> FETCH_HEAD
Already up-to-date.
Copying from repo to src path...
ruby-1.9.3-head - #autoreconf
ruby-1.9.3-head - #configuring
ruby-1.9.3-head - #compiling
Error running 'make', please read /Users/lee/.rvm/log/ruby-1.9.3-head/make.log
There has been an error while running make. Halting the installation.
lee$ mate /Users/lee/.rvm/log/ruby-1.9.3-head/make.log
Run Code Online (Sandbox Code Playgroud)
这是make.log http://pastie.org/private/wt48jlhlng9tgbdgqap8q
请任何人都可以提供建议.看起来MD5是个问题?我不是命令行的专家,所以任何帮助都会很棒.
提前致谢.
我正在尝试(重新)使用rvm 1.29.1在运行OS X Sierra的全新MBP上安装ruby 1.8.7.我HAVE完成这件事的工作,我不是在一个位置切换到更新版本或任何不幸.
我有一个功能安装,但在一个项目中得到一些奇怪的错误后决定尝试完全干净的重新安装rvm(并最终自制!)(长篇故事 - 从名称中删除不需要的空间后,文件结构已损坏我的主目录!).我小心地从.bashrc,.profile等删除了旧安装的所有痕迹,跟随此处的其他帖子.2.4.0安装并运行正常.但是,在尝试安装1.8.7时:
9bxbniv1:~ Rob$ rvm install ruby-1.8.7
Warning! Requested ruby installation which requires another ruby available - installing ruby-1.8.7-p374 first.
ruby-1.8.7-p374 - #removing src/ruby-1.8.7-p374..
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl@1.1/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/Rob/.rvm/rubies/ruby-1.8.7-p374, this may take a while depending on your cpu(s)...
ruby-1.8.7-p374 - #downloading ruby-1.8.7-p374, this may take a while depending on your connection...
ruby-1.8.7-p374 - #extracting ruby-1.8.7-p374 to …Run Code Online (Sandbox Code Playgroud)