Could not determine latest_revision

Hi there.

I’ve been trying to deploy a rails app to one of my web servers with
little success. I’ve only been following the instructions from Agile Web
Development.

Everything seemed to go well until I got to

# rake remote:cold_deploy

Where I got the following response. (I’ve added --trace if it helps)

1. # rake remote:cold_deploy --trace 2. (in /home/ben/web/carrie) 3. ** Invoke remote:cold_deploy (first_time) 4. ** Execute remote:cold_deploy 5. Capistrano/Rake integration is deprecated. 6. Please invoke the 'cap' command directly: `cap cold_deploy' 7. * executing task cold_deploy 8. * executing task update 9. ** transaction: start 10. * executing task update_code 11. * querying latest revision... 12. /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/inflector.rb:251: command not found: svn log --no-auth-cache -q --limit 1 http://www.carrie.co.uk/carrie/trunk 13. *** [update_code] transaction: rollback 14. * [update_code] rolling back 15. * executing "rm -rf /home/carrie/www/releases/20070329140902" 16. servers: ["www.carrie.co.uk"] 17. Password: 18. [www.carrie.co.uk] executing command 19. command finished 20. rake aborted! 21. Could not determine latest revision 22. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/scm/subversion.rb:24:in `latest_revision' 23. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:62:in `initialize' 24. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:89:in `call' 25. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:89:in `[]' 26. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:236:in `method_missing' 27. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/scm/subversion.rb:63:in `checkout' 28. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/recipes/standard.rb:80:in `load' 29. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in `instance_eval' 30. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in `update_code' 31. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/recipes/standard.rb:145:in `load' 32. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:430:in `transaction' 33. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/recipes/standard.rb:144:in `load' 34. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in `instance_eval' 35. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in `update' 36. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/recipes/standard.rb:261:in `load' 37. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in `instance_eval' 38. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in `cold_deploy' 39. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/cli.rb:268:in `send' 40. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/cli.rb:268:in `execute_recipes!' 41. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/cli.rb:268:in `each' 42. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/cli.rb:268:in `execute_recipes!' 43. /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/cli.rb:239:in `execute!' 44. /home/ben/web/carrie/config/../lib/tasks/capistrano.rake:18:in `cap' 45. /home/ben/web/carrie/config/../lib/tasks/capistrano.rake:26 46. /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `call' 47. /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute' 48. /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `each' 49. /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute' 50. /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke' 51. /usr/lib/ruby/1.8/thread.rb:135:in `synchronize' 52. /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke' 53. /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run' 54. /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `each' 55. /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run' 56. /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 57. /usr/bin/rake:18:in `load' 58. /usr/bin/rake:18

I read on this forum somewhere that you’re meant to use cap cold_deploy.
But this gave a similar error:

[code]

  1. cap cold_deploy

    • executing task cold_deploy
    • executing task update
  2. ** transaction: start
    • executing task update_code
    • querying latest revision…
  3. /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27: command
    not found: svn log --no-auth-cache -q --limit 1
    http://www.carrie.co.uk/carrie/trunk
  4. *** [update_code] transaction: rollback
    • [update_code] rolling back
    • executing “rm -rf /home/carrie/www/releases/20070329140943”
  5. servers: ["www.carrie.co.uk"]
    
  6. Password:
  7. [www.carrie.co.uk] executing command
    
  8. command finished
    

/usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/scm/subversion.rb:24:in
latest_revision': Could not determine latest revision (RuntimeError) 16. from /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:62:in initialize’
17. from
/usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:89:in
call' 18. from /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:89:in []’
19. from
/usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/configuration.rb:236:in
method_missing' 20. from /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/scm/subversion.rb:63:in checkout’
21. from
/usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/recipes/standard.rb:80:in
load' 22. from /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in instance_eval’
23. from
/usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/actor.rb:159:in
update_code' 24. ... 13 levels... 25. from /usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/lib/capistrano/cli.rb:12:in execute!’
26. from
/usr/lib/ruby/gems/1.8/gems/capistrano-1.4.1/bin/cap:11
27. from /usr/bin/cap:18:in `load’
28. from /usr/bin/cap:18[/code]

I’m guessing there is a step that I haven’t done. Perhaps a simple rake
command telling rails that we’re about to go live? Or maybe I haven’t
set up the production database correctly? (I have made the production
database on both my local and remote system with the same details. But
the databases themselves have no tables i.e. no scheme_info)

I’m developing and deploying on the latest Gentoo Linux. The server is
running the lastest Apache I’ve gone down the mongrel and proxy route,
seeing as that’s the route of the book.

Judging by this message: command not found: svn log --no-auth-cache -q
–limit 1
it just isn’t finding svn anywhere on PATH (?)

Alex

Alexey V. wrote:

Judging by this message: command not found: svn log --no-auth-cache -q
–limit 1
it just isn’t finding svn anywhere on PATH (?)

Alex

I’m not quite sure what this means (I’m new to ruby and rail). Either
way, I suppose I’m not surprised it cannot find one, since I haven’t
(too my knowledge… rails might do this automatically) actively used any
svn.

Having built most of my rails app, it’s not too hard to install
Subversion and get it all working hunkey dorey at this stage is it?

svn is the command-line client of Subversion. If you don’t have it
installed
on your production rig, you cannot use Capistrano for deployment (not
the
current version, anyway).

Alex

On 3/29/07, Ben G. [email protected] wrote:

Having built most of my rails app, it’s not too hard to install
Subversion and get it all working hunkey dorey at this stage is it?

Hopefully not. :slight_smile:
Depends on your hosting arrangements.

Alex

On 29.3.2007, at 18.10, Ben G. wrote:

Having built most of my rails app, it’s not too hard to install
Subversion and get it all working hunkey dorey at this stage is it?

Not at all, just do
[your_pkg_mgmt_software] install svn (or subversion)


Jarkko L.

http://www.railsecommerce.com
http://odesign.fi

On 3/29/07, Alexey V. [email protected] wrote:

svn is the command-line client of Subversion. If you don’t have it
installed on your production rig, you cannot use Capistrano for deployment
(not the current version, anyway).

You will need some type of source control to use Capistrano (and you
should
be using it anyway), but if you can’t install Subversion on a remotely
accessible server for whatever reason, you can use this plug in:

http://blog.wolfman.com/articles/2006/12/06/a-capistrano-scm-module-for-local-svn-access

I’ve used it with success to deploy code from inside our local network
to a
server on the internet.

Regards,

Luke F.
Ruby on Rails Developer
Slantwise Design http://slantwisedesign.com