- 部署标志需要一个Gemfile.lock。请确保您在部署之前已将Gemfile.lock检入版本控制 [英] The --deployment flag requires a Gemfile.lock. Please make sure you have checked your Gemfile.lock into version control before deploying
问题描述
执行cd $ HOME / releases / 20130629113827&& bundle install --gemfile $ HOME / releases / 20130629113827 / Gemfile --path $ HOME / shared / bundle --deployment - 安静 - 没有开发测试
执行命令
--deployment标志需要一个Gemfile.lock。请确保您在部署之前已将
您的Gemfile.lock检入版本控制。
这是我到目前为止所达到的目标:
- 服务器上存在Gemfile和Gemfile.lock
- Gemfile.lock直接存在于应用程序根目录中(它不在文件夹或其中) / li>
- 发布文件夹在实际版本目录下没有任何文件
- 我将Gemfile中的所有宝石与Gemfile.lock进行了比较,它们都存在
- 我的Gemfile和Gemfile.lock都在scm中被检入,而.bundle在忽略列表中。
我不会在Capistrano中使用任何设置来绑定,所以我错过了一个设置或
的某些东西?
提前感谢
我得到了它的问题是我的rails应用程序根目录位于另一个名为app的目录中,所以Capistrano正在寻找Gemfile错误目录我解决了简单的添加到deploy.rb:
set:bundle_gemfileapp / Gemfile
我希望这可以帮助任何有这个问题的人
I get this error when i deploy with Capistrano on a server, I have tried to solve it for about 3 hours now unsuccessfully this errors happens when cap runs bundle install
executing "cd $HOME/releases/20130629113827 && bundle install --gemfile $HOME/releases/20130629113827/Gemfile --path $HOME/shared/bundle --deployment --quiet --without development test"
executing command
The --deployment flag requires a Gemfile.lock. Please make sure you have checked
your Gemfile.lock into version control before deploying.
Here is what i reached so far :
- both Gemfile and Gemfile.lock exists on the server
- Gemfile.lock exists in the application root directory directly (it's not inside a folder or something)
- the releases folder doesn't have any files beside the actual releases directories
- i compared all the gems in Gemfile with Gemfile.lock and they all exists
- I have both my Gemfile and Gemfile.lock checked in the scm and .bundle is in the ignore list
I don't use any settings for bundler in Capistrano so did i miss a setting or something?
Thanks in advance
I got it.The problem was that my rails application root directory is inside another directory called app so Capistrano was looking for Gemfile in a wrong directory i solved the simply by adding this to deploy.rb :
set :bundle_gemfile, "app/Gemfile"
I hope this can help anyone who have this problem
这篇关于 - 部署标志需要一个Gemfile.lock。请确保您在部署之前已将Gemfile.lock检入版本控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!