# Could not determine latest\_revision

**URL:** <https://www.ruby-forum.com/t/could-not-determine-latest-revision/90525>\
**Category:** Deployment\
**Created:** [March 29, 2007, 4:18pm UTC](https://www.ruby-forum.com/t/could-not-determine-latest-revision/90525 "2007-03-29T16:18:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hailandkill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f4b2a3/32.png) [@hailandkill](https://www.ruby-forum.com/u/hailandkill)\
**Post date:** [March 29, 2007, 4:18pm UTC](https://www.ruby-forum.com/t/could-not-determine-latest-revision/90525/1 "2007-03-29T16:18:56Z")

</div>

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

```auto
# 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
2. 
  - executing task cold\_deploy

3. 
  - executing task update

4. \*\* transaction: start
5. 
  - executing task update\_code

6. 
  - querying latest revision…

7. /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](http://www.carrie.co.uk/carrie/trunk)
8. \*\*\* [update\_code] transaction: rollback
9. 
  - [update\_code] rolling back

10. 
  - executing “rm -rf /home/carrie/www/releases/20070329140943”

11. 

```
servers: ["www.carrie.co.uk"]

```

12. Password:
13. 

```
[www.carrie.co.uk] executing command

```

14. 

```
command finished

```

15. 

/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.

---

<div class="post-metadata">

**Author:** ![hailandkill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f4b2a3/32.png) [@hailandkill](https://www.ruby-forum.com/u/hailandkill)\
**Post date:** [March 29, 2007, 4:24pm UTC](https://www.ruby-forum.com/t/could-not-determine-latest-revision/90525/2 "2007-03-29T16:24:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hailandkill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f4b2a3/32.png) [@hailandkill](https://www.ruby-forum.com/u/hailandkill)\
**Post date:** [March 29, 2007, 4:47pm UTC](https://www.ruby-forum.com/t/could-not-determine-latest-revision/90525/3 "2007-03-29T16:47:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hailandkill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f4b2a3/32.png) [@hailandkill](https://www.ruby-forum.com/u/hailandkill)\
**Post date:** [March 29, 2007, 5:10pm UTC](https://www.ruby-forum.com/t/could-not-determine-latest-revision/90525/4 "2007-03-29T17:10:03Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![hailandkill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f4b2a3/32.png) [@hailandkill](https://www.ruby-forum.com/u/hailandkill)\
**Post date:** [March 29, 2007, 4:58pm UTC](https://www.ruby-forum.com/t/could-not-determine-latest-revision/90525/5 "2007-03-29T16:58:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hailandkill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f4b2a3/32.png) [@hailandkill](https://www.ruby-forum.com/u/hailandkill)\
**Post date:** [March 29, 2007, 5:25pm UTC](https://www.ruby-forum.com/t/could-not-determine-latest-revision/90525/6 "2007-03-29T17:25:20Z")

</div>

On 3/29/07, Ben G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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. 🙂  
Depends on your hosting arrangements.

Alex

---

<div class="post-metadata">

**Author:** ![hailandkill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f4b2a3/32.png) [@hailandkill](https://www.ruby-forum.com/u/hailandkill)\
**Post date:** [March 30, 2007, 8:24am UTC](https://www.ruby-forum.com/t/could-not-determine-latest-revision/90525/7 "2007-03-30T08:24:02Z")

</div>

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.

> **[jlaine.net](https://jlaine.net/)**
>
> Your freedom to carry a gun messes with my freedom to walk around without fear. Your freedom to “stand your ground” with force is at odds with my …

> **[Home](https://dotherightthing.com/)**
>
> do the right thing

[http://www.railsecommerce.com](http://www.railsecommerce.com)  
[http://odesign.fi](http://odesign.fi)

---

<div class="post-metadata">

**Author:** ![hailandkill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f4b2a3/32.png) [@hailandkill](https://www.ruby-forum.com/u/hailandkill)\
**Post date:** [March 29, 2007, 5:33pm UTC](https://www.ruby-forum.com/t/could-not-determine-latest-revision/90525/8 "2007-03-29T17:33:24Z")

</div>

On 3/29/07, Alexey V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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](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](http://slantwisedesign.com)
