这个问题和特定的rake版本有关,因为Rails要使用rake的last_comment方法在较新版本的rake中已被废弃,所以很多人卸载了新版本的rake去安装旧版本的rake.

这样也能解决问题,但显然用旧的东西感觉不那么好.

好在你遇到的是ruby语言,所以没有什么不可能了,我们只需要写一个模块然后包装last_comment方法到rake中对应的新方法中即可,打开Rakefile,在其中新建一个module,最后将其include进来即可:

module TempFixForRakeLastComment
  def last_comment
    last_description
  end
end
Rake::Application.send :include, TempFixForRakeLastComment

如果你觉得太神奇,那么你是out了,动态语言必须是这么玩滴… ;)

最新文章

  1. C# 仿刷-框架MvcThrottle的使用
  2. MySql学习(三) —— 子查询(where、from、exists) 及 连接查询(left join、right join、inner join、union join)
  3. js+JQuery实现返回顶部功能
  4. Mac更换Sublime Text程序图标
  5. android图片缩小和放大Matrix
  6. project.json
  7. HDU 4569 Special equations(数学推论)
  8. ilter()和find()的区别
  9. UVa 1451 (数形结合 单调栈) Average
  10. Spring中Ioc容器的注入方式
  11. 自给自足:动手打造html5俄罗斯方块
  12. 走进C++程序世界-----函数相关(全局变量)
  13. Beta总结篇
  14. Sql JOIN 一张图说明
  15. supervisor 从安装到使用
  16. unigui的页面布局使用
  17. linux下软件安装的几种方式
  18. 雅克比迭代算法(Jacobi Iterative Methods) -- [ mpi , c++]
  19. windows redis 连接错误Creating Server TCP listening socket 127.0.0.1:637 9: bind: No error
  20. effective java——12考虑实现coparable接口

热门文章

  1. [转]使用awk批量杀进程的命令
  2. ES6 new syntax of let and const (one)
  3. Centos常用命令之:搜索
  4. [SDOI 2013]方程
  5. [HNOI 2009]最小圈
  6. 【模板】KMP字符串匹配
  7. PKUWC2018划水记
  8. bzoj 4919: [Lydsy六月月赛]大根堆
  9. 【luogu3384】【模板】树链剖分
  10. 【Aho-Corasick automation 大米饼模板】