首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

moonshine调度rails项目

2012-12-19 
moonshine部署rails项目moonshine部署项目——rails 31. 在项目目录下安装插件:$ rails plugin install git:

moonshine部署rails项目

moonshine部署项目——rails 3
1. 在项目目录下安装插件:
$ rails plugin install git://github.com/railsmachine/moonshine.git
2. 生成配置文件
$ rails generate moonshine
会生成config/moonshine.yml
3. 在Gemfile中加入:
gem 'shadow_puppet'
gem 'capistrano-ext'
这两个为moonshine需要依赖的gem
4. 编辑moonshine.yml和deploy.rb


5. 部署安装
$ cap deploy:setup
6. 安装依赖包,部署项目
$ cap deploy

过程中出现问题:
1. 服务器未自动安装subversion,手动安装
2. svn中开始有Gemfile.lock,删除后出错
3. 在config/deploy.rb中添加:
task :copy_configuration do
? run "cp #{shared_path}/config/*.* #{release_path}/config/"
end

将shared/config下的文件覆盖到current中
after "deploy:update_code", :copy_configuration

热点排行