2013-08-08 4 views
1

Rails 프로젝트에서 '번들 설치'를 실행하려고합니다. 하지만Rails 디버거 (1.5.0)를 설치하면 오류가 발생합니다.

Installing debugger (1.5.0) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension 
. 

     c:/jruby-1.7.4/bin/jruby.exe extconf.rb 
NotImplementedError: C extension support is not enabled. Pass -Xcext.enabled=tru 
e to JRuby or set JRUBY_OPTS or modify .jrubyrc to enable. 

    (root) at c:/jruby-1.7.4/lib/ruby/shared/mkmf.rb:8 
    require at org/jruby/RubyKernel.java:1054 
    (root) at c:/jruby-1.7.4/lib/ruby/shared/rubygems/custom_require.rb:1 
    (root) at extconf.rb:15 


Gem files will remain installed in c:/jruby-1.7.4/lib/ruby/gems/shared/gems/debu 
gger-1.5.0 for inspection. 
Results logged to c:/jruby-1.7.4/lib/ruby/gems/shared/gems/debugger-1.5.0/ext/ru 
by_debug/gem_make.out 
An error occurred while installing debugger (1.5.0), and Bundler cannot 
continue. 
Make sure that `gem install debugger -v '1.5.0'` succeeds before bundling. 

강타있어 그럼 내가 모든 보석이 제대로 설치되어 있지만 보석 설치가 보석 디버거 중단 얻을

$ gem install debugger -v '1.5.0' 
WARNING: RubyGems 1.2+ index not found for: 


RubyGems will revert to legacy indexes degrading performance. 
Updating metadata for 1 gems from http://rubygems.org/ 
. 
complete 
ERROR: While executing gem ... (Errno::EACCES) 
    Access to the path 'c:\Program Files\IronRuby 1.1\Lib\ruby\gems\1.9.1\source 
_cache' is denied. 

시도 (1.5.0)

내 보석 ENV는 다음과 같습니다

$ gem env 
RubyGems Environment: 
    - RUBYGEMS VERSION: 1.3.7 
    - RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [i386-mswin32] 
    - INSTALLATION DIRECTORY: c:/Program Files/IronRuby 1.1/Lib/ruby/gems/1.9.1 
    - RUBY EXECUTABLE: "c:/Program Files/IronRuby 1.1/bin/ir.exe" 
    - EXECUTABLE DIRECTORY: c:/Program Files/IronRuby 1.1/bin 
    - RUBYGEMS PLATFORMS: 
    - ruby 
    - universal-dotnet-4.0 
    - GEM PATHS: 
    - c:/Program Files/IronRuby 1.1/Lib/ruby/gems/1.9.1 
    - c:/Users/swapnil/.gem/ironruby/1.9.1 
    - GEM CONFIGURATION: 
    - :update_sources => true 
    - :verbose => true 
    - :benchmark => false 
    - :backtrace => false 
    - :bulk_threshold => 1000 
    - REMOTE SOURCES: 
    - http://rubygems.org/ 

미리 감사드립니다.

+0

"RVM는 기능입니다." – thanikkal

답변

0
NotImplementedError: C extension support is not enabled. Pass -Xcext.enabled=true to JRuby or set JRUBY_OPTS or modify .jrubyrc to enable. 

이것이 문제인 것처럼 보이므로 JRuby의 C 확장 지원을 사용 설정하고 작동하는지 확인하십시오!

0

JRuby 또는 IronRuby을 사용하고 있습니까? debuggerJRuby (here 참조)과 작동하지 않지만 IronRuby으로 시도한 적이 없습니다.

0

디버거 보석은 CRuby (MRI)에서만 사용하도록되어 있습니다. 다른 Ruby 구현을 사용하는 경우 해당 플랫폼에 고유 한 디버거를 사용해야합니다.

This blog post Chris Gaffney는 Ruby 플랫폼을 기반으로 다양한 디버깅 젬을 조건부로 포함 할 수있는 방법을 설명합니다.

+0

정말이에요? 나는'debugger'가 Windows 플랫폼에서도 작동한다고 말하고 싶습니다. – deivid

+0

MRI를 사용하는 경우 Windows에서 작동합니다. 내 답변에서 "플랫폼"이 의미하는 것은 Ruby 인터프리터 유형이 아니라 OS입니다. JRuby와 IronRuby는 전혀 다른 런타임 환경 (JVM 및 CLR)을 사용하므로 다른 디버거가 필요합니다. –

+0

나는 루비 인터프리터도 의미했다. 여러분의 링크에 언급 된'bundler'의': platform' 용어를 사용하여, 적어도'mri_19'와'mingw_19'는'debugger'에 의해 지원되며, 공개 된 이슈 (https : // github. com/cldwalker/debugger/issues/46)를 사용하여'jruby'를 지원합니다. 하지만 네,'JRuby' 나'IronRuby'가'debugger'와 함께 작동하지 않는 것 같습니다. – deivid

0

RVM을 사용하고 있고 올바르게 공급되지 않은 경우에 발생할 수 있습니다.

user$ source ~/.rvm/scripts/rvm 

하고 있는지 확인 다음 명령 반환은 RVM을 사용하여 제대로 공급되지 않는 경우가 발생할 수

user$ type rvm | head -n 1 
rvm is a function 
관련 문제