1

我遵循了他们的两个指南:

  1. 在这里设置 RHC gem
  2. 在此处设置私钥/公钥和 Putty

但是我无法将我的 rails 应用程序部署到服务器。按照他们的教程,我必须使用 Git 部署它。这里没问题,所以我添加了我的项目目录git add .并提交了git commit -a -m "OS Deploy"Git push但是这不会起作用,因为我不知道在哪里可以找到我的 OpenShift 应用程序的地址。

所以我不知道如何将代码从本地机器传输到 OpenShift 应用程序。

我该如何部署我的应用程序。也可以简单地从我的 git repo 中提取代码吗?

我找到了我的应用地址:ssh://***094@corporation -eveonline.rhcloud.com/~/git/corporation.git/

但是,当我尝试将本地应用程序推送到 OpenShift 时,我得到:

warning: no common commits
remote: Counting objects: 420, done.
remote: Compressing objects: 100% (202/202), done.
remote: Total 420 (delta 186), reused 420 (delta 186)
Receiving objects: 100% (420/420), 140.16 KiB | 138 KiB/s, done.
Resolving deltas: 100% (186/186), done.
From ssh://corporation-eveonline.rhcloud.com/~/git/corporation
 * branch            HEAD       -> FETCH_HEAD
Auto-merging script/rails
CONFLICT (add/add): Merge conflict in script/rails
Auto-merging config/routes.rb
CONFLICT (add/add): Merge conflict in config/routes.rb
Auto-merging config/initializers/session_store.rb
CONFLICT (add/add): Merge conflict in config/initializers/session_store.rb
Auto-merging config/initializers/secret_token.rb
CONFLICT (add/add): Merge conflict in config/initializers/secret_token.rb
Auto-merging config/environments/test.rb
CONFLICT (add/add): Merge conflict in config/environments/test.rb
Auto-merging config/environments/production.rb
CONFLICT (add/add): Merge conflict in config/environments/production.rb
Auto-merging config/environments/development.rb
CONFLICT (add/add): Merge conflict in config/environments/development.rb
Auto-merging config/environment.rb
CONFLICT (add/add): Merge conflict in config/environment.rb
Auto-merging config/database.yml
CONFLICT (add/add): Merge conflict in config/database.yml
Auto-merging config/application.rb
CONFLICT (add/add): Merge conflict in config/application.rb
Auto-merging config.ru
CONFLICT (add/add): Merge conflict in config.ru
Auto-merging app/views/layouts/application.html.erb
CONFLICT (add/add): Merge conflict in app/views/layouts/application.html.erb
Auto-merging app/controllers/application_controller.rb
CONFLICT (add/add): Merge conflict in app/controllers/application_controller.rb
Auto-merging app/assets/stylesheets/application.css
CONFLICT (add/add): Merge conflict in app/assets/stylesheets/application.css
Auto-merging Rakefile
CONFLICT (add/add): Merge conflict in Rakefile
Auto-merging README.md
CONFLICT (add/add): Merge conflict in README.md
Auto-merging Gemfile.lock
CONFLICT (add/add): Merge conflict in Gemfile.lock
Auto-merging Gemfile
CONFLICT (add/add): Merge conflict in Gemfile
Auto-merging .gitignore
CONFLICT (add/add): Merge conflict in .gitignore
Automatic merge failed; fix conflicts and then commit the result.

所以我再次尝试推送到我的应用程序地址并没有收到该错误但是我确实收到了: https ://gist.github.com/nered/82d7ca1fa334617210c1错误

4

2 回答 2

0

您是否查看过在 Ruby 开发者中心找到的资源?https://www.openshift.com/developers/ruby

有一个快速入门 ( https://github.com/openshift/rails-example ),您可以在部署自己的代码之前尝试它,只是为了熟悉部署 Rails 应用程序。在快速入门之后,您可以查看博客,看看它们是否也有帮助。

于 2013-04-13T18:17:51.023 回答
0

您要做的是将新的 git repo 与您自己现有的 git repo 同步

于 2013-06-26T16:20:42.227 回答