我正在将现有的Rails 3.2应用程序升级到Rails 4.我在Ubuntu 13.04上使用ruby 1.9.3p429(2013-05-15修订版40747)[x86_64-linux]到rbenv。我在Rails 3.2中使用了'--binstubs'选项。升级期间,我:
运行'rake rails:update:bin'核心转储,前几行为:
/home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228: [BUG] Segmentation fault
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0039 p:---- s:0128 b:0128 l:000127 d:000127 CFUNC :require
c:0038 p:0010 s:0124 b:0124 l:000116 d:000123 BLOCK /home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
c:0037 p:0071 s:0122 b:0122 l:000121 d:000121 METHOD /home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213
/home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228: [BUG] Segmentation fault
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux]
考虑到Gem和错误输出的大小,我在https://gist.github.com/grcarey/6109181创建了一个要点,其中包含Gemfile和rake命令的输出。
非常感谢有关解决这个问题的一些想法。
----------更新-----------
使用'ruby 1.9.3p392(2013-02-22修订版39386)[x86_64-linux]'运行命令会在错误输出中显示以下几行:
-- Control frame information -----------------------------------------------
c:0039 p:---- s:0128 b:0128 l:000127 d:000127 CFUNC :require
c:0038 p:0010 s:0124 b:0124 l:000116 d:000123 BLOCK /home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
c:0037 p:0071 s:0122 b:0122 l:000121 d:000121 METHOD /home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213
c:0036 p:0019 s:0117 b:0117 l:000116 d:000116 METHOD /home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
c:0035 p:0011 s:0112 b:0112 l:000111 d:000111 TOP /home/user/projects/proj_name/.bundle/gems/nokogiri-1.6.0/lib/nokogiri/xml.rb:1
c:0034 p:---- s:0110 b:0110 l:000109 d:000109 FINISH
Segmentation fault
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
答案 0 :(得分:3)
问题解决了。
我一直在使用Rails 3.2中的bundle binstubs选项,并且在升级之前我没有删除项目的bundle和bin dirs。
删除这些目录并重新运行bundle install
后,运行rake rails:update:bin
问题就解决了。