Ruby on Rails- HTML5 Video as background for landing page not loading on heroku

[Sorry I hit send by mistake in previous email]

Hi Krfg,

Welcome to Ruby on Rails. I am alost got started last week. I setup my development box on ArchLinux and two days back on OSX. Generally speaking, whenever I started with new language or framework, I prefer to check the official docs as it is mostly the accurate one (which is you are already doing). For example:

  1. For RoR 4: http://guides.rubyonrails.org/getting_started.html#installing-rails
  2. For RoR 5 Best: http://edgeguides.rubyonrails.org/getting_started.html#installing-rails
    I agree with you if sometimes you find official docs does not have enough details, usually because the writer already been doing this for a while and some small details becomes second habit for him/her. Please find my comments inline

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.

Thats awesome, doing it yourself is the best way to learn about something new. I respect c9 and all those other SaaS/PaaS services however configuring locally for learning is the best way. Sometimes you get frustrated when configuring something for the first time, I remember this happens to me every-time, for example two months ago when I was trying to install Gentoo from scratch.

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.

Atom is cool tool to start with and I guess you found your way in installing it. GUI Terminal is of course already installed (most of the time) .

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?

I personally would install each component separately for learning and also because most of time such fat installers install things that you will not be using at least when you are getting started.

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?

I checked this link, for ubuntu it is using a rails-install-ubuntu.sh which is just a shell script the automate running multiple commands. Again doing it yourself is better for learning, you can read the script and try to understand what each command does before executing that command manually.

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.

It depends on what do you want to achieve. If you are just installing things to learn about RoR, then definitely go with SQLite as it is easier to setup and satisfy the needs. If you are planning to build a production-ready application then the choice of database matters:

  1. SQLite: suitable for storing small things, could be configurations, or small apps where each user data is stored in separate SQLite file. Mostly you want to avoid SQLite for concurrence access for write due to locking will become a problem.
  2. Relational database like PostgreSQL or MySQL for bigger projects where you are looking for a trustworthy database than can serve even the scale of Facebook.
  3. NoSQL databases where you application model is less relational (note you will have to program the relation in the code) or the user perceived performance is really critical, although I could argue that you can still achieve comparable results with relational databases (of-course by using some more advanced techniques, or just extra hardware)
    In short, if you are just learning go with SQLite.
  • 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.

It is good to start with some version manager, because in many cases the default .deb package that you get from apt-get is not always the latest version due to 14.04 is considered a stable LTS version of ubuntu. I personally tried rvm & rbenv, I found it rbenv nicer, although it is just a matter of taste.

  • Bundler: is it installed with Ruby of will I need to install it separately?
  • Node.js: the RailsApps project says that “for development on Ubuntu Linux it is best to install the Node.js server-side JavaScript environment”.

I am not sure why do you need Node.js here. If you are planning to do ReactJS or AngularJS (Single-Page-App) then anyway the regular rails way may not be the best, you will need to tweak things. For example in Rails 5, rails-api code got merged with the official release so that you can drop the ‘view’ part of your rails app and rely on ReactJS (for example) to give you the view. However if you are getting started with Rails, I suggest to stick with the default setup without the complexity of those awesome front-end frameworks because they are really a different story that you will need to learn at some point.

  • Web server: what local web server would you suggest? WEBrick? Apache? The tutorial uses WEBrick.

For development purposes, WEBrick (Rails 4) or Puma (Rails 5) is good enough. For production deployment you will need another solution like Unicorn or uwsgi. The idea is you need a web server that works well with the Rack web server interface, which is a concept used by other languages as well like Python and Perl. Sometimes also you add in front of that an nginx server. I will not go though more details as I guess is more about to deploy production setup.

In short for development locally and getting started stick with the default rails server WEBrick (Rails 4) or Puma (Rails 5)

I fear this time you have replied to the wrong email.

Colin