当我尝试通过rails s
启动rails服务器时出现此错误:
/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 :(得分:11)
将这些行添加到Gemfile:
gem 'linecache19', :git => 'git://github.com/mark-moseley/linecache'
gem 'ruby-debug-base19x', '~> 0.11.30.pre4'
gem 'ruby-debug19'
并进行捆绑安装。
答案 1 :(得分:0)
由于不再支持ruby-debug19,请参阅Debugging in ruby 1.9。
您现在需要替换
gem'ruby-debug19',:require =&gt; '红宝石调试'
带
gem'debugger',group:[:development,:test]
这应该可以解决问题。