如何构建任务“gems:install”

2024-05-22

我正在将 Rails 应用程序部署到 Linux 服务器,并且缺少一些 rake 任务,包括 rake gems:install 和 rake db

我正在运行来自 GEM 的 Rails 2.3.4。

为什么是这样?

我该如何解决?我可以以某种方式更新吗?


它们在 rake -T 列表中缺失

rake apache2                   # Build Apache 2 module
rake clean                     # Remove compiled files
rake clobber                   # Remove all generated files
rake default                   # Build everything
rake doc                       # Generate all documentation
rake doxygen                   # Generate Doxygen C++ API documentation if ...
rake doxygen:clobber           # Remove generated Doxygen C++ API documenta...
rake doxygen:force             # Force generation of Doxygen C++ API docume...
rake fakeroot                  # Create a fakeroot, useful for building nat...
rake nginx                     # Build Nginx helper server
rake package                   # Build all the packages
rake package:clean             # Remove package products
rake package:debian            # Create a Debian package
rake package:force             # Force a rebuild of the package files
rake package:gem               # Build the gem file passenger-2.2.4.gem
rake rdoc                      # Build the rdoc HTML Files
rake rdoc:clobber              # Remove rdoc products
rake rdoc:force                # Force a rebuild of the RDOC files
rake sloccount                 # Run 'sloccount' to see how much code Passe...
rake test                      # Run all unit tests and integration tests
rake test:cxx                  # Run unit tests for the Apache 2 and Nginx ...
rake test:integration          # Run all integration tests
rake test:integration:apache2  # Run Apache 2 integration tests
rake test:integration:nginx    # Run Nginx integration tests
rake test:oxt                  # Run unit tests for the OXT library
rake test:rcov                 # Run coverage tests for the Ruby libraries
rake test:restart              # Run the 'restart' integration test infinit...
rake test:ruby                 # Run unit tests for the Ruby libraries

我的 rake 文件包含以下内容:

# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require(File.join(File.dirname(__FILE__), 'config', 'boot'))

require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'

require 'tasks/rails'

如何添加 gems 和 db rake 任务?为什么他们失踪了?


的输出是什么rake -T?这应该列出所有可用的任务。在 RoR 应用中,Rakefile定义您的任务。

您可以使用更新宝石gem update.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何构建任务“gems:install” 的相关文章

随机推荐

  • TYPO3 6 需要哪些 PHP 函数?

    我刚刚全新安装了 TYPO3 6 1 系统环境检查告诉我 我的服务器上禁用了某些 PHP 功能 我在我的服务器上使用 Froxlor 来管理域等 因此 我可以完全控制这台机器 但我不确定哪些功能是真正必要的 有些功能对我来说似乎相当危险 所
  • 为什么这个 django url 没有重定向?

    从以下表单获取发布数据后 页面应重定向到 associate learn 如操作中所示 然而 它只是停留在单选按钮页面上 我怀疑我犯了初学者的错误 但在重新阅读教程后 我不确定发生了什么 索引 html Choose a dataset i
  • Google Cloud SDK 中对 google-auth 的依赖错误?

    我正在标准环境应用程序中使用谷歌云存储和谷歌云数据存储API 目前在本地 我尝试运行我的测试 使用 pytest 时有一种非常奇怪的行为 我发现 在测试期间 dev appserver fix sys path命令运行者pytest bed
  • JScrollPane 中的 JScrollPane

    我有一个JScrollPane 其中有一个JPanel其内容窗格 对此JPanel我添加更小的JPanels 正如预期的那样 如果我添加太多JPanel 会出现一个垂直滚动条 问题是我的小JPanels 包含一个JScrollPane也为了
  • Maven + Resteasy JAXB 找不到内容类型 application/xml 的 writer

    我想创建一个将在其他项目中使用的 jar 其中包括使用 ReastEasy 库 jaxb jaxrs jaxrs clients 等 虽然我包含了所有库 并且在基于 Maven 的项目中一切正常 但显然有些库未包含在 jar 中 并且我在简
  • 从 Flutter 中删除底部导航栏上的默认内边距或边距

    这是问题的图片 它是底部导航栏上的默认填充吗 如果是 我该如何删除它 正如您在下面的代码中看到的 我在 BottomNavigationBarItem 内部有一个容器和一个图标 但图标和栏之间有一个空格 return Scaffold bo
  • 如何使用 C# 查找文本中重复出现的词组? [关闭]

    Closed 这个问题需要多问focused help closed questions 目前不接受答案 我正在统计重复出现的字数字符串生成器 sb 我在互联网上找到了这段代码 据作者称 它与 Word 的字数计数器非常一致 StringB
  • 如何防止TFS 2013锁定二进制文件?

    我们将 TFS 2013 与 Visual Studio 2013 结合使用 并使用门控签入 通过门控签入 不可能在本地保留待处理的更改 如果其中一个文件被锁定 http www neovolve com 2011 07 18 unable
  • 如何使用 Materialise 创建具有居中对齐链接的导航栏?

    我正在尝试使用 Materialise 构建一个顶部有导航栏的 1 页垂直滚动网站 现在 Materialize 仅具有用于向左或向右对齐链接的类 徽标可以居中对齐 但不能居中对齐链接本身 我一直在向 UL 和包装 div 添加中心对齐和中
  • 在 QComboBox 中显示项目,但不在其弹出列表中显示项目

    我有一些代码使用组合框来显示产品列表 我想在组合框中显示 选择产品 products Select product 223 51443 7335 但我不希望用户能够选择 选择产品 项 我只是想让用户知道这个组合框是用来选择产品的 我不想使用
  • Java 泛型与类和接口 - 一起

    我想要一个 Class 对象 但我想强制它代表的任何类扩展类 A 并实现接口 B 我可以 Class
  • Yii2:如何在CheckboxList中显示选中的值

    我想在 Yii 2 0 的复选框列表中显示选中的值 以下是我的代码 主阵
  • 如何在同一线程中创建JFrame以使其阻塞?

    出于调试目的 我需要在一个简单的窗口中在屏幕上绘制图像 Swing 在单独的消息循环线程中处理所有事件 这意味着如果我执行以下操作 while true Get screenshot BufferedImage screenshot MSW
  • 带有变量 bash 的降序循环

    cat fromhere sh bin bash FROMHERE 10 for i in seq FROMHERE 1 do echo i done sh fromhere sh 为什么不起作用 我找不到任何在谷歌中搜索降序循环的示例 甚
  • Rplotly:悬停时显示图像

    我正在尝试重现this https plotly r com interactives tooltip image html显示数据点悬停图像的简单绘图 代码可用here https plotly r com supplying custo
  • 使用谷歌分析处理带有哈希#的网址

    我正在使用 javascript 客户端 mvc 开发一个 js 单页 Web 应用程序 在本例中为 angular js 我在网站上添加了谷歌分析 但从目前我所看到的 至少是实时的 来看 谷歌没有考虑哈希后的 uri 部分 那就是我有一个
  • 无法找到请求目标的有效证书路径 - java

    我正在尝试使用连接到网站Http客户端 http hc apache org httpcomponents client 4 3 x httpclient apidocs org apache http impl client Defaul
  • Spring Cloud Feign 非阻塞 I/O 或异步调用

    我正在使用 Spring 云平台开发微服务 其中 service1 调用多个其他微服务 例如service2 service3 service 4 等 这些服务可以并行调用 service1 将聚合结果 我可以使用Spring cloud
  • 适用于 Windows 的 php-fpm?

    PHP FPM 的主页http php fpm org http php fpm org 声明它是 PHP 5 3 3 以来 PHP 的一部分 现在 我想知道 当我从 php net 下载最新的 PHP 二进制文件时 其中没有 php fp
  • 如何构建任务“gems:install”

    我正在将 Rails 应用程序部署到 Linux 服务器 并且缺少一些 rake 任务 包括 rake gems install 和 rake db 我正在运行来自 GEM 的 Rails 2 3 4 为什么是这样 我该如何解决 我可以以某