如何在ruby-193-p125下安装linecache19 0.5.12?

时间:2012-04-21 06:29:25

标签: debugging ubuntu ruby-on-rails-3.1

我有一个Rails应用程序已运行好几个月。有一天,我浏览了Ubuntu的升级清单,并安装了所有升级程序。突然间,由于linecache失败,我无法启动我的开发服务器。我已经阅读了关于这个主题的各种主题:

ruby_threadptr_data_type error

Rails with ruby-debugger throw 'Symbol not found: _ruby_current_thread (LoadError)'

http://isitruby19.com/linecache

http://antisnatchor.com/debugging_ruby_1.9.3p125

Installing linecache19 for Ruby 1.9.2 via rvm

但是,在等待安装失败后花了好几个小时,我无法启动我的rails dev服务器。

我的版本如下:

~/app> which ruby
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p125/bin/ruby
~/app> which rvm
/usr/share/ruby-rvm/bin/rvm
~/app> rvm current
ruby-1.9.3-p125
~/app> ruby -v
ruby 1.9.3p125 (2012-02-16 revision 34643) [i686-linux]
~/app> 

以下是我尝试安装当前版本的ruby-debug时会发生什么:

~/app> gem install 'ruby-debug-base19x' 
Fetching: ruby-debug-base19x-0.11.29.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-debug-base19x:
    ERROR: Failed to build gem native extension.

        /usr/share/ruby-rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
checking for rb_method_entry_t.body in method.h... no
checking for vm_core.h... no
/usr/share/ruby-rvm/gems/ruby-1.9.3-p125/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39: Use RbConfig instead of obsolete and deprecated Config.
checking for rb_method_entry_t.body in method.h... no
checking for vm_core.h... no
*** extconf.rb failed ***

我的gemfile(无论如何相关位):

group :development, :test do
  ...
  gem 'linecache19', :git => 'git://github.com/mark-moseley/linecache'
  gem 'ruby-debug-base19x' 
  gem 'ruby-debug19'

end

任何人都知道这里到底发生了什么?我很难过。如果需要,我愿意从头开始。我只需要知道回到裸画布和画画的最佳方法。

1 个答案:

答案 0 :(得分:0)

我怀疑我的RVM安装以某种方式搞砸了,即使我使用了RVM站点上的说明。我用这两个帖子解决了这个问题:

Installed Ruby 1.9.3 with RVM but command line doesn't show ruby -v

http://blog.sudobits.com/2011/10/27/how-to-install-ruby-on-rails-in-ubuntu-11-10/