RBENV 관리 Rubies : Ruby를 설치하기 위해 homebrew를 강제하는 VIM 업그레이드


4

MacOS Sierra에서 루비 관리자로 RVM에서 RBENV로 전환했습니다.

$ rbenv version
2.3.1 (set by /Users/meltemi/.rbenv/version)
$ which ruby
/Users/meltemi/.rbenv/shims/ruby

나는 Homebrew를 사용하여 같은 패키지를 설치했습니다. vim 수년 동안 Ruby 버전은 Homebrew를 통해 설치되지 않았습니다.

이제 내가 brew upgrade vim 나는 루비의 강제 의존성 설치를 얻는다.

==> Upgrading vim
==> Installing dependencies for vim: ruby
==> Installing vim dependency: ruby
==> Downloading https://homebrew.bintray.com/bottles/ruby-2.3.1_2.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring ruby-2.3.1_2.sierra.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/rake
Target /usr/local/bin/rake
already exists. You may want to remove it:
  rm '/usr/local/bin/rake'

To force the link and overwrite all conflicting files:
  brew link --overwrite ruby

To list all files that would be deleted:
  brew link --overwrite --dry-run ruby

Possible conflicting files are:
/usr/local/bin/rake
/usr/local/bin/rdoc
/usr/local/bin/ri
==> Caveats
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/ruby
==> Summary
🍺  /usr/local/Cellar/ruby/2.3.1_2: 1,261 files, 18.8M

Homebrew (읽기 : vim )를 사용하여 rbenv 루비 버전?

답변:


6

루비는 건물 의존성입니다. vim 패키지 세부 사항에 따라 자작과 함께 :

ianc.local
> brew info vim
vim: stable 8.0.0019 (bottled), HEAD
Vi "workalike" with many additional features
http://www.vim.org/
Conflicts with: ex-vi
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/vim.rb
==> Dependencies
Optional: lua ✘, luajit ✘
==> Requirements
Required: ruby >= 1.8 ✔, perl >= 5.3 ✔
Recommended: python ✔
Optional: python3 ✔
==> Options
--with-client-server
    Enable client/server mode
--with-custom-perl
    Build with a custom Perl instead of the Homebrew version.
--with-custom-python
    Build with a custom Python 2 instead of the Homebrew version.
--with-custom-ruby
    Build with a custom Ruby instead of the Homebrew version.
--with-lua
    Build vim with lua support
--with-luajit
    Build with luajit support
--with-mzscheme
    Build vim with mzscheme support
--with-override-system-vi
    Override system vi
--with-python3
    Build vim with python3 instead of python[2] support
--with-tcl
    Build vim with tcl support
--without-nls
    Build vim without National Language Support (translated messages, keymaps)
--without-perl
    Build vim without perl support
--without-python
    Build vim without python support
--without-ruby
    Build vim without ruby support
--HEAD
    Install HEAD version

그러나 보시다시피, ruby 1.8. 루비를 설치하고 있습니다. rbenv 설치된 루비를 반환하지 않을 가능성이 높습니다. ruby shim은 빌드 패키지에 의해 호출됩니다.

주어진 vim Ruby 설치에 동적으로 연결됩니다. vim을 설치하거나 업그레이드하기 전에 시스템 루비로 전환하는 것이 좋습니다. 같은 것 :

brew uninstall vim ruby
brew cleanup
rbenv global system
brew install --build-from-source vim --with-custom-ruby

설치 프로그램은 Mac에서 시스템 루비를 사용할 것입니다. Mac에서는 설치하는 동안 버전이 충분히 높습니다. 생성 된 바이너리는 생성 된 특정 루비 버전을 제거하는 경우 세그 폴트되지 않습니다. 이는 실제 문제입니다. 빌드시에 rbenv로 제어되는 루비를 사용하십시오.

또는 루비 지원없이 빌드 할 수 있습니다.

brew install vim --without-ruby

그러나 그것은 아마도 당신이 원하는 것이 아닙니다.


$ rbenv system ... rbenv: no such command 'system'. 나는 생각한다. system 버전 #을 대체합니다. 시스템 루비로 얼마나 쉽게 전환 할 수 있습니까? 이전에 설정 한 모든 항목으로 다시 돌아가십시오.
Meltemi

당신은 ~/.rbenv/version? 시험 rbenv global system.
Ian C.

좋아, 그걸 시도 했어. 그래도 작동이 안되는. 홈 브루의 루비 설치를 여전히 주장하고있다.
Meltemi

2
이것은 효과가 있었다 : brew uninstall vim ruby 그리고 rbenv global system 그리고 brew install vim --with-custom-ruby 그리고 그 시스템 루비와 컴파일하는 것 같다.
Meltemi

1
@Meltemi (bottled) 사전 컴파일 된 바이너리를 의미합니다. 사용 해보기 --build-from-source 미리 빌드 된 바이너리를 다운로드하는 대신 소스에서 빌드하게하는 것입니다. 나는 그 옵션을 포함하도록 답을 업데이트했다.
Ian C.
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.