#15 楼 @thisiskun 还是同样的错误
#11 楼 @thisiskun 不是 deploy.rb 中有这句吗?
put File.read("config/database.example.yml"), "#{shared_path}/config/database.yml"
我进 #{shared_path}/config/
中发现有 database.yml
,你说的是指这个吗?
#9 楼 @thisiskun 你是怎么解决的呢?
是由于这里没有生成当前的 release
的原因吗?
executing "if [ -d /home/deployer/apps/tick/shared/cached-copy ]; then cd /home/deployer/apps/tick/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard aef5b8ce4a532b0d7c9b9a04f5ce0d07563829a1 && git clean -q -d -x -f; else git clone -q [email protected]:HorX/tick.git /home/deployer/apps/tick/shared/cached-copy && cd /home/deployer/apps/tick/shared/cached-copy && git checkout -q -b deploy aef5b8ce4a532b0d7c9b9a04f5ce0d07563829a1; fi"
#4 楼 @thisiskun 原来current
只是软连,我执行 cap eploy:setup' 后执行
cap deploy` ,发现有错误输出:
ihor@work:/www/tick$ [master] cap deploy
* 2013-03-12 12:27:08 executing `deploy'
triggering before callbacks for `deploy'
* 2013-03-12 12:27:08 executing `deploy:check_revision'
* 2013-03-12 12:27:08 executing `deploy:update'
** transaction: start
* 2013-03-12 12:27:08 executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote [email protected]:HorX/tick.git master"
command finished in 4366ms
* executing "if [ -d /home/deployer/apps/tick/shared/cached-copy ]; then cd /home/deployer/apps/tick/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard aef5b8ce4a532b0d7c9b9a04f5ce0d07563829a1 && git clean -q -d -x -f; else git clone -q [email protected]:HorX/tick.git /home/deployer/apps/tick/shared/cached-copy && cd /home/deployer/apps/tick/shared/cached-copy && git checkout -q -b deploy aef5b8ce4a532b0d7c9b9a04f5ce0d07563829a1; fi"
servers: ["new.dev.com"]
[new.dev.com] executing command
command finished in 8877ms
copying the cached version to /home/deployer/apps/tick/releases/20130312042724
* executing "cp -RPp /home/deployer/apps/tick/shared/cached-copy /home/deployer/apps/tick/releases/20130312042724 && (echo aef5b8ce4a532b0d7c9b9a04f5ce0d07563829a1 > /home/deployer/apps/tick/releases/20130312042724/REVISION)"
servers: ["new.dev.com"]
[new.dev.com] executing command
command finished in 854ms
* 2013-03-12 12:27:25 executing `deploy:finalize_update'
triggering before callbacks for `deploy:finalize_update'
* 2013-03-12 12:27:25 executing `deploy:assets:symlink'
* executing "rm -rf /home/deployer/apps/tick/releases/20130312042724/public/assets && mkdir -p /home/deployer/apps/tick/releases/20130312042724/public && mkdir -p /home/deployer/apps/tick/shared/assets && ln -s /home/deployer/apps/seearm/shared/assets /home/deployer/apps/tick/releases/20130312042724/public/assets"
servers: ["new.dev.com"]
[new.dev.com] executing command
command finished in 845ms
* 2013-03-12 12:27:26 executing `bundle:install'
* executing "cd /home/deployer/apps/tick/releases/20130312042724 && bundle install --gemfile /home/deployer/apps/tick/releases/20130312042724/Gemfile --path /home/deployer/apps/tick/shared/bundle --deployment --quiet --without development test"
servers: ["new.dev.com"]
[new.dev.com] executing command
** [out :: new.dev.com] sh: 1:
** [out :: new.dev.com] bundle: not found
** [out :: new.dev.com]
command finished in 858ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/deployer/apps/tick/releases/20130312042724; true"
servers: ["new.dev.com"]
[new.dev.com] executing command
command finished in 845ms
failed: "sh -c 'cd /home/deployer/apps/tick/releases/20130312042724 && bundle install --gemfile /home/deployer/apps/tick/releases/20130312042724/Gemfile --path /home/deployer/apps/tick/shared/bundle --deployment --quiet --without development test'" on new.dev.com
最后面的错误,上服务器取看,发现releases
目录没有 20130312042724
这个 release
是这里吧?
sudo "ln -nfs #{current_path}/config/nginx.conf /etc/nginx/sites-enabled/#{application}.conf"
sudo "ln -nfs #{current_path}/config/unicorn_init.sh /etc/init.d/unicorn_#{application}"
评论嵌套太多层的话就像网易评论里面盖楼一样,不怎么好看了
@huacnlee ,可以帮我看下 http://ruby-china.org/topics/9317 这个帖子里面我部署时遇到的问题吗,谢谢
#2 楼 @happypeter 我看了你的那两期和 railscasts 上面的视频,发现 deployer.rb 里面基本一样,但部署起来就有问题了,找了很久没找到原因。
我是初学 ror,想尝试下用 cap 来部署,之前折腾着玩都是在 appfog,heroku 上面的
郁闷啊,还是没找到原因,哪位帮我看看啊。
cool
个人博客的话 StartSSL 的免费方案就够了吧?
演讲超赞,对于毕业刚从事软件行业的人来说,很收益。
尤其是那句"Technial debt is debt ..." ,让我一下子压力山大...
一定要早去..!!
早上付款结束就打不开了....
求在魔都也举办这样的活动
已购票,期待
16 号周五啊,请不到家,可以 17 号一天吗?
@HanHor 试试
以前只用过 cacti.....
报名参加~~
偶上榜了.....
+1