rails - bundle - 没有开发测试的部署失败

时间:2013-12-02 11:40:12

标签: ruby-on-rails ruby deployment rspec capistrano

我有一个rails项目,我对所有控制器和模型进行了rspec次测试,最近我做了一些更改,并将carrierwave图像上传添加为现有控制器的功能,所以现在我尝试通过capistrano部署我的项目,但我得到:

*** [deploy:update_code] rolling back
  * executing "rm -rf /var/www/comp/htdocs/master/my-project/releases/20131202113037; true"
    servers: ["app.stage.comp.net"]
    [app.stage.comp.net] executing command
    command finished in 2561ms
failed: "env LANG=en_US.UTF-8 rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell '1.9.3@my-project' -c 'cd /var/www/comp/htdocs/master/my-project/releases/20131202113037 && bundle install --gemfile /var/www/comp/htdocs/master/my-project/releases/20131202113037/Gemfile --path /var/www/comp/htdocs/master/my-project/shared/bundle --deployment --quiet --without development test'" on app.stage.comp.net

为什么我会失败?是因为我没有为这个近期功能编写rspec测试? 我怎么能得到这个?

BTW:rspec测试没有失败。

1 个答案:

答案 0 :(得分:0)

正如评论中提到的那样,我没有推动更新的Gemfile.lock。我还通过以下链接设置RspecFactoryGirl来测试Carrierwave上传器:

http://icebergist.com/posts/rspec-and-factorygirl-setup-for-testing-carrierwave-uploaders