Category Archives: Mac

New Macbook Pro Install

Upgraded to new MCB 13″ so now need to go through everything again. Started wtih ruby (done, alreay there) and then rails with: sudo gem install rails –http-proxy http://proxy.abdn.ac.uk:8080 as I’m doing this at work. I also noticed a ton of gems already present. I’m not sure that I’ll need to use Macports this time, but we’ll see.

Ok, just found out that I do need Macports so that I can easily use capybara. Ok, here we go. Finally, several hours later I now have gem for mysql added. Needed to install 64-bit MySQL after removing 32-bit one, and then adding gem source of gems.rubyforge.org in order to retrieve the gem.

ImageMagick via Macports install went smoothly and works now. One more part sorted.

Instead of just using Smultron, I’m going to also put in Komodo Edit. I tried Komodo the other week and found it real useful for working with Ruby, so shall have students give it a go too as it’s cross-platform.

I think that is everything for now. Needless to say, there will be a ton of Java related things to put in place, but this will do for most things and once I tidy up environment paths, then I’m good to go.

Macbook rebuild part six

Ok, so Java is less important than setting up the macbook to use my mobile as a modem using Bluetooth. I don’t use this feature often, but now and again it is handy when you just get onto the train, and realise that the file you wanted to work on is still on the file server at work. Then it is a life-saver. That, and of course when on holiday and there’s no internet provided.

The best guide to all of this is a series of blog entries at the macsis blog. Start with the Getting Connected – Bluetooth entry. Then if all goes well, you should see the option for your operator appear in the screen about using the internet. If not, then use Ross Barkman’s GPRS Info Page to tell you the finer details about what the APN, username and password are for your network operator. Or, you can phone up your operator and ask for them. If your mobile connects to the internet anyways, then you will have all of this available somewhere on your mobile already. However, if it’s like mine, then the password is just stars. Don’t worry, Ross’ page will tell you what they are.

Macbook rebuild part five

The Rails stuff is all in now. I’ve also added in some basic ‘stuff’ which I’ve found works well too on a Mac for doing the odds and ends of development. Looking across the menu bar below I see these, which are all used at one point or another. These all supplement the built-in apps you get with Leopard, which also get used now and then such as Grab, Console, TextEdit, and some of the other utility tools that are there.

Gimp for editing photos and images for use in presentations. I almost only ever use this in connection with the built in Grab application for getting screenshots, then copy it to Gimp, crop what I want, and then save it as a png file for inserting into powerpoint. If you don’t save it as a file, and then insert it into powerpoint, you’ll not have your image if you later open it in Windows. I used to use the Wilbur-loves-apple build, but that project forked, and you can now use a plain dmg file for Gimp.

Smultron is a handy free text editor, which works fine for those times when TextEdit is not enough. You can drag files into the listing column on the left, and they will open in the editor on the right. This works fine for a quick edit of a web page, or some simple list of text.

FileZilla is a useful free ftp client that is available for many a platform, and which works nicely out of the box. The server works well too, when I’ve had need to use it on Windows.

Remote Desktop is useful for when you absolutely need to connect to your Windows machine from your Mac. 

Ok, that wraps that up for now. Next time I should really put something up here about doing Java and setting up the paths for that.

Macbook rebuild part four

ImageMagick now works fine thanks to the instructions noted in part three. Hurrah. I just added all of the export statements to my .bash_profile file, and all was well. If you don’t have a .bash_profile file, then create one, but be sure to have it start with the ‘.’ or it won’t work. That’s a relief.

MySQL was a non-event. It’s now so trivial. This is a big relief. It’s even easier than described by Paul Sturgess in his blog post on doing Rails and MySQL on a Mac. Now all you need to do is grab the dmg file from MySQL for MySQL 5.1.x and all works as it should. Nothing hung, or didn’t work. What a joy. Then open up the .bash_profile file, and the path to the bin direcrtory for mysql and you’re done. 

So now my complete .bash_profile file looks like this:

export PATH=”$PATH:/usr/local/mysql/bin”

export MAGICK_HOME=”/Applications/ImageMagick-6.4.8″

export PATH=”$PATH:$MAGICK_HOME/bin”

export DYLD_LIBRARY_PATH=”$MAGICK_HOME/lib”

So that covers the main things for Rails development. Onto Java in the next one.

Macbook rebuild part three

Still not got to MySQL, but am working on ImageMagick via Macports. It’s taking forever… While it’s been busy downloading this and that, I’ve been able to reactivate php, which is already installed in Leopard, but just commented out the of the httpd.conf file. I also put phpmyadmin under my ‘sites’ directory so that when mysql is sorted I can easily manage my tables and databases. Oh yes, you only need to go to ‘System preferences->sharing’ and tick the ‘web server’ box to turn on Apache. If you untick it, then apache stops, which you need to do after you edit the httpd.conf file, and then tick it again to turn it on again.

Macbook rebuild part two

Updating rails should have been easy as ruby and rails are included in Leopard. I should have only had to do

sudo gem update --include-dependencies

And then it would all be right as rain. However, as Rails has recently made some big changes, and changed its gem repository from rubyforge to http://gems.rubyonrails.org, I needed to fix a few other issues too, and add in some more gems to make it all happy. Thanks to the details at the google group for rubyonrails, and the note to add in the gem update for rack (yes, rack, not rake), all is happy and I’m now at rails 2.3.0. Ok, still need to do mysql.

Macbook rebuild part one

I’m going to make sure that I keep track of what goes into the macbook. When it came back yesterday it was back in its pristine Tiger mode. First step therefore was to put Leopard in and to do the updates to bring it back up to scratch. This meant setting up the network stuff for at work and at home too. Surprising what you forget really, even though it’s stuff you use everyday.

The second step was to put in Macports, which in turn required Xcode 3.1 instead of the 3.0 version that it naturally upgraded to by the update process. That went smooth enough, altough getting there took a while, because of the number of updates I needed to do.

Macports is there to enable easy setup of Rails and MySQL and a few other odds and ends. At least I think it was the Macports version of MySQL that I had. I seem to remember trying a few different ones, and finally setttled on the Macport one. This is tomorrow’s project. Wish me luck.