This article is targeted towards non-programmers and very junior programmers. It will quickly walk through some of the reasons you might want to deploy a rails-based website or web application and how to take some of those steps, along with various resources for learning ruby, rails, and other information which will help you deploy a rails application, with some information applying to deployment or web deployment writ large.
Why would I learn Rails?
Rails is short for Ruby on Rails. Ruby is a programming language, while Rails is a framework. What’s the difference? Frameworks build on top of programming languages to do certain things more quickly or easily. In some cases frameworks can also introduce functionality which is not contained in the original language, but that is not the case for Rails. Ruby can do everything Rails can do and more, but it is extremely quick and easy to use Rails instead of Ruby when possible.
So, you would want to learn Rails to do Ruby things more easily and quickly, which begs the question: Why would you want to learn Ruby? There are 3 answers imho:
- Among server-side languages, Rails is particularly quick and easy to write. A competitor would include PHP, which is another server-side scripting language. PHP can do pretty much everything that Ruby or even Rails can do, and programs written in PHP generally perform slightly more quickly, but it is harder and takes longer to develop programs in PHP.
- Other people use Ruby or Rails. Learning Ruby and/or Rails can get you a job, a very high paying job these days in fact, it can allow you to understand how someone’s code works, and it can allow you to modify programs written in those ways.
Personally, I learned Rails because of reason #3. There is a large program that I needed to slightly tweek. It would take me a long time to write the program in PHP, but only a short time to tweek it if I understood Rails. The tradeoff difference was so large that I actually had time to learn Rails, tweek the program, and learn a bunch of other things I’m about to talk about, and still save time compared to if I just re-wrote the thing.
How do I Learn Rails?
I recommend Codecademy, Code School, maybe a little Treehouse, Google, and Youtube, as well as the official documentation and StackExchange for help.
Learning Rails vs Deploying a Rails App
- Learning a language means that you can properly tell a computer what to do, but just like non-programming languages such as English, the thing you are talking to has to understand the language as well. Computers don’t speak Ruby or Rails by default. You have to install Ruby and Rails, separately, like you might install a new desktop application.
- Deployment means making something available to an end user. When a website is deployed it means that someone can go to a URL and the website appears in their browser. When an app is deployed it means that people are able to use it.
- Installing Rails on a machine is an important step towards deployment, but deployment involves more than just installing Rails. As far as I know, for any language you need to install on a machine, there are more steps in deployment than only installing the language.
- Specific things you will need to learn about in addition to Rails in order to deploy a website or app:
- Finding affordable hosting that performs the way you want.
- Installing Rails on a host server. High-end hosting plans including specialty app deployment hosting will have facilitated installs. Mediocre hosts will make you install through remote Command Prompt and/or SSL actions. Lower-end plans, such as as shared server hosting through GoDaddy, simply won’t allow Rails installs or Command Line actions.
- Heroku is an example of an app deployment specialty hosting service. They even have a free account for minimal performance, but it won’t allow you to do much before you hit a performance wall. For high-end plans you should be ready to pay through the nose.
- If you need help deploying via Command Prompt and/or SSL, these resources are a good starting point:
- Getting the files you need on the server onto the server. Start with a CMS like WordPress then learn FTP with Filezilla or similar.
- Navigating a host back-end with CPanel or similar.
- Bonus: Buy a dedicated hosting server and learn how to run it yourself, without the need for a hosting company.
- Bonus: Learn PHP, MySQL, and JQuery too.Domain names and zone files.
Learning all of the stuff I mentioned, without the bonuses, will probably take you about a year. I would recommend learning in this progression:
- Month 0: Learn basic wordpress on a WordPress.com site.
- Month 3: Get a low-tier hosting account at GoDaddy. Learn about hosting, domain names, and the WordPress CMS. The WordPress CMS is more advanced when you have it on a hosting account compared to a WordPress.com site, but they have many similarities as well so you will feel comfortable.
- Month 8-10: Now you understand all of the basic languages you need to know, but you may not understand deployment very well or at all. Learn about deployment options and their costs. If you have the money, go for a facilitated deployment. If you don’t, get ready to spend some time learning to deploy the hard way. During this time you should also make one or two small programs or scripts on your local machine to make sure you have a real understanding of building a unified program and you aren’t just a WordPress hacker.
- Month 12-14: You should be able to deploy a working app. It may be a stupid, useless app, but it should be deployed and accessable.
- Month 14+: Start building stuff that’s more serious. Continue to educate yourself. Engage the community and get involved in open source projects. Build a portfolio. Maybe get a job or something.