2012-03-09 57 views
1

当我尝试通过rails s启动Rails服务器我得到这个错误:RVM,红宝石1.9.3,3.1.3导轨:无法启动服务器导轨由于红宝石调试

/home/james/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `require': /home/james/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so: undefined symbol: ruby_current_thread - /home/james/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so (LoadError) 
    from /home/james/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `<top (required)>' 
    from /home/james/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:5:in `require' 
    from /home/james/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:5:in `<top (required)>' 
    from /home/james/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.1.0/lib/bundler/runtime.rb:68:in `require' 
    from /home/james/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.1.0/lib/bundler/runtime.rb:68:in `block (2 levels) in require' 
    from /home/james/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.1.0/lib/bundler/runtime.rb:66:in `each' 
    from /home/james/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.1.0/lib/bundler/runtime.rb:66:in `block in require' 
    from /home/james/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.1.0/lib/bundler/runtime.rb:55:in `each' 
    from /home/james/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.1.0/lib/bundler/runtime.rb:55:in `require' 
    from /home/james/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.1.0/lib/bundler.rb:118:in `require' 
    from /home/james/rails-projs/macedonia_nato/config/application.rb:7:in `<top (required)>' 
    from /home/james/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/commands.rb:53:in `require' 
    from /home/james/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/commands.rb:53:in `block in <top (required)>' 
    from /home/james/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/commands.rb:50:in `tap' 
    from /home/james/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.0/lib/rails/commands.rb:50:in `<top (required)>' 
    from script/rails:6:in `require' 
    from script/rails:6:in `<main>' 

这里是我的Gemfile:

source 'https://rubygems.org'  
gem 'rails', '3.2.0' 
gem 'redis' 
gem 'haml' 

gem 'aws-s3' 


gem 'braintree' 
gem 'bartt-ssl_requirement', :require => 'ssl_requirement' 

gem 'paperclip' 

group :development, :test do 
    gem 'sqlite3' 
    gem 'ruby-debug19', :require => 'ruby-debug' 
end 

group :production do 
    gem 'pg' 
end 

group :assets do 
    gem 'sass-rails', '~> 3.2.3' 
    gem 'coffee-rails', '~> 3.2.1' 
    # See https://github.com/sstephenson/execjs#readme for more supported runtimes 
    # gem 'therubyracer' 
    gem 'uglifier', '>= 1.0.3' 
end 

gem 'jquery-rails' 

gem 'vanity', :git => 'git://github.com/mrpersister/vanity.git' 

我一直在谷歌周围,我无法弄清楚。我会很感激任何帮助。

+0

http://stackoverflow.com/questions/8378277/cannot-use-ruby-debug19-with-1-9-3-p0 – kclair 2012-03-09 23:58:54

回答

11

这些行添加到Gemfile中:

gem 'linecache19', :git => 'git://github.com/mark-moseley/linecache' 
gem 'ruby-debug-base19x', '~> 0.11.30.pre4' 
gem 'ruby-debug19' 

,并做捆绑安装。

+1

@Sauj,非常感谢!有效。 :) – Salil 2012-04-02 15:28:37

0

由于ruby-debug19不再支持,请参阅Debugging in ruby 1.9

现在,您将需要

gem 'debugger', group: [:development, :test]

这应该做的伎俩,以取代

gem 'ruby-debug19', :require => 'ruby-debug'