OS X 10.4.2, Ruby 1.8.3 compiled from source, Rails 0.14.2, SwitchTower 0.9.0 Following the instructions located here: http://manuals.rubyonrails.com/read/chapter/98 darron-froeses-powerbook-g4-15:~/Sites/ncache darron$ rake deploy (in /Users/darron/Sites/ncache) rake aborted! Don''t know how to build task ''deploy'' If I use the commands referenced in lib/tasks/switchtower.rake - they work just fine - I just can''t launch them using rake. Any ideas? Thanks.
On Oct 29, 2005, at 11:05 PM, Darron Froese wrote:> OS X 10.4.2, Ruby 1.8.3 compiled from source, Rails 0.14.2, > SwitchTower 0.9.0 > > Following the instructions located here: > > http://manuals.rubyonrails.com/read/chapter/98 > > darron-froeses-powerbook-g4-15:~/Sites/ncache darron$ rake deploy > (in /Users/darron/Sites/ncache) > rake aborted! > Don''t know how to build task ''deploy'' > > If I use the commands referenced in lib/tasks/switchtower.rake - they > work just fine - I just can''t launch them using rake. > > Any ideas? Thanks.Does rake -T include "deploy" in the output? Does the output of rake --trace deploy shed any additional light on the problem? I just tried with Ruby 1.8.3 and it worked for me (well, the task showed up in rake -T), so I know it *can* work with that configuration... - Jamis
On 10/29/05, Jamis Buck <jamis-uHoyYlH2B+GakBO8gow8eQ@public.gmane.org> wrote:> On Oct 29, 2005, at 11:05 PM, Darron Froese wrote: > > Does > > rake -T > > include "deploy" in the output?Nope: darron-froeses-powerbook-g4-15:~/Sites/ncache darron$ rake -T (in /Users/darron/Sites/ncache) rake apidoc # Build the apidoc HTML Files rake appdoc # Build the appdoc HTML Files rake clear_logs # Clears all *.log files in log/ rake clobber_apidoc # Remove rdoc products rake clobber_appdoc # Remove rdoc products rake clone_structure_to_test # Recreate the test databases from the development structure rake db_structure_dump # Dump the database structure to a SQL file rake default # Run all the tests on a fresh test database rake doc # Generate API documentation, show coding stats rake environment # Require application environment. rake migrate # Migrate the database according to the migrate scripts in db/migrate (only supported on PG/MySQL). A specific version can be targetted with VERSION=x rake purge_test_database # Empty the test database rake reapidoc # Force a rebuild of the RDOC files rake reappdoc # Force a rebuild of the RDOC files rake recent # Run tests for recentclone_structure_to_test rake stats # Report code statistics (KLOCs, etc) from the application rake test_functional # Run tests for test_functional rake test_units # Run tests for test_units> Does the output of > > rake --trace deploy > > shed any additional light on the problem?Not for me: darron-froeses-powerbook-g4-15:~/Sites/ncache darron$ rake --trace deploy (in /Users/darron/Sites/ncache) rake aborted! Don''t know how to build task ''deploy'' /usr/local//lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake.rb:281:in `[]'' /usr/local//lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake.rb:1454:in `run'' /usr/local//lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake.rb:1454:in `run'' /usr/local//lib/ruby/gems/1.8/gems/rake-0.6.2/bin/rake:7 /usr/local/bin/rake:18 But this might help - looks like it''s missing a file from the install (maybe?): darron-froeses-powerbook-g4-15:~/Sites/ncache/lib/tasks darron$ rake -f switchtower.rake deploy (in /Users/darron/Sites/ncache/lib/tasks) loading configuration /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/lib/switchtower/recipes/standard.rb /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/lib/switchtower/configuration.rb:116:in `read'': No such file or directory - config/deploy (Errno::ENOENT) from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/lib/switchtower/configuration.rb:116:in `load'' from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/lib/switchtower/configuration.rb:100:in `load'' from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/lib/switchtower/configuration.rb:100:in `load'' from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/lib/switchtower/cli.rb:188:in `execute_recipes!'' from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/lib/switchtower/cli.rb:188:in `execute_recipes!'' from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/lib/switchtower/cli.rb:169:in `execute!'' from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/lib/switchtower/cli.rb:7:in `execute!'' from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/bin/switchtower:11 from /usr/bin/switchtower:18 It just doesn''t look like it knows where to look. If I run it from the top rails folder with a -f it works: darron-froeses-powerbook-g4-15:~/Sites/ncache darron$ rake -f lib/tasks/switchtower.rake deploy (in /Users/darron/Sites/ncache) loading configuration /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/lib/switchtower/recipes/standard.rb loading configuration ./config/deploy.rb executing task deploy transaction: start executing task update_code querying latest revision... svn: Unable to open an ra_local session to URL svn: Unable to open repository ''file:///home/darron/source/ncache'' svn: Unable to open an ra_local session to URL svn: Unable to open repository ''file:///home/darron/source'' svn: Unable to open an ra_local session to URL svn: Unable to open repository ''file:///home/darron'' svn: Unable to open an ra_local session to URL svn: Unable to open repository ''file:///home'' svn: ''file:'' is not under version control executing "if [[ ! -d /var/httpd/virtual-hosts/ncache/releases/20051030155618 ]]; then\n svn co -q -r9 file:///home/darron/source/ncache /var/httpd/virtual-hosts/ncache/releases/20051030155618;\n echo `date +\"%Y-%m-%d %H:%M:%S\"` $USER 9 20051030155618 >> /var/httpd/virtual-hosts/ncache/revisions.log;\n chmod 666 /var/httpd/virtual-hosts/ncache/revisions.log;\n fi" servers: ["meemo.nonfiction.ca"] processing command [meemo.nonfiction.ca] executing command command finished executing "rm -rf /var/httpd/virtual-hosts/ncache/releases/20051030155618/log /var/httpd/virtual-hosts/ncache/releases/20051030155618/public/system &&\n ln -nfs /var/httpd/virtual-hosts/ncache/shared/log /var/httpd/virtual-hosts/ncache/releases/20051030155618/log &&\n ln -nfs /var/httpd/virtual-hosts/ncache/shared/system /var/httpd/virtual-hosts/ncache/releases/20051030155618/public/system" servers: ["meemo.nonfiction.ca"] processing command [meemo.nonfiction.ca] executing command command finished executing task symlink executing "ls -x1 /var/httpd/virtual-hosts/ncache/releases" servers: "meemo.nonfiction.ca" processing command [meemo.nonfiction.ca] executing command command finished executing "ln -nfs /var/httpd/virtual-hosts/ncache/releases/20051030155618 /var/httpd/virtual-hosts/ncache/current" servers: ["meemo.nonfiction.ca"] processing command [meemo.nonfiction.ca] executing command command finished transaction: commit executing task restart executing "sudo echo ''We would restart the web server here''" servers: ["meemo.nonfiction.ca"] processing command [meemo.nonfiction.ca] executing command Password: password-goes-here [out :: meemo.nonfiction.ca] We would restart the web server here command finished If there a place to set the folders where rake looks? In php I would set the include_path option - but I''m just not sure where to look here. Thanks for your help.
On Oct 30, 2005, at 8:59 AM, Darron Froese wrote:> But this might help - looks like it''s missing a file from the > install (maybe?): > > darron-froeses-powerbook-g4-15:~/Sites/ncache/lib/tasks darron$ rake > -f switchtower.rake deploy > (in /Users/darron/Sites/ncache/lib/tasks) > loading configuration > /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/lib/ > switchtower/recipes/standard.rb > /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/lib/ > switchtower/configuration.rb:116:in > `read'': No such file or directory - config/deploy (Errno::ENOENT) > from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/ > lib/switchtower/configuration.rb:116:in > `load'' > from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/ > lib/switchtower/configuration.rb:100:in > `load'' > from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/ > lib/switchtower/configuration.rb:100:in > `load'' > from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/ > lib/switchtower/cli.rb:188:in > `execute_recipes!'' > from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/ > lib/switchtower/cli.rb:188:in > `execute_recipes!'' > from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/ > lib/switchtower/cli.rb:169:in > `execute!'' > from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/ > lib/switchtower/cli.rb:7:in > `execute!'' > from /usr/local//lib/ruby/gems/1.8/gems/switchtower-0.9.0/ > bin/switchtower:11 > from /usr/bin/switchtower:18 > > It just doesn''t look like it knows where to look.This is just because you ran it from a subdirectory, and config/ deploy.rb is no longer a valid path (relative to that subdirectory). How many lines long is your Rakefile? (I''m wondering if you''re using an older version of the Rakefile, that doesn''t know to delegate to the files in lib/tasks.) - Jamis
On 10/30/05, Jamis Buck <jamis-uHoyYlH2B+GakBO8gow8eQ@public.gmane.org> wrote:> This is just because you ran it from a subdirectory, and config/ > deploy.rb is no longer a valid path (relative to that subdirectory).I can run it from the top level directory when I use -f> How many lines long is your Rakefile? (I''m wondering if you''re using > an older version of the Rakefile, that doesn''t know to delegate to > the files in lib/tasks.)It''s 202 lines long. I created this project in rails 0.13.1 - I just reran rails on the folder (under 0.14.2) and it updated my Rakefile - now all is good and it all seems to work just fine. My Rakefile is now 10 lines long. Sorry for wasting your time - thanks for the help.