2013-10-15 37 views
1

我很沮丧,因为我已经尝试了其他的StackOverflow文章,但是在修复我自己的错误方面一直没有成功。当我打电话在ruby 2.0.0p247上替代'ruby-debug19'(罪魁祸首'linecache19')?

'gem install linecache19' 

...以下错误outputed

ERROR: Error installing linecache19: 
    ERROR: Failed to build gem native extension. 

    /home/user/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb 
checking for vm_core.h... no 
/home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39:in `create_makefile_with_core': Use RbConfig instead of obsolete and deprecated Config. 
/home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39:in `create_makefile_with_core': Use RbConfig instead of obsolete and deprecated Config. 
checking for vm_core.h... no 
*** 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=/home/user/.rvm/rubies/ruby-2.0.0-p247/bin/ruby 
    --with-ruby-dir 
    --without-ruby-dir 
    --with-ruby-include 
    --without-ruby-include=${ruby-dir}/include 
    --with-ruby-lib 
    --without-ruby-lib=${ruby-dir}/ 
/home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:268:in `block (2 levels) in read': Looking for http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-2.0.0-p247.tar.gz and all I got was a 404! (URI::NotFoundError) 
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1413:in `block (2 levels) in transport_request' 
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http/response.rb:162:in `reading_body' 
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1412:in `block in transport_request' 
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1403:in `catch' 
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1403:in `transport_request' 
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1376:in `request' 
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1369:in `block in request' 
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:852:in `start' 
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1367:in `request' 
    from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:239:in `block in read' 
    from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:286:in `connect' 
    from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:234:in `read' 
    from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:128:in `download' 
    from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:55:in `block in create_makefile_with_core' 
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tempfile.rb:324:in `open' 
    from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:51:in `create_makefile_with_core' 
    from extconf.rb:19:in `<main>' 
Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-2.0.0-p247.tar.gz 


Gem files will remain installed in /home/user/.rvm/gems/ruby-2.0.0-p247/gems/linecache19-0.5.12 for inspection. 
Results logged to /home/user/.rvm/gems/ruby-2.0.0-p247/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out 

请注意罪魁祸首线...

/home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:268:in `block (2 levels) in read': Looking for http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-2.0.0-p247.tar.gz and all I got was a 404! (URI::NotFoundError) 

显然,这并不工作...网址http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-2.0.0-p247.tar.gz没有意义。 (访问Ruby1.9,然后查找Ruby2.0 tar.gz)

这是一个需要gem'ruby-debug19'的类项目(用于CS169:UC Berkeley的软件工程),它尝试安装'linecache19'。

我是否必须降级到ruby1.9,还是可以继续使用ruby2.0?

当我打电话

$ruby -v 

我得到以下...

ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux] 

我使用RVM。

我有点怀疑linecache19不支持ruby 2.0。

+0

可能是调试器的选择的版本不支持您当前的Ruby版本,更新调试宝石:'捆绑更新debugger'。 – rmagnum2002

回答

3

尝试对Ruby 2.0安装byebug,而不是调试器。您似乎已经拥有Ruby最低可支持的补丁级别。

+0

2个问题:1)ruby-debug19与调试器相同吗? 2)如果是这样,将更改为byebug损坏我现有的代码? – bjliu

+0

1)调试器是ruby-debug19的新端口。 https://github.com/cldwalker/debugger有一个“与ruby-debug19不同的地方”部分。 2)绝对不是,你只需要使用'byebug',你可以使用'debugger' – HargrimmTheBleak

0

尝试这样做:

gem install linecache19 -- --with-ruby-include=$rvm_path/src/ruby-2.0.0-p247

+0

不幸的是,我得到了同样的错误... – bjliu

+1

然后尝试使用调试器gem,而不是ruby-debug19,api调用是相同的,我认为调试器更好的支持。我刚才意识到你正在尝试使用ruby-debug19。我从来没有设法让它在1.9+上工作 'gem install debugger - --with-ruby-include = $ rvm_path/src/ruby​​-2.0.0-p247' – berislavbabic

+0

谢谢!我认为那是罪魁祸首...... 19似乎代表了Ruby1。9,我已经更新了这个问题来反映这个问题 - 现在问题变成了找到ruby-debug19的替代方法,它不适用于Ruby2.0。 – bjliu

0

在宝石文件

gem 'debugger' 

添加这一点,并给

bundle install 
2

调试器和linecache不受红宝石2.0的支持。您可以使用byebug宝石代替。

+0

来指定源代码 – chirag7jain

0

你只需要更换URL

/home/{your-user-name]/.rvm/gems/ruby-2.0.0-p645/gems/ruby_core_source-0.1.5/lib代码/ruby_core_source.rb

从1.9到2.0

相关问题