Eager to step the local web development up a level with regular use of Command-line Version Control Repository, Dependency Management and Deployment automation.
When we are using an Apple or PC operating system like OSX or windows, we are using a graphic interface (also known as a graphical user interface or GUI) to interact with the systems that are communicating with the machine, which at it’s root, only understands sets of binary information (X/O, 1/0, ON/OFF). When we bypass the GUI we have to speak a language that the software communicating with the machine understands, and the language looks a bit ah… shorthand.
This computer is, shit – 5 years old, but running great and of course we don’t want to buy computers any more often than necessary (there is slave labor, land-stealing and environmentally wicked mining involved) so we’ll make these work as long as possible, right?
At any rate, WordPress is an awesome, extremely popular blogging platform that can even be used as a Content Management System and one of the ways of improving the speed and stability of it’s deployment is outlined in a blog from Roots.io.
Most of the challenges so far have been in configuring the Operating System on this box, OSX 10.6.8 Snow Leopard so that it can run versions of the recommended software which includes, Git, Composer, Ruby and Capistrano.
Git was fairly easy: download git-1.7.6.1-x86_64-snow-leopard.dmg (google it), then open terminal and type: git –version (log out and back into terminal may be necessary).
To install composer, in Terminal type: curl -sS https://getcomposer.org/installer | php
Helpful tutorial here. Confirm installation by typing either php composer.phar or php composer, depending on whether or not you installed systemwide using the sudo command (which grants you Administrative rights on the computer), or just for specific user (Users/yourname/your stuff).
Getting Ruby working has been a bit of a process. Ruby is a programming language developed Yukihiro “Matz” Matsumoto in Japan in the mid-1990s that comes with the Mac OS, but the version with Snow Leopard is 1.8 and Capistrano depends on 1.9.
Upgrading to 1.9 required downloading this package, which is basically just the Ruby portion of the xCode package that you can get from Apple, but which is a huge file and maybe costs money and most of which is only useful for developing software for use with Apple products.
So after downloading the above package and installing it, you logout of terminal and back in and – oh wait – first you have to install Ruby Version Manager, which is another little bit of software that enables you to Manage which version of Ruby you are using.
So you can follow this little tutorial on About.com (a sometimes useful site which annoyingly displays too little information per page so they feed out tons of adds).
At first when running the update, I was getting an error that has to do with the ports, and something called macports (all of these installs and updates are happening between the users computer and the computer hosting the software, which apparently happens via ports). I need to learn more about ports and I think I’m about to…
Currently in the process of 3rd or 4th attempt at running: rvm install ruby-1.9.2-p320, which is a time consuming process. It looks like it may be working. The most recent hurdle had been that I was getting the error in Terminal; Sudo: Port: command not found, which I solved via this tutorial by adding the line “export PATH=$PATH:/opt/local/bin” to my .bash_profile, for which I used the command line text-editor Vim (Vi, Eclipse and Nano are other options, Nano being the simpler choice). There’s a dope interactive Vim tutorial, which was useful getting started with Vim. Man thing was realizing the Two modes, insert and command.
What is happening in the terminal now is:
ruby-1.9.2-p320 – #applying patch /Users/mikekilmer/.rvm/patches/ruby/GH-488.patch.
ruby-1.9.2-p320 – #configuring……………………………………
ruby-1.9.2-p320 – #post-configuration.
ruby-1.9.2-p320 – #compiling……………………………………………|
ruby-1.9.2-p320 – #installing………………………………………….
Looks like it worked. Now to see if Capistrano is happy…
Nope. System is still using Ruby 1.8. Need to logout and back in…
Okay, “which ruby” info (Run the command which ruby to make sure it’s pointing to somewhere in ~/.rvm/, and not to /usr/bin/ruby) looks good.
Capistrano is using the wrong version of Ruby – still looking in /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/
Reinstalling Capistrano: gem install rvm-capistrano
Capify worked!