Rake任务打破了我的Ruby ......糟糕的佣金任务

时间:2012-07-26 16:15:57

标签: ruby-on-rails ruby rake rvm

我正在尝试在本地运行rake任务,而且我遇到了一个奇怪的错误。

$ rake alert_notification  --trace
** Invoke alert_notification (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute alert_notification
/Users/bendowney/.rvm/gems/ruby-1.9.3-p194@global/bin/rake(65399,0x7fff73799960) malloc: *** error for object 0x8: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

奇怪的是,我没有使用给出的gemset(@globaL)。我跑的时候     $ rvm gemset list

它显示正确的宝石集。

据我所知,这不会影响我的其他rails应用程序的工作方式。虽然我不完全确定。

关于我如何解决这个问题的建议?

2 个答案:

答案 0 :(得分:1)

只是猜测,看起来你在OSX上使用clang编译ruby,有两种方法可以为ruby获取正确的编译器:osx-gcc-installer和:

rvm get head
rvm requirements # read the part on homebrew apple gcc42

获得正确的编译后,你需要重新安装ruby:

rvm reinstall 1.9.3

至于@global gemset - 它由给定ruby中的所有gemset继承,包括默认gemset(没有任何@...)。

答案 1 :(得分:0)

在我们编写rake任务的过程中,这个问题已经完全消失了。所以我想这篇文章的答案是“编写有效的佣金任务。”

相关问题