cap deploy:迁移失败,无法找到Gemfile
我正在进行第一次Rails部署,但遇到无法解决的问题。
mac osx 10.8.2
ruby 1.8.7
Rails 3.2.6
rvm 1.17.2
I'm working on my first rails deployment and having a problem I can't figure out. mac osx 10.8.2 ruby 1.8.7 Rails 3.2.6 rvm 1.17.2
I'一直在遵循本教程 http://brandnewrails.wordpress.com/ 并陷入7c。
我将其全部设置在RVM中,让git在服务器上运行,在应用程序中运行捆绑安装
,并在my_app / config / deploy中编写了Capistrano配方.rb
I've been following this tutorial http://brandnewrails.wordpress.com/ and got stuck on 7c.
I set it all up in RVM, got git running on the server, ran bundle install
in the app, and wrote the Capistrano recipe in my_app/config/deploy.rb
然后我运行:
$ capify。
没问题
$ cap deploy:setup
没有错误
$ cap deploy:check
返回了您似乎已经安装了所有必需的依赖项
$ cap deploy:migrations
。成功运行一堆命令后,capistrano失败。见下文:
$ cap deploy:migrations
is where the problem happens. After successfully running a bunch of the commands, capistrano fails. See below:
2012-12-10 00:43:56 executing `bundle_install'
* executing "cd /home/{servername}/party/releases/20121209134354 && bundle install --path vendor/bundle"
servers: ["{servername}"]
[{servername}] executing command
** [out :: {servername}] Could not locate Gemfile
command finished in 694ms
failed: "sh -c 'cd /home/alexchee/party/releases/20121209134354 && bundle install --path vendor/bundle'" on {servername}
上安装&path;捆绑安装--path vendor / bundle'该怎么办?当我检查应用程序目录时,Gemfile就在其中。有任何想法或其他问题吗?
Does anyone know what to do? When I check the app directory, the Gemfile is there. Any ideas or further questions?
在这种情况下,capistrano无法定位Gemfile似乎是没有在本地应用(即我自己的计算机)上启动git。
The inability of capistrano to locate a Gemfile in this case seems to be a symptom of not having initiated git in the app locally, that is on my own computer.
我的直觉是,由于Gemfile是上面列表中的第一个文件,因此这就是它首先创建错误的原因。如果该程序继续进行,则可能还会出现其他错误。
My hunch is that since Gemfile is the first file in the list above, that is why it created an error first. If the program had continued, it would have probably had other errors as well.
即使git在服务器上运行且应用程序已正确捆绑,您也必须本地启动git并将其定向到服务器上的相应文件,以使部署正常进行。
Even if git is running on the server and the app is bundled up correctly, you must also initiate git locally and direct it to the appropriate files on your server in order for the deploy to work.
此处列出了很好的说明: http://brandnewrails.wordpress.com/2012/10/14/lesson-7b/
Great instructions are listed here: http://brandnewrails.wordpress.com/2012/10/14/lesson-7b/