복붙노트

[RUBY-ON-RAILS] OSX의 독불 장군에 설치하지 "보석은 therubyracer -v '0.10.2'설치"

RUBY-ON-RAILS

OSX의 독불 장군에 설치하지 "보석은 therubyracer -v '0.10.2'설치"

사용 매버릭스에 therubyracer 설치하려고 "보석 설치 therubyracer -v '0.10.2'"그러나 나는 다음과 같은 오류를 얻고있다 :

/Users/dennischen/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for main() in -lobjc... yes
creating Makefile

make
compiling rr.cpp
clang: warning: argument unused during compilation: '-rdynamic'
rr.cpp:48:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
1 warning generated.
compiling v8.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_array.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_callbacks.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_context.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_date.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_debug.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_exception.cpp
clang: warning: argument unused during compilation: '-rdynamic'
v8_exception.cpp:10:16: warning: unused variable 'stack' [-Wunused-variable]
  static void* stack[20];
               ^
1 warning generated.
compiling v8_external.cpp
clang: warning: argument unused during compilation: '-rdynamic'
v8_external.cpp:10:9: warning: unused variable 'references' [-Wunused-variable]
  VALUE references;
        ^
1 warning generated.
compiling v8_function.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_handle.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_locker.cpp
clang: warning: argument unused during compilation: '-rdynamic'
v8_locker.cpp:45:5: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
v8_locker.cpp:85:5: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
2 warnings generated.
compiling v8_message.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_object.cpp
clang: warning: argument unused during compilation: '-rdynamic'
v8_object.cpp:77:19: warning: unused variable 'proto' [-Wunused-variable]
    Handle<Value> proto(rr_rb2v8(prototype));
                  ^
1 warning generated.
compiling v8_script.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_string.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_template.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_try_catch.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_v8.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_value.cpp
clang: warning: argument unused during compilation: '-rdynamic'
v8_value.cpp:100:9: warning: unused function 'ToInt32' [-Wunused-function]
  VALUE ToInt32(VALUE self) {
        ^
1 warning generated.
compiling v8_weakref.cpp
clang: warning: argument unused during compilation: '-rdynamic'
linking shared-object v8.bundle
clang: error: no such file or directory: '/Users/dennischen/.rvm/gems/ruby-1.9.3-p194@panini/gems/libv8-3.3.10.4/lib/libv8/build/v8/libv8.a'
make: *** [v8.bundle] Error 1

누군가의 도움이 날 일이 보석을 얻는 방법을 알아낼 수 있습니까? 나는 설치 명령 줄 도구가 있습니다.

해결법

  1. ==============================

    1.당신이 새로운 therubyracer 보석 버전을 사용하기로 결정한 경우, 당신은 더 이상이 문제가 없을 것

    당신이 새로운 therubyracer 보석 버전을 사용하기로 결정한 경우, 당신은 더 이상이 문제가 없을 것

    그렇지 않으면:

    brew tap homebrew/dupes # Thanks Tom
    brew install apple-gcc42
    
    export CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2
    export CXX=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2
    export CPP=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2
    
    brew uninstall v8
    
    gem uninstall libv8
    
    gem install therubyracer -v '0.10.2' # specify version
    
  2. ==============================

    2.내가 마지막으로 가지고 그래서 어떤 투쟁 후 작업 ... 시몬과 알바 덕분에.

    내가 마지막으로 가지고 그래서 어떤 투쟁 후 작업 ... 시몬과 알바 덕분에.

    난 내 시스템 V8을 제거 그래서 나는 ... 시스템 V8은 --with-나를 위해 작동하지 않았다 플래그를 사용하지만 추가 할 한 가지가

    양조 제거 V8

    그리고 실행

    보석 libv8 설치

    이미 보석은 그 보석 버전을 제거해야 시스템 V8 플래그 libv8 설치 실행 한 경우 (보석 제거 libv8을 실행하여 그것을 할). 중요한 것은 당신이 양조가 제공하는 하나를 사용하지 않도록, 그것은 매버릭스에서 작업 (그것을 잘 설치됩니다하고 사용 V8하려고 할 때 들러는 번들이 완료 있지만, 앱이 실패 할보고하지 않는 것 ).

    brew install apple-gcc42
    sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 /usr/bin/gcc
    sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 /usr/bin/g++
    sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2 /usr/bin/cpp
    
    brew uninstall v8
    gem install libv8
    gem install therubyracer
    
  3. ==============================

    3.나는 이것이 나를 위해 작동, 같은 문제가 있었다 :

    나는 이것이 나를 위해 작동, 같은 문제가 있었다 :

    가장 먼저:

    후이 시도해 볼 수도 있습니다 :

  4. ==============================

    4.난 그냥 같은 문제를 가지고 하나 개의 솔루션은 보석을 컴파일하는 대신 그 소리의 사과 gcc42를 사용하실 수 있습니다 :

    난 그냥 같은 문제를 가지고 하나 개의 솔루션은 보석을 컴파일하는 대신 그 소리의 사과 gcc42를 사용하실 수 있습니다 :

    brew install apple-gcc42
    

    그리고 당신은 {GCC, g ++, C ++} 바이너리는 / usr / bin에 약간의 심볼릭 링크하고있는 사이에 선택의 여지가 :

    sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 /usr/bin/gcc
    sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 /usr/bin/g++
    sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2 /usr/bin/cpp
    

    사실 g ++에서 충분합니다.

    아니면 ... 당신이 사제에 의해 생성 된 바이너리에 해당하는 경로와 CC / CXX / CPP 환경 변수를 내보낼 수 있습니다. 그건 확실히 청소기 해결 방법입니다.

    세 번째 솔루션은 엑스 코드 4.6.3을 다운로드하고 응용 프로그램 폴더에 설치하는 것입니다. 그런 다음, 터미널에 입력 :

    sudo xcode-select --switch /Applications/Xcode4.6.3.app/Contents/Developer
    gem install therubyracer
    

    보석이 설치되면 당신은 엑스 코드 5.0로 다시 전환 할 수 있습니다 :

    sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
    
  5. ==============================

    5.나는 사과 gcc42를 설치하지 않고 일을 해결 방법을 발견했다.

    나는 사과 gcc42를 설치하지 않고 일을 해결 방법을 발견했다.

    오류 메시지가이 같은 모습을 얻고있는 경우에 작동합니다 :

    clang: error: no such file or directory: '/Users/mscottford/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4/lib/libv8/build/v8/libv8.a'
    

    그런 다음 다음을 수행 할 수 있어야한다 :

    brew install v8
    bundle install 
    # after failing create link from brew installed v8 to error location
    ln -s /usr/local/Cellar/v8/3.21.17/lib/libv8_base.x64.a /Users/mscottford/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4/lib/libv8/build/v8/libv8.a
    bundle install
    

    출처 : https://github.com/cowboyd/therubyracer/issues/277#issuecomment-27734348

  6. ==============================

    6.많은 답변에서 제안으로 할 수있는 가장 쉬운 방법은 애플 GCC 4.2 (대신 엑스 코드와 함께 설치 버전의)와 루비 레이서 네이티브 확장을 컴파일하는 것입니다.

    많은 답변에서 제안으로 할 수있는 가장 쉬운 방법은 애플 GCC 4.2 (대신 엑스 코드와 함께 설치 버전의)와 루비 레이서 네이티브 확장을 컴파일하는 것입니다.

    당신은 MacPorts를를 사용하는 경우 수동으로 GCC 바이너리에 대한 심볼릭 링크를 설정 처리 할 필요가 없습니다. 포트 선택 명령은 당신을 위해 그것을 않습니다. 당신은 매버릭스를 설치 한 이후 MacPorts를 업데이트하지 않은 경우 sudo는 포트 인 SelfUpdate을한다. - - 날짜 MacPorts를 통해 다음을 시도하십시오

    # If you don't have it, install the port for Apple's GCC 4.2
    sudo port install apple-gcc42 
    
        # OR
    
    # If you had apple-gcc42 already (before Mavericks), update it
    sudo port upgrade apple-gcc42
    
    
    # Same result as manual symlinking of GCC in other answers
    sudo port select gcc apple-gcc42 && hash -r
    
    # Install therubyracer, will install libv8 gem dependency
    #  *note* if you have any existing versions of these gems, remove them
    gem install therubyracer
    
    # Restore GCC to system default (optional)
    sudo port select gcc none && hash -r
    

    일반적으로이 과정에서 (sudo는 포트 선택 GCC는 [버전]) 대신 엑스 코드 (10.9 매버릭스 / 엑스 코드 5 애플 LLVM의 V5)에 의해 설치된 하나의 특정의 GCC 버전을 사용하고자하는 모든 시간을 작동합니다.

  7. ==============================

    7.나는 therubyracer 0.12와 루비 2.0.0p353에 libv8 3.16.14.3 및 OS X 10.9를 설치 관리

    나는 therubyracer 0.12와 루비 2.0.0p353에 libv8 3.16.14.3 및 OS X 10.9를 설치 관리

    libv8는 gcc42이 필요

    brew install v8
    brew install apple-gcc42
    sudo ln -sf /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 /usr/bin/gcc
    sudo ln -sf /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 /usr/bin/g++
    sudo ln -sf /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2 /usr/bin/cpp
    gem install libv8
    

    therubyracer 나중에 GCC가 필요합니다

    brew install gcc49
    sudo ln -sf /usr/local/Cellar/gcc49/4.9-20131110/bin/gcc-4.9 /usr/bin/gcc
    sudo ln -sf /usr/local/Cellar/gcc49/4.9-20131110/bin/g++-4.9 /usr/bin/g++
    sudo ln -sf /usr/local/Cellar/gcc49/4.9-20131110/bin/cpp-4.9 /usr/bin/cpp
    

    Gemfile

    gem 'therubyracer', :require => 'v8', :platforms => :ruby
    

    therubyracer 설치 대신 보석의 번들 사용

  8. ==============================

    8.이 사람이 문제가에 대한 therubyracer 설치하는 안전 장치 및 깨끗한 방법 (NO 심볼릭 링크)을해야한다.

    이 사람이 문제가에 대한 therubyracer 설치하는 안전 장치 및 깨끗한 방법 (NO 심볼릭 링크)을해야한다.

    에서 촬영 : 보석은 0.11.4는 OS X 10.10에 실패 therubyracer -v를 설치

    6.1.1, 6.2 베타 6.3 베타 (이 하나가 필요하다) 4.6.3 (이미 다음 버전이없는 경우) 엑스 코드를 설치

    아직 수행하지 않은 경우 보석 제거 libv8

    엑스 코드 4.6.3로 전환

    sudo는 엑스 코드 - 선택 --switch /Applications/Xcode4.6.3.app/Contents/Developer

    보석 설치 libv8 -v '3.11.8.17'또는 어느 버전 therubyracer의 버전에 연결되어

    엑스 코드 6.1.1에 스위치는 6.2 베타 6.3 베타는 (당신이 당신의 전류, 엑스 코드의 설치이 줄을 조정 시도하려는 경우 나, 나는이 작품의 3을 확인했습니다)

    sudo는 엑스 코드 - 선택 --switch /Applications/Xcode6.1.1.app/Contents/Developer

    보석은 설치 therubyracer -v '0.11.4'또는 설치하려는 버전.

  9. ==============================

    9.libv8와 함께 작동하도록 그걸 얻기 위해 therubyracer 0.12.0를 설치하려고 할 때 나는 거의 동일한 오류가 발생했습니다. 이것은 나를 위해 일한 :

    libv8와 함께 작동하도록 그걸 얻기 위해 therubyracer 0.12.0를 설치하려고 할 때 나는 거의 동일한 오류가 발생했습니다. 이것은 나를 위해 일한 :

    $ brew upgrade gcc
    
    $ gem uninstall therubyracer
    
    $ gem uninstall libv8
    
    $ gem install therubyracer -v '0.12.0'
    Fetching: therubyracer-0.12.0.gem (100%)
    Building native extensions.  This could take a while...
    Successfully installed therubyracer-0.12.0
    1 gem installed
    
    $ gem install libv8 -v '3.16.14.3' -- --with-system-v8
    Fetching: libv8-3.16.14.3.gem (100%)
    Building native extensions with: '--with-system-v8'
    This could take a while...
    Successfully installed libv8-3.16.14.3
    1 gem installed
    
  10. ==============================

    10.나는 OS X 매버릭스에 OS X 마운틴 라이온에서 업그레이드이 같은 문제가 없었다.

    나는 OS X 매버릭스에 OS X 마운틴 라이온에서 업그레이드이 같은 문제가 없었다.

    루비-1.8.7-375에 루비 1.8.7-p354에서 업그레이드 나를 위해 트릭을했다.

    RC1에 아마 루비에서 업그레이드하려고 1.9.3-p194 (1.9.3 지금 p484 이상)

    당신이 rbenv를 사용하는 가정 :

    rbenv install 1.9.3-rc1
    rbenv rehash
    rbenv global 1.9.3-rc1
    bundle install
    
  11. ==============================

    11.나는 매버릭스에서 요세미티로 업그레이드 한 후이 문제를 가지고 있었다. 문제는 내가 OSX의 이전 버전과 내 루비 버전을 컴파일 된 것이 었습니다.

    나는 매버릭스에서 요세미티로 업그레이드 한 후이 문제를 가지고 있었다. 문제는 내가 OSX의 이전 버전과 내 루비 버전을 컴파일 된 것이 었습니다.

    만약 I 달렸다

    루비 -rubygems -e '풋 보석 :: Platform.new (RUBY_PLATFORM)'

    나는 x86_64에-다윈-13 대신 요세미티를위한 x86_64에-다윈-14 얻을 것입니다.

    루비 I를 다시 설치하려면

    그럼 위의 모든 솔루션을 시도한 후 오류없이 설치 번들 실행 할 수 있었다.

  12. ==============================

    12.내가 한 일은 OSX 매버릭스에이었다 :

    내가 한 일은 OSX 매버릭스에이었다 :

    git clone git@github.com:cowboyd/therubyracer.git
    

    그때:

    gem build therubyracer.gemspec
    gem install therubyracer-0.12.1.gem
    

    이 절차는 libv8의 바이너리 버전을 다운로드하고 설치했습니다.

  13. from https://stackoverflow.com/questions/19630154/gem-install-therubyracer-v-0-10-2-on-osx-mavericks-not-installing by cc-by-sa and MIT license