2011-04-22 82 views
25

你好我尝试运行束我的Windows机器上安装它运行良好,直到它到达linecache,然后吐出一个巨大的错误:Ruby on Rails的 - linecache错误,而试图“包安装”

Fetching source index for http://rubygems.org/ 
Using rake (0.8.7) 
Using abstract (1.0.0) 
Using activesupport (3.0.3) 
Using builder (2.1.2) 
Using i18n (0.5.0) 
Using activemodel (3.0.3) 
Using erubis (2.6.6) 
Using rack (1.2.2) 
Using rack-mount (0.6.14) 
Using rack-test (0.5.7) 
Using tzinfo (0.3.26) 
Using actionpack (3.0.3) 
Using mime-types (1.16) 
Using polyglot (0.3.1) 
Using treetop (1.4.9) 
Using mail (2.2.17) 
Using actionmailer (3.0.3) 
Using arel (2.0.9) 
Using activerecord (3.0.3) 
Using activeresource (3.0.3) 
Using bundler (1.0.12) 
Using thor (0.14.6) 
Using railties (3.0.3) 
Using rails (3.0.3) 
Using render_component_vho (3.0.3) 
Using verification (1.0.1) 
Using active_scaffold_vho (3.0.19) 
Using columnize (0.3.2) 
Installing linecache (0.43) with native extensions C:/Ruby192/lib/ruby/site_ruby 
/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR 
: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) 

     C:/Ruby192/bin/ruby.exe extconf.rb 
Can't handle 1.9.x yet 
*** extconf.rb failed *** 
Could not create Makefile due to some reason, probably lack of 
necessary libraries and/or headers. Check the mkmf.log file for more 
details. You may need configuration options. 

Provided configuration options: 
     --with-opt-dir 
     --without-opt-dir 
     --with-opt-include 
     --without-opt-include=${opt-dir}/include 
     --with-opt-lib 
     --without-opt-lib=${opt-dir}/lib 
     --with-make-prog 
     --without-make-prog 
     --srcdir=. 
     --curdir 
     --ruby=C:/Ruby192/bin/ruby 


Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/linecache 
-0.43 for inspection. 
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/linecache-0.43/ext/gem_mak 
e.out 
     from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:511:in `b 
lock in build_extensions' 
     from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:486:in `e 
ach' 
     from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:486:in `b 
uild_extensions' 
     from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:159:in `i 
nstall' 
     from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/sour 
ce.rb:96:in `install' 
     from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/inst 
aller.rb:55:in `block in run' 
     from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec 
_set.rb:12:in `block in each' 
     from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec 
_set.rb:12:in `each' 
     from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec 
_set.rb:12:in `each' 
     from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/inst 
aller.rb:44:in `run' 
     from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/inst 
aller.rb:8:in `install' 
     from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/cli. 
rb:225:in `install' 
     from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vend 
or/thor/task.rb:22:in `run' 
     from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vend 
or/thor/invocation.rb:118:in `invoke_task' 
     from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vend 
or/thor.rb:246:in `dispatch' 
     from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vend 
or/thor/base.rb:389:in `start' 
     from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/bin/bundle:13:in 
`<top (required)>' 
     from C:/Ruby192/bin/bundle:19:in `load' 
     from C:/Ruby192/bin/bundle:19:in `<main>' 

香港专业教育学院试着用搜索引擎的问题,并发现了两个职位,解释说我有第一个问题是Stackoveflow Post它的pritty紧挨什么Ive得到了,但经过进一步检查,我发现,在该职位给出的解决方案是我需要的不是什么 另一个是this post,似乎讨论,我有,但dosent确切的问题给解决任何一个有任何想法 我应该做??

红宝石版本=> 1.9.2

Rails的版本=>拜托它并不甚至告诉Rails版本,它只是打印出另一个错误

Could not find linecache-0.43 in any of the sources 
Try running `bundle install`. 

任何想法做什么即时通讯错误??任何帮助将非常赞赏

回答

28

你应该尝试安装linecache19代替linecache。您试图安装的Gem与Ruby 1.9.2版本不兼容。

这也由错误信息提示:

Can't handle 1.9.x yet 
+0

yey,thnks的建议, – 2011-05-05 08:26:49

+32

如果你正在ruby1.9.x(依赖于linecache19)使用ruby-debug(依赖linecache),只是linecache19是不会帮助的。你需要将ruby-debug切换到ruby-debug19。 – ramonrails 2011-10-25 19:20:55

+1

@ramonrails这是一年后,但我爱你的男人!非常感谢您发表您的评论! – Ryan 2012-11-07 17:07:14

7

1.9.2-P136 + RVM。使用红宝石debug19其安装linecache19作为一个依赖工作:

宝石安装红宝石debug19 - --with-红宝石包括= $ rvm_path/src目录/红宝石1.9.2-P136/

+0

都linechache19和红宝石debug19更顺畅的体验和更少的麻烦应该安装 – Kewin 2011-08-30 08:04:28

+0

帮我修复尝试安装离线问题。当尝试从ftp ruby​​lang中检索时,Make正在突破linecache,这个已经解决了 - 谢谢! – 2011-10-26 14:47:53

8

“调试器“宝石最近对我来说更加完美无瑕。 我从红宝石debug19到调试器,其安装的依赖关系没有任何麻烦切换。