Having finished the Michael Hartl Rails tutorial, which uses Cloud9 as development environment, I would like to redo it configuring my machine (Ubuntu 14.04 LTS) as a local development environment.
I am determined to use Atom + Terminal, and I would really appreciate some help in determining what remains of all the necessary software to be installed in my computer, because the tutorial is not much helpful in this respect.
Before Rails I decided to study some Ruby.
In the official Ruby web page, Bitnami RubyStack is recommended as a complete development environment for Rails. Since I planned to study Ruby for Rails, I installed Bitnami RubyStack: would you recommend to keep it? Or, as I suspect, it would be better to install each component separately?
Not familiar with that, use it if it works, otherwise, you actually have most of what you need in a vanilla RVM install.
The official Rails web page used to provide a link for those interested in how to install the Ruby on Rails development environment: would that be a recommendable solution?
Combining my brief experience as a student and The RailsApps Project suggestions, I suppose I need the following applications:
• A database: the Rails Tutorial uses SQLite but Heroku recommends to use PostgreSQL also in development (Heroku uses PostgreSQL). I am undecided because on the one hand I completed the course without noticing any incompatibility between SQLite and PostgreSQL, and Michael Hartl says that SQLite is much easier than PostgreSQL. On the other hand I do not know the limits of compatibility between the two databases, so I would not like to find myself into trouble.
Yes, particularly if you want to use Heroku, but just in general, PostgreSQL is a marvelous database and will give you a lot of features that are not in MySQL (although those lines keep blurring). As free databases go, it's excellent. Heck, as databases go, it's excellent.
• RVM: will I need RVM for switching between Ruby versions? The RailsApps project recommends it. For the tutorial, it was more determinant the possibility to choose the Rails version than that of Ruby.
Installing RVM in the default manner will make sure that you have a complete development environment, ready to work in Ruby and Rails, right off the bat. If you are missing a library or build tool, it will fail, and in the failure message, give you the apt-get install ... command you need to run in order to have it succeed. Once an RVM install has succeeded, you have a workable Rails dev machine. Full stop.
• Bundler: is it installed with Ruby of will I need to install it separately?
Bundler is a dependency of Rails, so gem install rails will mean you have it.
• Web server: what local web server would you suggest? WEBrick? Apache? The tutorial uses WEBrick.
• Git: Git is already installed with Ubuntu. Will that be enough?
Try getting something with git clone https://github.com ... and see if it works, generally, if you can do that, you're set. Naturally you'll want to run your local app as a repository, and push it up to another server for safe-keeping.
Would you recommend anything else?
Finally, I suppose I will need to find documentation on how to configure all these applications: do you have any suggestion about that?
When you're getting started, spend time doing lots of little apps, starting with the scaffold generator so you get a feel for the recommended structure of an app. Learn how to deploy it somewhere. Do this over and over until it becomes muscle memory. You don't want to have to think about this part of the problem.
Even if you plan to use Heroku for the near term, learn how to deploy on Apache and Passenger (truly easy, once you do it twice). Then learn how to use Unicorn and nginx.
Learn enough of the framework until it starts to disappear for you, and you start thinking logically about your problem, and less about how you are going to shoe-horn it into the framework.
Good luck, and have fun!