【发布时间】:2012-12-09 14:26:24
【问题描述】:
我正在处理我的第一个 Rails 部署,但遇到了一个我无法解决的问题。 macOS 10.8.2 红宝石 1.8.7 导轨 3.2.6 rvm 1.17.2
我一直在关注本教程 http://brandnewrails.wordpress.com/ 并卡在 7c 上。
我在 RVM 中进行了设置,让 git 在服务器上运行,在应用程序中运行 bundle install,并在 my_app/config/deploy.rb 中编写 Capistrano 配方
然后我跑了:
$ capify .没问题
$ cap deploy:setup 没有错误
$ cap deploy:check 返回You appear to have all necessary dependencies installed
$ cap deploy:migrations 是问题发生的地方。成功运行一堆命令后,capistrano 失败。见下文:
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}
有人知道该怎么做吗?当我检查应用程序目录时,Gemfile 就在那里。有什么想法或其他问题吗?
【问题讨论】:
-
检查
/home/alexchee/party/releases/20121209134354文件夹中的内容。由于某种原因,应用程序存储库似乎没有被复制到那里。您使用的是博文中的deploy.rb文件吗?还是你注释掉了一些? -
还要确保 gem 文件(Gemfile 和 Gemfile.lock)都签入到您的 GIT 存储库中。
-
./ ../ Gemfile.lock .git/ log@ public/ REVISION tmp/ vendor/
-
@PrakashMurthy 你说得对,整个应用程序没有复制过来,因为我没有在我的计算机上的应用程序中运行
git init等。操作员错误:/感谢您的帮助!还有你@Jamsi -
@cheekipoo 太棒了。请使用发现更新问题,或将其添加为答案,以便帮助遇到相同问题的其他人。
标签: ruby-on-rails-3 capistrano gemfile