2
我在rails应用程序中使用ruby 1.9.3。我在OSX Yosemite上使用rbenv和gcc 4.2成功安装了ruby,并且可以安装与bundler的依赖关系。使用rbenv安装ruby的分段错误
当我尝试安装,我得到以下错误的数据库:
bundle exec rake db:setup
foo already exists
foo_test already exists
ruby(31773,0x7fff79ac7300) malloc: *** error for object 0x7fe00a8c0dc8: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
[1] 31773 abort bundle exec rake db:setup
我第一次得到一个不同的错误信息后:
$ bundle exec rake db:setup
-- create_table("foo", {:force=>true})
-> 0.0241s
...
-- create_table("bar", {:force=>true})
-> 0.0241s
/Users/jedi/code/foo/.bundle/ruby/1.9.1/gems/activerecord-3.2.18/lib/active_record/migration.rb:601: [BUG] Segmentation fault
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-darwin14.3.0]
-- Control frame information -----------------------------------------------
c:0062 p:0012 s:0220 b:0220 l:000219 d:000219 METHOD /Users/jedi/code/foo/.bundle/ruby/1.9.1/gems/activerecord-3.2.18/lib/active_record/migration.rb:601
c:0061 p:0071 s:0216 b:0214 l:000195 d:000213 BLOCK /Users/jedi/code/foo/.bundle/ruby/1.9.1/gems/activerecord-3.2.18/lib/active_record/migration.rb:461
c:0060 p:0005 s:0212 b:0212 l:000201 d:000211 BLOCK /Users/jedi/code/foo/.bundle/ruby/1.9.1/gems/activerecord-3.2.18/lib/active_record/migration.rb:438
...
-- Ruby level backtrace information ----------------------------------------
/Users/jedi/code/foo/.bundle/ruby/1.9.1/bin/rake:23:in `<main>'
/Users/jedi/code/foo/.bundle/ruby/1.9.1/bin/rake:23:in `load'
...
[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
我试着更新到2.0.0红宝石并使用clang编译ruby,但总是得到相同的结果。有任何想法吗?
还尝试安装红宝石rvm。相同的结果。 – juanedi
你正在使用红宝石1.9.3p484,你能用ruby 1.9.3p551来试试你的代码吗? 你的代码在不同的操作系统上运行良好吗?例如,您可以使用vagrant在虚拟框中安装ubuntu进行测试。 – jiop
已经尝试增加补丁级别,并没有帮助。即使在其他OSX Yosemite计算机上,该应用程序运行良好。谢谢! – juanedi