【问题标题】:rake task not found when create rails plugin创建rails插件时找不到rake任务
【发布时间】:2017-01-11 20:03:12
【问题描述】:

我正在尝试创建一个带有 rake 任务的 gem 插件。我只是在任务文件夹中注释掉了预先生成的文件,但是当我运行 rake my_plugin 时,出现了错误

Don't know how to build task...

这里是 tasks/my_plugin.rake 文件

desc "Explaining what the task does"
task :my_plugin do
  # Task goes here
end

【问题讨论】:

    标签: ruby-on-rails ruby rubygems rake gemspecs


    【解决方案1】:

    您运行rake myplugin,但定义task :my_plugin。你错过了下划线。

    【讨论】:

    • 对不起,我打错了,但这不是问题
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-14
    • 2011-05-17
    • 2016-09-20
    • 1970-01-01
    • 1970-01-01
    • 2012-06-25
    相关资源
    最近更新 更多