10.10 Yosemite에 Rubyracer gem을 설치하는 방법은 무엇입니까?
Yosemite 10.10에 Rubyracer gem을 설치할 수 없습니다.
다음은 로그입니다.
11:53 $ gem install libv8 -v '3.16.14.3'---with-system-v8 '--with-system-v8'을 사용하여 기본 확장 빌드 시간이 좀 걸릴 수 있습니다 ... libv8-3.16.14.3을 성공적으로 설치했습니다. libv8-3.16.14.3에 대한 구문 분석 문서 libv8-3.16.14.3 용 ri 문서 설치 0 초 후 libv8에 대한 문서 설치 완료 보석 1 개 설치 02:05 $ gem install therubyracer -v '0.12.1'---with-system-v8 '--with-system-v8'을 사용하여 기본 확장 빌드 시간이 좀 걸릴 수 있습니다 ... 오류 : Rubyracer 설치 오류 : 오류 : gem 기본 확장을 빌드하지 못했습니다. /usr/local/var/rbenv/versions/2.1.2/bin/ruby extconf.rb --with-system-v8 -lpthread에서 main () 확인 중 ... 예 -lobjc에서 main () 확인 중 ... 예 v8.h 확인 중 ... 아니요 *** extconf.rb 실패 *** 어떤 이유로 인해 Makefile을 만들 수 없습니다. 라이브러리 및 / 또는 헤더. 자세한 내용은 mkmf.log 파일을 확인하십시오. 당신은 할 수있다 구성 옵션이 필요합니다. 제공된 구성 옵션 : --opt-dir 포함 --opt-dir없이 -옵션 포함 포함 --without-opt-include = $ {opt-dir} / include --opt-lib 사용 --without-opt-lib = $ {opt-dir} / lib --with-make-prog --- make-prog없이 --srcdir =. --curdir --ruby = / usr / local / var / rbenv / versions / 2.1.2 / bin / ruby --pthreadlib 사용 --pthreadlib없이 --with-objclib --objclib없이 -디버그 활성화 -디버그 비활성화 --v8-dir 사용 --v8-dir없이 --with-v8-include --without-v8-include = $ {v8-dir} / include --v8-lib 사용 --without-v8-lib = $ {v8-dir} / lib /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.3/ext/libv8/location.rb:50:in`configure ': 시스템에있는 V8 버전을 사용하도록 선택했습니다 (Libv8 :: Location :: System :: NotFoundError). libv8 rubygem과 함께 번들로 제공되는 제품은 * 아닙니다 *. 하나, 찾을 수 없습니다. 버전이 있는지 확인하십시오 설치된 3.16.14.3과 호환되는 v8. 당신은 할 수있다 비표준 인 경우 특별한 --with-v8-dir 옵션이 필요합니다. 위치 감사, 관리 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.3/lib/libv8.rb:7 : 'configure_makefile'에서 extconf.rb : 32 : in` '에서 extconf 실패, 종료 코드 1 Gem 파일은 검사를 위해 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/therubyracer-0.12.1에 설치되어 있습니다. /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/therubyracer-0.12.1/gem_make에 기록 된 결과. 밖
git clone https://github.com/cowboyd/libv8.git
cd libv8
bundle install
bundle exec rake clean build binary
gem install pkg/libv8-3.16.14.3-x86_64-darwin-12.gem #note that libv8 version may change, so tab through files in pkg/, also remember to use the one with version specified
그런 다음 프로젝트 보석을 번들로 묶으십시오.
이것이 10.10 (루비 2.1.2)에서 저에게 효과가 있었던 유일한 방법입니다.
gem uninstall libv8
brew install v8
gem install therubyracer
gem install libv8 -v '3.16.14.3' -- --with-system-v8
이것이 10.10 (루비 2.1.2)에서 저에게 효과가 있었던 유일한 방법입니다.
또는 gem install libv8 -v 'XX.XX.XX' -- --with-system-v8
gem의 버전을 추가 해보세요. :)
이번에는 어떤 답변도 저에게 효과가 없습니다. 나는 이것을 너무 사용했다.
brew tap homebrew/versions
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install
rubyracer Github 문제에서 확인되었습니다.
다른 사람에게 도움이되기를 바랍니다.
누군가에게 유용 할 수도 있지만 libv8의 문제로 인해 Rubyracer를 설치하는 데 문제가있었습니다. 해결책은 내가 설치 한 모든 libv8 을 제거 하는 것이 었습니다. Rubyracer 설치
$ gem uninstall libv8
$ gem install therubyracer -v '0.12.0'
Fetching: libv8-3.16.14.7-x86_64-darwin-14.gem ( 57%)
Fetching: libv8-3.16.14.7-x86_64-darwin-14.gem (100%)
Successfully installed libv8-3.16.14.7-x86_64-darwin-14
Building native extensions. This could take a while...
Successfully installed therubyracer-0.12.0
2 gems installed
누군가에게 도움이되기를 바랍니다.
이것은 업스트림에서 수정 된 것 같습니다. 저와 @aurels, @Mike Causer 및 @Juanda에게 효과가 있었던 것은 다음과 같습니다.
bundle update libv8
This worked for me very well on my Yosemite and Ruby 2.1.5 (Ruby through RVM)
gem install libv8 -v '3.16.14.3' -- --with-system-v8
Earlier it was giving me error Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
for libv8 gem version 3.16.14.3
I was able to proceed with ruby racer after rm Gemfile.lock
beforehand: I installed v8 via brew install v8
, and then did gem install libv8 -v '3.16.14.3' -- --with-system-v8
and I am running 10.10 Yosemite
Only this works for me in my Yosemite, Ruby 2.1.2:
gem install libv8 -v '3.16.14.3' -- --with-system-v8
brew link --overwrite v8-315 --force
gem install therubyracer -v '0.12.2' -- --with-system-v8
They have corrected this issue in the most recent version of libv8. See: https://github.com/cowboyd/libv8/issues/123
You should install from the github repo, in rails I added a line to my gemfile like this gem "libv8", git: "git://github.com/cowboyd/libv8.git", submodules: true
EDIT:
This apparently only solves some of the problem. I installed the new version of libv8, but now the rubyracer is still looking for the other one I think? Still looking into it.
I had the same issue on Yosemite. My solution is similar to what appears above.
Use gem uninstall libv8
to remove anything that might be installed.
Leave therubyracer in your Gemfile, but remove any explicit reference to libv8.
Run bundle install
.
libv8 then installed fine as a dependency.
Updated answer for 2018.
I'm on High Sierra, on Homebrew 1.6.1
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8@3.15/
Is what worked for me.
Credit goes to @coding-addicted for his original answer.
After hours of trying simply upgrading ruby worked:
brew install ruby
and then adding the following to gem file:
gem 'libv8'
gem 'therubyracer'
I did the following
gem install therubyracer
which now installs therubyracer 0.12.1
which installs the dependency libv8 (3.16.14.7 x86_64-darwin-14)
which installed with no errors.
I did this using ruby 2.1.5
which I installed via:
CC=/usr/bin/gcc rbenv install 2.1.5
which I did after running brew upgrade ruby-builds
.
After installing ruby 2.1.5
, I also ran
gem upgrade --system
to get rubygems-update 2.4.5
this happens due to some conflicts with the libv8 as well, although you can just assign a version to the rubyracer and it will be installed:
change the following in the gemfile:
gem 'therubyracer', '~> 0.12.1'
and do bundle install
What worked for me, based on the following comment,
https://github.com/cowboyd/therubyracer/issues/304#issuecomment-62046085
was to remove Gemfile.lock and then run bundle install
A heads up to anyone that might have been having my issue: I ended up uninstalling my ruby version in RVM and then reinstalling it. That seemed to use the correct dependancies in the latest version of xcode tools for compiling ruby.
rvm list
rvm uninstall ruby-x.x.x
rvm install ruby-x.x.x
This solution worked for me following Jakub Troszok's solution above with just a minor change
gem uninstall libv8
gem install therubyracer -v '0.12.1'
Fetching: libv8-3.16.14.19-x86_64-darwin-18.gem (100%)
Successfully installed libv8-3.16.14.19-x86_64-darwin-18
Building native extensions. This could take a while...
Successfully installed therubyracer-0.12.1
Parsing documentation for libv8-3.16.14.19-x86_64-darwin-18
Installing ri documentation for libv8-3.16.14.19-x86_64-darwin-18
Parsing documentation for therubyracer-0.12.1
Installing ri documentation for therubyracer-0.12.1
Done installing documentation for libv8, therubyracer after 0 seconds
2 gems installed
gem install libv8 -v '3.16.14.17' -- --with-system-v8 (if the libv8 version required for your project is different from the one installed by rubyracer)
bundle install
참고URL : https://stackoverflow.com/questions/24081473/how-to-install-therubyracer-gem-on-10-10-yosemite
'IT박스' 카테고리의 다른 글
Docker 빌드“ 'archive.ubuntu.com'을 해결할 수 없습니다.”apt-get이 아무것도 설치하지 못함 (0) | 2020.08.31 |
---|---|
해시 테이블에 비해 이진 검색 트리의 장점 (0) | 2020.08.31 |
운영 체제에서 사용자 모드와 커널 모드의 차이점은 무엇입니까? (0) | 2020.08.30 |
T-SQL은 저장 프로 시저의 SELECTed 값을 가져옵니다. (0) | 2020.08.30 |
알고리즘이 O (log log n) 복잡성을 갖게하는 원인은 무엇입니까? (0) | 2020.08.30 |