Created
June 13, 2014 03:09
-
-
Save dqaria/ec9d41f6fa8a929a9a41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/rails/; | |
rails new {query}; | |
#将capistrano代码复制过来 | |
#capistrano代码请自行配置 http://railscasts.com/episodes/337-capistrano-recipes | |
cp -R ~/rails/ToolBox/capistrano/recipes ~/rails/{query}/config/; | |
cp ~/rails/ToolBox/capistrano/deploy.rb ~/rails/{query}/config/; | |
#在deploy.rb中设置应用名为APPLICATION_NAME | |
sed 's/APPLICATION_NAME/{query}/g' ~/rails/{query}/config/deploy.rb > ~/rails/{query}/config/deploy.rb; | |
#配置pow,如未使用可删除 | |
cd ~/.pow; | |
ln -s ~/rails/{query}; | |
cd ~/rails/{query}/; | |
#我使用bitbucket托管代码,用github自行修改 | |
curl -u username:password -d "name={query}&scm=git&is_private=true&language=ruby" https://api.bitbucket.org/1.0/repositories | |
git init; | |
git remote add origin ssh://git@bitbucket.org/username/{query}.git; | |
git add .; | |
git commit -m "init project"; | |
git push -u origin --all; | |
mate .; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment