我有一个无法加载开发控制台的 rails 3.0.7 应用程序。我不断收到错误:
Could not find rcov-0.8.1.2.0 in any of the sources
Try running `bundle install`.
当我这样做时,它一直无法安装该 gem。我收到此错误:
Installing rcov (0.8.1.2.0) with native extensions /opt/local/lib/ruby1.9/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/opt/local/bin/ruby extconf.rb
creating Makefile
make
/usr/bin/gcc-4.2 -I. -I/opt/local/include/ruby-1.9.1/x86_64-darwin10 -I/opt/local/include/ruby-1.9.1/ruby/backward -I/opt/local/include/ruby-1.9.1 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -pipe -O2 -arch x86_64 -fno-common -o callsite.o -c callsite.c
callsite.c:2:17: error: env.h: No such file or directory
callsite.c:3:18: error: node.h: No such file or directory
In file included from callsite.c:4:
/opt/local/include/ruby-1.9.1/ruby/backward/st.h:2:2: warning: #warning use "ruby/st.h" instead of bare "st.h"
callsite.c: In function ‘callsite_custom_backtrace’:
callsite.c:82: error: ‘ruby_frame’ undeclared (first use in this function)
callsite.c:82: error: (Each undeclared identifier is reported only once
callsite.c:82: error: for each function it appears in.)
callsite.c:84: error: ‘NODE’ undeclared (first use in this function)
callsite.c:84: error: ‘n’ undeclared (first use in this function)
callsite.c:89: error: dereferencing pointer to incomplete type
callsite.c:90: error: dereferencing pointer to incomplete type
callsite.c:92: error: dereferencing pointer to incomplete type
callsite.c:92: error: dereferencing pointer to incomplete type
callsite.c:93: error: dereferencing pointer to incomplete type
callsite.c:93: error: dereferencing pointer to incomplete type
callsite.c:94: error: dereferencing pointer to incomplete type
callsite.c:96: error: dereferencing pointer to incomplete type
callsite.c:96: error: dereferencing pointer to incomplete type
callsite.c:101: error: dereferencing pointer to incomplete type
callsite.c: At top level:
callsite.c:121: error: expected ‘)’ before ‘event’
callsite.c: In function ‘cov_install_callsite_hook’:
callsite.c:161: error: ‘coverage_event_callsite_hook’ undeclared (first use in this function)
callsite.c:162: error: too few arguments to function ‘rb_add_event_hook’
callsite.c: In function ‘cov_remove_callsite_hook’:
callsite.c:176: error: ‘coverage_event_callsite_hook’ undeclared (first use in this function)
make: *** [callsite.o] Error 1
Gem files will remain installed in /Users/johnmayer/.bundler/tmp/42427/gems/rcov-0.8.1.2.0 for inspection.
Results logged to /Users/johnmayer/.bundler/tmp/42427/gems/rcov-0.8.1.2.0/ext/rcovrt/gem_make.out
from /opt/local/lib/ruby1.9/1.9.1/rubygems/installer.rb:486:in `block in build_extensions'
from /opt/local/lib/ruby1.9/1.9.1/rubygems/installer.rb:446:in `each'
from /opt/local/lib/ruby1.9/1.9.1/rubygems/installer.rb:446:in `build_extensions'
from /opt/local/lib/ruby1.9/1.9.1/rubygems/installer.rb:198:in `install'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/source.rb:101:in `block in install'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/rubygems_integration.rb:78:in `preserve_paths'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/source.rb:91:in `install'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/installer.rb:58:in `block (2 levels) in run'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/rubygems_integration.rb:93:in `with_build_args'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/installer.rb:57:in `block in run'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/spec_set.rb:12:in `block in each'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/spec_set.rb:12:in `each'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/spec_set.rb:12:in `each'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/installer.rb:49:in `run'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/installer.rb:8:in `install'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/cli.rb:222:in `install'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/vendor/thor/task.rb:22:in `run'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/vendor/thor/base.rb:389:in `start'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/bundler-1.0.14/bin/bundle:13:in `<top (required)>'
from /opt/local/bin/bundle:19:in `load'
from /opt/local/bin/bundle:19:in `<main>'
红宝石:
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10]
我正在运行 rails 3.0.7,尽管 rails -v 失败并给出了相同的安装 gem 的建议。我在 OS X 10.6.7 上。
任何帮助,将不胜感激。