2012-12-20 27 views
1

我有一個Rails 3.2.8應用程序,它在我的機器上運行的很好,Postgres作爲ActiveRecord的數據庫後端。然而,當我在我的代碼部署到EC2服務器,或者通過Capistrano的或rsync'ing我的項目EC2實例,耙不再列出任何db:任務:rake數據庫任務在部署中消失

$ 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中聲明瞭所有的gem依賴關係。 Postgres的9.2.1安裝和工作,但即使它不是我不明白,爲什麼耙任務將消失。

任何線索,這是怎麼回事感激地接受!

+0

你嘗試'捆綁高管耙-T'? –

+0

是的,對不起,我應該提到,我試過了,得到了相同的結果。 –

回答

0

事實證明這很愚蠢 - 我已經複製了以前沒有使用ActiveRecord的項目中的deploy.rb文件,所以我沒有設置role db:。我仍然不知道爲什麼這意味着,我的項目的rsync'ed副本也沒有任何耙db:的任務,但我不打算花更多的循環擔心這一點。

相關問題