Deploying a Rails Application to a Linode VPS

This seemed like a simple thing to do when I watched a 30 minute video on it. Unfortunately it has been more of a learning experience than I hoped. A minor difference in a file that Ubuntu includes by default meant that the documentation for Phusion Passenger 4 was not correct. I spent a lot of time trying to figure out how to get environmental variables working in my deployment, and my solution is now on Stackoverflow.

I also have spent quite a bit of time setting up PostgreSQL. It works now but it is strange that flipping the authentication method between peer and md5 does not seem to impact Rails or Postico’s ability to access the server even if I have it set on peer and access it from a different user over SSH. I only find it odd because before I briefly flipped it to MD5 initially, I could not connect to the databse server at all using localhost. I am going to just accept this for now since it’s not a problem.

Finally I am still in the process of getting the static assets to load and work properly. Heroku did much of this automatically and I now understand its appeal. If you want to start programming in Ruby on Rails I strongly recommend using and sticking with Heroku until you are ready and interested in learning some Linux server administration. It saves you a huge amount of pain.

Too Many Clouds

Recently 3 gigabytes of bonus space I had in my Dropbox expired and I found myself over my Dropbox storage limit. Dropbox decided that this was a good time to offer me a discount to try and convert me to a paying customer. Many people would probably convert at this point because they use Dropbox not just to share files but also as a backup service. However I already use Backblaze to backup my computer. Backblaze does about eighty percent of what I need. I can access files on my iOS device, get previous versions from the website, and have a full backup of my entire hard drive. I just use Dropbox to share files and for shared folders.

Unfortunately, in addition to Dropbox, I have multiple other cloud service providers. iCloud gives me 5GB to store my stuff. Google Drive has 15GB of storage that it offers. Amazon and Google both offer cloud music players that I do not use with storage options. I have a free account I think with 50GB that I have not yet even tried. Meanwhile Adobe Creative Cloud gives me some free storage and Flickr wants to be my photo backup solution along with Google Plus. The sheer volume of cloud storage solutions is enough to quickly become confusing.

In an ideal world I would like Apple to purchase Dropbox and then I would pay them for their suite of services. Mailbox is my favorite mail application by far. It is convenient to see when someone updates a file from the Dropbox app. Furthermore being able to generate share links directly from my desktop is super useful. However I am running up against storage limits in both Dropbox and iCloud. The idea of paying multiple cloud service providers is not at all appealing. So I am on the hunt for alternatives. Suggestions and ideas are welcome in the comments.

How to Choose a Database Server

Over the past year I have been mostly using MySQL on Amazon Web Services RDS for a database server when I needed one. It has worked well enough for me and I have learned a lot along the way. There is a great Mac OS X GUI for it called Sequel Pro that I recommend any SQL beginner check out. It makes importing CSVs into a database brain dead simple. Large companies like Facebook, AirBnb, and Wordpress use MySQL and it works great for them.

However the trend seems to be moving towards using PostgreSQL. The folks at Heroku prefer and advocate for it, and there appears to be more discussion and excitement about it on HackerNews. Furthermore if you do any work with geogaphic data, PostGIS is the gold standard. I think that this link does an interesting job of explaining problems with MySQL. I have finally found a promising GUI. The PostgreSQL developers seem to be focusing on performance and closing or even beating its gap with MySQL.

There are many places that use both. If you are learning Ruby on Rails the community seems to prefer PostgreSQL and you should choose that to start with. If you later find reason to use MySQL you can add that your stack as well.

Data and Government Panel from Harvard Kennedy School

Worth watching:

The Best Ruby on Rails Tutorial

I have been off and on playing with and learning Ruby on Rails and am finally in the process of using it. I consulted numerous resources in attempting to learn Rails including Code School and a book called Agile Web Development with Rails. However by far the best written material for beginners is Michael Hartl’s Rails Tutorial.

The Internet is awash in debates about what technologies you should learn when you program. I think Ruby on Rails is a good choice because the documentation and community sit above what I have seen elsewhere. Ruby on Rails is used by companies like AirBnb and Basecamp so it has been battle tested. This does not make other options invalid because ultimately all that matters is that you are able to accomplish what you want. Tools are just different roads to the same destination.

Follow posts: RSS Feed
This work by Matt Zagaja is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.