OpenShift部署本地应用程序

时间:2013-04-13 10:12:30

标签: ruby-on-rails ruby-on-rails-3 ruby-on-rails-3.2 openshift

我跟随他们的两位导游:

  1. 设置RHC gem Here
  2. 设置私钥/公钥和Putty Here
  3. 但是我无法将rails应用程序部署到服务器。按照他们的教程,我必须使用Git进行部署。这里没问题所以我添加了我的项目目录git add .提交了一个提交git commit -a -m "OS Deploy"然后Git push然而这不会起作用,因为我不知道在哪里可以找到我的OpenShift应用程序的地址。 / p>

    所以我不知道如何将代码从本地机器传输到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错误

2 个答案:

答案 0 :(得分:0)

您是否查看了开发人员中心的Ruby资源? https://www.openshift.com/developers/ruby

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

答案 1 :(得分:0)