我在rails console中执行以下代码时遇到错误:
[1,2,3].to_enum.next
追踪:
(irb):1: [BUG] Segmentation fault
ruby 1.9.2p320 (2012-04-20 revision 35421) [i686-linux]
-- control frame ----------
c:0029 p:---- s:0103 b:0103 l:0003a0 d:0003a0 CFUNC :next
c:0028 p:0016 s:0100 b:0100 l:001944 d:000099 EVAL (irb):1
c:0027 p:---- s:0098 b:0098 l:000097 d:000097 FINISH
c:0026 p:---- s:0096 b:0096 l:000095 d:000095 CFUNC :eval
c:0025 p:0028 s:0089 b:0089 l:000088 d:000088 METHOD /home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/workspace.rb:80
c:0024 p:0033 s:0082 b:0081 l:000080 d:000080 METHOD /home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/context.rb:254
c:0023 p:0031 s:0076 b:0076 l:001c94 d:000075 BLOCK /home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb.rb:159
c:0022 p:0042 s:0068 b:0068 l:000067 d:000067 METHOD /home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb.rb:273
c:0021 p:0011 s:0063 b:0063 l:001c94 d:000062 BLOCK /home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb.rb:156
c:0020 p:0144 s:0059 b:0059 l:000042 d:000058 BLOCK /home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/ruby-lex.rb:243
c:0019 p:---- s:0056 b:0056 l:000055 d:000055 FINISH
c:0018 p:---- s:0054 b:0054 l:000053 d:000053 CFUNC :loop
c:0017 p:0009 s:0051 b:0051 l:000042 d:000050 BLOCK /home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/ruby-lex.rb:229
c:0016 p:---- s:0049 b:0049 l:000048 d:000048 FINISH
c:0015 p:---- s:0047 b:0047 l:000046 d:000046 CFUNC :catch
c:0014 p:0023 s:0043 b:0043 l:000042 d:000042 METHOD /home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/ruby-lex.rb:228
c:0013 p:0046 s:0040 b:0040 l:001c94 d:001c94 METHOD /home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb.rb:155
c:0012 p:0011 s:0037 b:0037 l:00155c d:000036 BLOCK /home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb.rb:70
c:0011 p:---- s:0035 b:0035 l:000034 d:000034 FINISH
c:0010 p:---- s:0033 b:0033 l:000032 d:000032 CFUNC :catch
c:0009 p:0183 s:0029 b:0029 l:00155c d:00155c METHOD /home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb.rb:69
c:0008 p:0210 s:0024 b:0024 l:001828 d:001828 METHOD /home/pablo/.rvm/gems/ruby-1.9.2-p320@ekobilet/gems/railties-3.0.7/lib/rails/commands/console.rb:44
c:0007 p:0019 s:0020 b:0020 l:000019 d:000019 METHOD /home/pablo/.rvm/gems/ruby-1.9.2-p320@ekobilet/gems/railties-3.0.7/lib/rails/commands/console.rb:8
c:0006 p:0430 s:0016 b:0016 l:000015 d:000015 TOP /home/pablo/.rvm/gems/ruby-1.9.2-p320@ekobilet/gems/railties-3.0.7/lib/rails/commands.rb:23
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :require
c:0003 p:0061 s:0006 b:0006 l:0013d4 d:001aa4 EVAL script/rails:6
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0013d4 d:0013d4 TOP
---------------------------
-- Ruby level backtrace information ----------------------------------------
script/rails:6:in `<main>'
script/rails:6:in `require'
/home/pablo/.rvm/gems/ruby-1.9.2-p320@ekobilet/gems/railties-3.0.7/lib/rails/commands.rb:23:in `<top (required)>'
/home/pablo/.rvm/gems/ruby-1.9.2-p320@ekobilet/gems/railties-3.0.7/lib/rails/commands/console.rb:8:in `start'
/home/pablo/.rvm/gems/ruby-1.9.2-p320@ekobilet/gems/railties-3.0.7/lib/rails/commands/console.rb:44:in `start'
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb.rb:69:in `start'
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb.rb:69:in `catch'
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb.rb:70:in `block in start'
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb.rb:155:in `eval_input'
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `each_top_level_statement'
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `catch'
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `block in each_top_level_statement'
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `loop'
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in `block (2 levels) in each_top_level_statement'
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb.rb:156:in `block in eval_input'
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb.rb:273:in `signal_status'
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb.rb:159:in `block (2 levels) in eval_input'
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/context.rb:254:in `evaluate'
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/workspace.rb:80:in `evaluate'
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/workspace.rb:80:in `eval'
(irb):1:in `irb_binding'
(irb):1:in `next'
-- C level backtrace information -------------------------------------------
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/libruby.so.1.9(rb_vm_bugreport+0x78) [0xb76d28e8]
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/libruby.so.1.9(+0x55e43) [0xb759ce43]
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/libruby.so.1.9(rb_bug+0x33) [0xb759dc53]
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/libruby.so.1.9(+0x115d73) [0xb765cd73]
[0xb777940c]
/home/pablo/.rvm/rubies/ruby-1.9.2-p320/lib/libruby.so.1.9(+0x221000) [0xb7768000]
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
我正在使用ruby 1.9.2开发ubuntu 12.10:
ruby -v
ruby 1.9.2p320 (2012-04-20 revision 35421) [i686-linux]
Bug也发生在ruby 1.9.2-p290但是1.9.3它运行正常。不幸的是,由于我正在使用传统的rails应用程序,我无法升级ruby版本:
的Gemfile:
source 'http://rubygems.org'
gem 'unicorn', '4.0.1'
gem 'rails', '3.0.7'
gem 'rake', '~> 0.8.7'
gem 'mongrel', '1.2.0.pre2'
gem 'mysql2', '~> 0.2.18', :require => 'mysql2'
gem 'attribute_normalizer', '~> 0.3.1'
gem 'cubus-settingslogic', '~> 2.2.0', :require => 'settingslogic'
gem "bcrypt-ruby", :require => "bcrypt"
gem 'sinatra', '1.1.3'
gem 'tilt', '1.2.2'
gem 'rest-client', '~> 1.6.1'
gem 'resque', '~> 1.17.0', :require => "resque/server"
gem 'faraday', '0.5.7'
gem 'httparty', '0.7.8'
gem 'resque_mailer', '~> 1.0.0'
gem 'omniauth', '0.2.0'
gem 'pdfkit', '~> 0.5.2'
gem 'exception_notification', :require => 'exception_notifier'
gem 'whenever', '~> 0.6.2', :require => false
gem 'meta_search'
gem 'kaminari'
gem 'mini_magick', '~> 3.2'
gem 'carrierwave', '~> 0.5.1'
gem 'carrierwave_backgrounder', '0.0.6'
gem 'fgraph', '0.6.0'
gem 'hirb'
gem 'resque-retry'
gem 'event-calendar', '~> 2.3.3', :require => 'event_calendar'
gem 'activerecord-import', '~> 0.2.11'
gem 'oink'
gem "truncate_html", "~> 0.9.1"
group :development, :test do
gem 'rspec-rails', '~> 2.6.1'
gem 'active_reload'
gem "parallel_tests"
gem 'fuubar'
gem 'awesome_print'
end
group :production do
gem 'newrelic_rpm'
end
group :development do
gem 'lol_dba'
gem 'request-log-analyzer'
gem 'query_reviewer'
gem 'meta_request'
gem 'better_errors'
end
group :test do
gem 'simplecov', '>= 0.4.0', :require => false
gem 'factory_girl_rails', '~> 1.4.0'
gem "factory_girl", "~> 2.3.0"
gem 'selenium-webdriver', '~> 2.21.1'
gem 'capybara', '1.0.1'
gem 'guard-rspec', '~> 0.4.0'
gem 'rb-fsevent', :git => 'git://github.com/ttilley/rb-fsevent.git', :branch => 'pre-compiled-gem-one-off'
gem 'escape_utils', '~> 0.2.3'
gem 'launchy', '~> 2.0.5'
gem "database_cleaner", "~> 0.9.0"
gem 'timecop', '~> 0.3.5'
gem 'resque_spec'
gem 'vcr', '~> 1.11.3'
gem 'webmock', '~> 1.7.8'
gem 'shoulda-matchers', '~> 1.2.0'
gem 'rr'
end
我已经尝试过几次重新安装ruby版本并没有帮助。
任何帮助都将非常感谢!
答案 0 :(得分:1)
我没有看到针对Ubuntu报告的问题,但I do see one for OS X Lion。您可以考虑确定在哪里准确报告1.9.2的问题并尝试查看社区中是否有人可以为您提供有关如何获取错误报告的更多指导(a)验证为实际错误而不是由某些内容引起的否则,以及(b)如果确实得到验证,将在何处以及如何提交错误。
我不相信你应该直接在backport页面中创建问题,但至少在这里参考是1.9.2 backport列表中的问题列表。