I am developing 2 applications in Rails 3.1 (there will be an update soon) and noticed that my current strategy has its drawbacks. I am currently doing the following:
I defined databases similar (omitted not interesting parts):
development: database: db/dev.db production: database: db/dev.db
I have both applications running all the time in production mode, where the ports are defined as 3008 and 3009.
rails s thin
I noticed that the following things do not work very well.
? . (Capistrano) ? Rake ? - , ( : -))?
, , , - . ( ):
, . rails/root , :
rails/root
rails/ root/ another/ ... bare/ root.git/ another.git/ ... production/ root/ another/ ...
mkdir rails/production
mkdir rails/bare
cd rails/bare
git clone ../root --bare
cd ../root
git remote add bare ../bare/root
cd rails/production
git clone ../bare/root
cd root
git remote add bare ../../bare/root
root> git push bare
root/../production/root> git pull bare
root> rails s thin -p 4009
root/../production/root> rails s thin -e production -p 3009
, , , , .
- , . , . git. , , , . . (, , EC2), Capistrano . , Heroku. , , git push, . concurrency Heroku , .
git push
, Windows Rails, Linux. Windows , . Mac Linux. Ubuntu Linux Windows Rails.