1

当我尝试通过启动 rails 服务器时rails s出现此错误:

/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'

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

4

2 回答 2

10

将这些行添加到 Gemfile:

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

并进行捆绑安装。

于 2012-03-16T09:17:28.017 回答
0

由于不再支持 ruby​​-debug19,请参阅ruby​​ 1.9 中的调试

您现在需要更换

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

宝石“调试器”,组:[:开发,:测试]

这应该够了吧。

于 2013-05-13T22:26:35.127 回答