简体   繁体   English

Rails如何将代码上传到生产服务器

[英]Rails How To Upload Code To The Production Server

I managed to create my first ROR application, called myapp, locally and I also have created another ROR application on my webfaction server with the same name myapp. 我设法在本地创建了第一个ROR应用程序,称为myapp,并且还在我的webfaction服务器上创建了另一个同名的myapp。 My question is every time I run commands "rails generate model" or "rails generate controller", how can I synchronise my local environment with my webfaction server. 我的问题是,每当我运行“ rails generate model”或“ rails generate controller”命令时,如何将本地环境与Webfaction服务器同步。 There seem to be lots of files generated when you run rails commands. 运行rails命令时似乎会生成许多文件。 Does it mean I have to upload the whole application directory every time I generate something? 这是否意味着每次生成内容时都必须上传整个应用程序目录? Kindly suggest with your experience, I'm very new to Rails. 请根据您的经验提出建议,我是Rails的新手。

If I were you I would go for Heroku first. 如果我是你,我会先去Heroku It's free and easy and along the way you will learn some about hosting Rails apps. 它是免费和容易的,并且在整个过程中您将学到有关托管Rails应用程序的一些知识。

Getting started with Heroku is a good place to go first https://devcenter.heroku.com/articles/quickstart Heroku入门是一个很好的入门指南https://devcenter.heroku.com/articles/quickstart

Heroku is indeed the easy way out, if you are looking into more "metal" deployment - use Capistrano 如果您正在寻找更多的“金属”部署,Heroku确实是简单的出路-使用Capistrano

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM