Rake DB任务在部署中消失



我有一个Rails 3.2.8应用程序,该应用程序在我的机器上运行良好,Postgres是ActivereCord的DB后端。但是,当我通过capistrano或通过rsync'ing我的项目将代码部署到EC2实例时,Rake不再列出任何db:任务:

$ rake -T
rake about              # List versions of all Rails frameworks and the environment
rake assets:clean       # Remove compiled assets
rake assets:precompile  # Compile all the assets named in config.assets.precompile
rake doc:app            # Generate docs for the app -- also available doc:rails, doc:guides, doc:plugins (options: TEMPLATE=/rdoc-t...
rake load_gml           # Load GML source files into the environment database
rake log:clear          # Truncates all *.log files in log/ to zero bytes
rake middleware         # Prints out your Rack middleware stack
rake notes              # Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)
rake notes:custom       # Enumerate a custom annotation, specify with ANNOTATION=CUSTOM
rake rails:template     # Applies the template supplied by LOCATION=(/path/to/template) or URL
rake rails:update       # Update configs and some other initially generated files (or use just update:configs, update:scripts, or u...
rake routes             # Print out all defined routes in match order, with names.
rake secret             # Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie se...
rake stats              # Report code statistics (KLOCs, etc) from the application
rake test               # Runs test:units, test:functionals, test:integration together (also available: test:benchmark, test:profil...
rake test:recent        # Run tests for {:recent=>"test:prepare"} / Test recent changes
rake test:single        # Run tests for {:single=>"test:prepare"}
rake test:uncommitted   # Run tests for {:uncommitted=>"test:prepare"} / Test changes since last checkin (only Subversion and Git)
rake time:zones:all     # Displays all time zones, also available: time:zones:us, time:zones:local -- filter with OFFSET parameter,...
rake tmp:clear          # Clear session, cache, and socket files from tmp/ (narrow w/ tmp:sessions:clear, tmp:cache:clear, tmp:sock...
rake tmp:create         # Creates tmp directories for sessions, cache, sockets, and pids

rake -P还报告没有db:任务。

我猜这是某种依赖性问题,但是我看不到那是什么,因为我在bundler Gemfile中宣布所有宝石依赖性。Postgres 9.2.1已安装和工作,但是即使不是我不明白为什么耙子任务会消失。

感激地收到的有关发生的事情的任何线索!

,事实证明是愚蠢的简单:我已经从一个不使用ActivereCord的项目中复制了deploy.rb文件,因此我没有设置role db:。我仍然不确定为什么这意味着我的项目的rsync'ed副本也没有任何Rake db:任务,但是我不会再花任何循环来担心。

最新更新