Inspecting the Apache error logs informed me that a segmentation fault had occurred and that I may have encountered a bug in the Ruby interpreter. This was accompanied by a 5,000 line stack trace.
Running Apache on my local machine helps me speed up my web development work. It means that I can use root-relative urls, server-side programming languages (such as PHP) and interface with a database — all without having to upload anything via FTP.
The only problem comes when you are working on multiple projects at the same time. If you create different directories for different projects within your web root (which defaults to /var/www/html), then the root-relative urls will break, as will any server-side includes you are using.
This is where virtual hosts come in. They allow you to create a separate domain for each of your projects, such as http://project1/ and http://project2/.
I’ve spent all day trying to get Devise and nested attributes to play nicely together. This and giving the user the ability to update parts of their profile without providing a password proved kind of tricky. Here’s how I got things working.
Last year I wrote about installing rbenv on Linux Mint 16. Back then the installation process as described on the project’s Github page didn’t work for me and, after much frustration, I ended up installing an older version of rbenv from the repositories.
Recently, I had to reinstall my operating system (upgrading to Mint 17.1) and decided to give the rbenv installation process another try. I’m happy to say that it worked entirely as expected and within a matter of minutes I had two Ruby versions installed on my system and could switch between them at will.
Rails is database agnostic, meaning that it can talk to different databases with little more than a couple of configuration changes. Here’s how to install PostgreSQL on Linux Mint 16 and configure it for use with Rails.
Ajax stands for Asynchronous JavaScript and XML and is used for allowing the client side of an application to communicate with the server side of an application.
This might be necessary in order to update the contents of a drop down menu, or to check the availability of a user name, all without reloading the whole page.
Using Ajax isn’t very hard and in this tutorial I’ll show you how to get up and running.