hello, i am learning to use these tools but i am confused on how to do
this.
basically i have webspace with a awesome rails host and would like to be
able to launch my project the way its suppose to. i hear many nice
things about capistrano and such.
so for the past few months, ive been working on a few rails apps on my
local machine. now that i am rdy to launch, what/how/where do i setup
the svn?
i assume this for initial creation is this correct?
set/create a svn repository on my web rails account.
create a empty rails project skeleton repository on my web rails
account
check out the skeleton version from the web rails account to my local
machine or import my working copy on my local machine into the newly
created repository on my web rails account?(which is better?)
next.
now when i need to make changes to my web rails application
checkout the latest version on my web rails account.
make my changes on my local machine
configure capistrano to my rails app on my local machine
hello thanks for the awesome response and for providing the link!
a few questions?
Do an svn checkout to get the login/password cached by SVN on the
host. Delete this checkout.
i do the checkout on my local machine, on the host machine, via the svn
co http…command? do i still create a rails skeleton on the host
machine? or do i do the checkout on the host machine and delete that
version?
i guess im confused about how there are 2 svn repositories. one on my
local and one on the host. is it not possible that both svn repositories
be mismatched?
Basically, you need to install teh capistrano gem locally, make sure
that both localhost and external host have svn installed, create a
repository that is accessible by url and not file:/// and then go from
there.
No. Capistrano does the svn checkout. The process would be as follows.
This assumes that your local source code is already under version
control and you have a repository that is accessible from your
deployment host via svn:// or http://
Setup Capistrano locally (including deploy.rb)
Do an svn checkout to get the login/password cached by SVN on the
host. Delete this checkout.
Setup your database.yml file to match yoru deployment machine
svn commit -m “setting up for capistrano deployment”
You can then either cold_deploy or use setup to get the directory
structure setup.
At that point you should be able to cap deploy and get it working.
Again, Coda’s directions are pretty good if youw ant to deploy wiht a
cluster, otherwise go for the rails manual.
Basically, you need to install teh capistrano gem locally, make sure
that both localhost and external host have svn installed, create a
repository that is accessible by url and not file:/// and then go from
there.
Has anyone written directions on how to setup up apache/capistrano/
mongrel_cluster on a server with plesk 8.1 (our customers need to be
able to manage their own e-mailaddresses in a nice interface etc.)?
There are a few vague threads hanging around here and there, but none
of them have helped me any further. Our server is running Ubuntu 6.06
LTS, Apache 2.0.55, Ruby 1.8.5, MySQL 5.0.21.
I’ve been able to get my Rails app up and running by doing it
manually and hacking into the /var/www/vhosts/mydomain.com/conf/
httpd.include file. This shouldn’t be the way to go, as the first
lines of the httpd.include file clearly state:
ATTENTION!
DO NOT MODIFY THIS FILE OR ANY PART OF IT. THIS CAN RESULT IN
IMPROPER PLESK
FUNCTIONING OR FAILURE, CAUSE DAMAGE AND LOSS OF DATA. IF YOU
REQUIRE CUSTOM
MODIFICATIONS TO BE APPLIED TO THE CONFIGURATION, PLEASE, PERFORM
THEM IN THE
FOLLOWING FILE(S):
/var/www/vhosts/mydomain.com/conf/vhost.conf
/var/www/vhosts/mydomain.com/subdomains//conf/
vhost.conf
However, I’ve tried just about any possible configuration in the
vhost.conf file, but haven’t gotten it to work.
Has anyone written directions on how to setup up apache/capistrano/
mongrel_cluster on a server with plesk 8.1 (our customers need to be
able to manage their own e-mailaddresses in a nice interface etc.)?
There are a few vague threads hanging around here and there, but none
of them have helped me any further. Our server is running Ubuntu 6.06
LTS, Apache 2.0.55, Ruby 1.8.5, MySQL 5.0.21.
As far as I know, you can’t run a mongrel cluster under Apache 2.0.x,
because you need mod_proxy_balancer, and that requires Apache 2.2.
I have successfully upgraded a machine running Plesk 8.1 to Apache 2.2,
but be warned that this requires rebuilding ALL the Apache modules, plus
a bunch of other things you wouldn’t necessarily expect. As I recall,
there isn’t any “how” to it – you just do what needs to be done until
everything works. I did get it working, and retained full Plesk
functionality, without modifying the “DO NOT MODIFY THIS FILE” file:-)
I think I started with this link and the other references it points to:
NOT MODIFY THIS FILE" file:-)
Yeah, I know, I’ve already installed Apache 2.2 in /usr/local/
(instead of the default ubuntu location) in order to not overwrite
the default installation. I guess now I’d have to change the init.d
apache2 script to pick up the version, but I was wondering if anyone
could give me pointer so that I don’t screw up the plesk installation.
hi boboroshi,
i think i understand now after learning more about svn last night. but
what i kind of dont understand is this…when i do a checkout on my
remote server , that basically puts what the latest remote server
version of my app onto my local machine. if i then delete that copy on
my local machine, apply capistrano to a local rails app, how does
capistrano know to check it into where the remote server rails app
resides and put that as the latest?
if my svn is on my local, what is the purpose of having another svn on
the remote?
NOT MODIFY THIS FILE" file:-)
Yeah, I know, I’ve already installed Apache 2.2 in /usr/local/
(instead of the default ubuntu location) in order to not overwrite
the default installation. I guess now I’d have to change the init.d
apache2 script to pick up the version, but I was wondering if anyone
could give me pointer so that I don’t screw up the plesk installation.
As I recall, I backed up everything so that I could test the new
version, and restart the old version when the testing failed.
I changed the script in init.d to point to the new version, changed the
“modules” link in /etc/httpd to point to the new modules directory, and
tried to restart Apache. This led to several rounds of
build-and-install, working from the errors I got. Eventually, I got it
started with nothing commented out in the config files, and all Plesk
functionality available.
Then I added mod_proxy and mod_proxy_balancer to the main config file,
and basically went by the mongrel cluster config given in:
…with appropriate changes so as not to step on anything Plesk thought
it owned. So the site-specific config files went into /etc/httpd/conf.d
as they normally would.
Eventually, everything worked. It’s been stable and fast.
however, my noob self just needs a tad bit more understanding. (or maybe
much more)
is what i am thinking correct?
i have completed my rails application on my local machine.
svn client is both installed on my machine and remote server.
i create the first version of my svn on the remote server.
i import my completed application into version 1 svn.
i create my database for my application on the remote server.
on my local machine, i can Check out the version of my application
located on the remote server.
make changes on how i see fit, and check it back into the svn located
on the remote server.
on my local machine copy, i apply my capistrano and configure the
deploy.rb
rake deploy the rails app and it will checkout the latest version
located on the remote server, put it into the releases folder, sym links
it, and runs a migration?
*question, the rake deploy creates any tables and updates my tables with
whatever is in my schema.rb?
if my svn is on my local, what is the purpose of having another svn on
the remote?
When boboroshi wrote “make sure that both localhost and external host
have svn installed”, (s)he meant that both must have the svn client
installed. The SVN repository could be anywhere on the Internet.
regards
Justin F.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.