Forum: Ruby on Rails Trouble with migrate over Switchtower

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2dd4f0af6b0137e9a0798b1f1abb9b00?d=identicon&s=25 Mike Zornek (Guest)
on 2006-02-01 07:57
(Received via mailing list)
>From my blog:
http://clickablebliss.com/blog/2006/02/01/trouble_...
wer/

> Lately though I¹ve run into an issue
> trying to run migrations over Switchtower.

> So I¹ll prepare a migration and commit it to the repository. I¹ll then do a
> deploy to get the latest version up on the production server. Next, I¹ll run
> the following to tell the production server to run a migration:

>     rake remote_exec ACTION=migrate

> It won't work though, in the errors I get:

>     bash: line 1: rake: command not found.

> I have no idea why this can¹t find the rake command. If I ssh into the
> production machine and manually run that command:

>     cd /webserver/cbwebsite/current && rake RAILS_ENV=production migrate

> , it works fine. I previously
> set up my paths in both .bashrc and .bash_login. During some troubleshooting I
> even added a ~/.ssh/environment file and added the PATH there ? nothing seems
> to fix this.

> Any ideas?

Thanks in advance for your help.

~ Mike
--
Work: http://ClickableBliss.com
Play: http://MikeZornek.com
992fe8c19bbbc27f2b562a9f96efc03d?d=identicon&s=25 Jamis Buck (Guest)
on 2006-02-01 15:08
(Received via mailing list)
Where is rake located on your target machine? Note that .bashrc
and .bash_login are _not_ read by the SSH process, and there have
been reports of ~/.ssh/environment not working, either, for some people.

However, you can set the :rake variable in your deploy.rb to specify
the full path to the rake executable on the remote host(s):

   set :rake, "/opt/local/bin/rake"

- Jamis
2dd4f0af6b0137e9a0798b1f1abb9b00?d=identicon&s=25 Mike Zornek (Guest)
on 2006-02-01 17:05
(Received via mailing list)
On 2/1/06 9:05 AM, "Jamis Buck" <jamis@37signals.com> wrote:

> Where is rake located on your target machine? Note that .bashrc
> and .bash_login are _not_ read by the SSH process, and there have
> been reports of ~/.ssh/environment not working, either, for some people.
>
> However, you can set the :rake variable in your deploy.rb to specify
> the full path to the rake executable on the remote host(s):
>
>  set :rake, "/opt/local/bin/rake"
>
> - Jamis

Thanks. I didn't know I could set that. Now that I have it works as
expected. Thanks.

~ Mike
--
Work: http://ClickableBliss.com
Play: http://MikeZornek.com
This topic is locked and can not be replied to.