# Cap 2.1, Rails 1.2.5, rake task, and Dreamhost problem

**URL:** <https://www.ruby-forum.com/t/cap-2-1-rails-1-2-5-rake-task-and-dreamhost-problem/121341>\
**Category:** Deployment\
**Created:** [November 27, 2007, 1:38am UTC](https://www.ruby-forum.com/t/cap-2-1-rails-1-2-5-rake-task-and-dreamhost-problem/121341 "2007-11-27T01:38:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ed\_ruder](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/d9b06d/32.png) [@ed\_ruder](https://www.ruby-forum.com/u/ed_ruder)\
**Post date:** [November 27, 2007, 1:38am UTC](https://www.ruby-forum.com/t/cap-2-1-rails-1-2-5-rake-task-and-dreamhost-problem/121341/1 "2007-11-27T01:38:42Z")

</div>

[Cross-posted from the Capistrano group]

I am experiencing a Catch-22 problem:

- Deploying a simple rails 1.2.5 app on a Dreamhost account.

- Dreamhost only has Rails 1.2.3 installed, so I’ve installed my own  
Ruby, rubygems, Rails, etc., which is working _almost_ perfectly. (The  
exception is the problem I am describing here.)

- There is an :after\_update\_code task that calls a rake task to deploy  
a tagged version of Rails to a shared location (patterned after Mike  
Clark’s “Managing Rails Versions with Capistrano” and Matthew Bass’s  
“Converting Mike’s Capistrano Cadillac into a Camero” blog posts, and  
my own improvements ([Parked at Loopia](http://pastie.caboo.se/116805)). The task is  
running this:

cd #{release\_path} && rake deploy\_edge #{rails\_version}  
SHARED\_PATH=#{deploy\_to}/shared

deploy\_edge is in the pastie, above, and works locally on my Mac and  
when executed from the shell on the host.

- The rake task is failing with the following error:

- When I run “rake deploy\_edge TAG=rel\_1-2-5 SHARED\_PATH=/home/me/  
[blah.org/shared](http://blah.org/shared)” from the host shell, it works perfectly, but it’s  
using the rake that I installed, which is using the Rails 1.2.5 that  
is in my own gems directory. From the error above, Dreamhost’s rake is  
being run (/usr/bin/rake) against Dreamhost’s gems, which don’t  
include Rails 1.2.5.

- My .bash\_profile in my shell is what puts my own bin directory in  
front of Dreamhost’s, which is how my Ruby/gem/rake/Rails gets found  
when I run from the shell. However, Capistrano doesn’t appear to be  
using my .bash\_profile to set the PATH.

Question: what do I need to do to set the PATH s.t. Capistrano shell  
commands find my private Ruby/gem/rake/Rails?

Thank you in advance.

Ed
