Rails迁移问题

时间:2013-07-01 17:33:41

标签: ruby-on-rails delayed-job

我正在使用延迟工作进行日程安排工作。根据doc,我运行了以下命令来生成Delayed job的迁移文件和模型类。

rails generate delayed_job:active_record

但是在运行此命令时,它正在创建新的rails项目,并将generate作为项目名称而不是生成迁移文件和模型类。 我只从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

谢谢, Sravan A

1 个答案:

答案 0 :(得分:2)

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

在这里,您可以找到为rails 2.x应用程序集成delayed_job的步骤。