2

我正在使用延迟工作来安排工作。根据文档,我运行以下命令为延迟作业生成迁移文件和模型类。

rails generate delayed_job:active_record

但是在运行此命令时,它正在使用 generate 作为项目名称创建新的 rails 项目,而不是生成迁移文件和模型类。我只从我的 rails 根目录运行了这个命令。

我找不到这个问题。你能帮助我们吗?

运行此命令时,我得到以下输出。

D:\Sravan\RailsProject>rails generate migration delayed_job:active_record
      exists
      exists  app/controllers
      exists  app/helpers
      exists  app/models
      exists  app/views/layouts
      exists  config/environments
      exists  config/initializers
      exists  config/locales
      exists  db
      exists  doc
      exists  lib
      exists  lib/tasks
      exists  log
      exists  public/images
      exists  public/javascripts
      exists  public/stylesheets
      exists  script/performance
      exists  test/fixtures
      exists  test/functional
      exists  test/integration
      exists  test/performance
      exists  test/unit
      exists  vendor
      exists  vendor/plugins
      exists  tmp/sessions
      exists  tmp/sockets
      exists  tmp/cache
      exists  tmp/pids
   identical  Rakefile
   identical  README
   identical  app/controllers/application_controller.rb
   identical  app/helpers/application_helper.rb
   identical  config/database.yml
   identical  config/routes.rb
   identical  config/locales/en.yml
   identical  db/seeds.rb
   identical  config/initializers/backtrace_silencers.rb
   identical  config/initializers/inflections.rb
   identical  config/initializers/mime_types.rb
   identical  config/initializers/new_rails_defaults.rb
overwrite config/initializers/session_store.rb? (enter "h" for help) [Ynaqdh] n
        skip  config/initializers/session_store.rb
   identical  config/environment.rb
   identical  config/boot.rb
   identical  config/environments/production.rb
   identical  config/environments/development.rb
   identical  config/environments/test.rb
   identical  script/about
   identical  script/console
   identical  script/dbconsole
   identical  script/destroy
   identical  script/generate
   identical  script/runner
   identical  script/server
   identical  script/plugin
   identical  script/performance/benchmarker
   identical  script/performance/profiler
   identical  test/test_helper.rb
   identical  test/performance/browsing_test.rb
   identical  public/404.html
   identical  public/422.html
   identical  public/500.html
   identical  public/index.html
   identical  public/favicon.ico
   identical  public/robots.txt
   identical  public/images/rails.png
   identical  public/javascripts/prototype.js
   identical  public/javascripts/effects.js
   identical  public/javascripts/dragdrop.js
   identical  public/javascripts/controls.js
   identical  public/javascripts/application.js
   identical  doc/README_FOR_APP
   identical  log/server.log
   identical  log/production.log
   identical  log/development.log
   identical  log/test.log

谢谢, 斯拉万

4

1 回答 1

2

请检查链接 https://github.com/collectiveidea/delayed_job/tree/v2.0

在这里您可以找到为 rails 2.x 应用程序集成延迟作业的步骤。

于 2013-07-01T18:19:39.803 回答