Archive for the ‘Mac’ Category
10 things I like about Mac OS X 10.5 Leopard
Posted by Giovanni Intini | Filed under Apple, Mac
I’ve been playing with Leopard since day 1, and I’ve come to love some features (and loathe others, but that’s stuff for another article). Here’s the list, in no special order:
- Quickview – astonishingly useful, and fast. I don’t know how I’ve managed to go this far without it
- The new search feature in Safari – it mimicks what Firefox has been doing for a long time, but the yellow popuppy highlighting sold me to it.
- The new iChat – if Mac OS X had a wider audience, this would be the most used program in the world. I already figure hordes of teenagers sharing their desktops and slideshows. I also envision script kiddies taking control of your desktop
- Garbage collection in Objective C 2.0 – ‘nuff said.
- Rubygems shipped by default – the first thing I did after installing Leopard was: sudo gem install rails—include-dependencies
- The new finder – I wasn’t expecting big improvements here, but it is much snappier now, and the new search feature are blazing fast, and, believe it or not, I quite like coverflow view.
- The way folders behave in the dock – I put my dock on the bottom just to have springing files out of folders.
- Webclips – suddenly the dashboard has become a much more used feature.
- The new window chrome (and most of all the improved shadows on the foreground window) – modern looks for modern operating systems
- Spaces – now I feel like I’m using a Unix environment
The most unstable application on my Mac: Firefox
Posted by Giovanni Intini | Filed under Firefox, Mac
Is it just me or Firefox is the most unstable mainstream application available for the Macintosh platform? I have to quit and reload it at least twice a day because it hogs resources until the system isn’t responsive anymore. From now on I will resume using Safari for everything but JavaScript debugging.
Sudoless Rails Stack on OSX
Posted by Giovanni Intini | Filed under Apple, Mac, Productivity, Programming, Rails, Ruby, Ruby on Rails
More and more of my developer friends are switching to OSX as time goes by, and they keep asking me for directions on the best setup for rails development: how to install ruby, how to install the missing libraries, and so on.
My professional development life started on a PB Titanium running OSX 10.2, and continued through a PB Aluminium and a Macbook Pro. Each time I changed laptop I also reinstalled everything again, and each time I tried to come up with a better setup.
Now I’ve finally found a setup I’m comfortable with, and it has the following advantages:
- Sudoless: everything runs from my user directory
- Non-system-tampering: doesn’t touch files in the original osx installation
- Crash-proof-easy-reinstall: you can just delete everything and reinstall without fear of rendering your system unstable
- Fink based: uses everything it can use from the fink repositories
Now that I’ve sold you on my setup
it’s time to explain how to implement it.
Step one: XCode and Developer Tools
If you don’t have XCode already installed you can install it from the disks you got with your Mac or, better, download the newest version from Apple Developer Connection. Once you got it installed you can proceed to the next step.
Step two: Fink
Go to the Fink Download Page, and get the package that works best on your Mac (intel or powerpc). Follow the installation instructions and install the base fink system. After you’ve done that add these lines to your /.profile
# Dev Enviroment LDFLAGS=-L/sw/lib export LDFLAGS CPPFLAGS='-I/Users/your_username/unix/include -I/sw/include' export CPPFLAGS
_/Users/your_username/unix/include_ doesn’t exist yet, but we’ll create it when installing ruby.
Step three: Ruby from Sources
This is the first tricky part. Before OSX 10.4.6 the Ruby version shipped by Apple didn’t work with rails, so you were on your own. Now it works, but I prefer to have ruby in my home directory so I can mess with the sources and with the gem files and upgrade painlessly. So download the latest ruby sources and unpack them wherever you wish (I like /src).
Now you’re ready to go. First make sure you have readline and readline5-shlibs installed via fink so you can have a comfortable irb environment:
user$ fink install readline readline5-shlibs
After that it’s time for ruby:
user$ cd <sub>/src/ruby-1.8.6 user$ ./configure <del>-prefix=/Users/your_username/unix user$ make && make install
The whole magic (and it’s not a big magic btw) is in -prefix. Installing ruby will create the /Users/your_username/unix path. Now it’ time to add the unix dir to $PATH. Edit /profile once again and add these lines:
PATH=/Users/your_username/unix/bin:/usr/local/mysql/bin:/usr/local/sbin:$PATH export PATH
Step four: MySQL
Quite simple with the packages from mysql.com.
Step five: Last but not least, rubygems
Fetch the gem package from RubyForge and install it:
user$ cd src/unpacked-rubygems-directory user$ ruby setup.rb
Step six: This is the real last step
– Rails and a little hack
Now you’re free to install rails (and friends) using
user$ gem install rails --include-dependencies user$ gem install mysql-ruby user$ gem install capistrano --include-dependencies user$ gem install mongrel --include-dependencies
The small hack I was talking about is a symlink:
user$ sudo mv /usr/bin/ruby /usr/bin/ruby-apple user$ sudo ln -s /Users/your_username/unix/bin/ruby /usr/bin/ruby
This way applications that insist on using /usr/bin/ruby (TextMate’s RubyMate for example) will work fine.
Have fun with your self-made rails stack
Status update: the Mac Migration Assistant
Posted by Giovanni Intini | Filed under Apple, Mac
This is an update to Platform Switching.
I finally decided to run the Mac Migration Assistant, that worked so well in my switch from the Powerbook Titanium to the Powerbook Aluminium, and I soon entered a world of hurt, where the Macbook Pro was slow and crashy. I guess this is the price to pay if you like the unix part of OS X as much as the Mac part and keep compiling lots of stuff that doesn’t play nice with a new architecture
Tomorrow I will try to move manually the last three years of my life from IBM silicon to Intel one. Cross your fingers, I know I will cross mine.
Platform switching
Posted by Giovanni Intini | Filed under Apple, Mac, Random Stuff
As you probably know I recently bought a Macbook Pro to replace my trusty Powerbook G4, friend of many adventures in the lands of programming, and you will be happy to discover I’m still writing posts on the old friend.
The reason is simple, I still couldn’t find the time to move all of my data from the PB to the MBP, and I’m not sure I will be able to do it as soon as I would like to.
Nowaday people stock so many data on their hard drives, personal and work related, that migrating is a PITA. I could use the mac migration assistant, but I would like to reorganize everything (especially my fink layout). I also fear that many of my applications won’t work well on the new intel platform.
I’ll probably try the migration assistant and see if it allows partial migrations (maybe just music, that would be ok).
I’m open to any suggestion so feel free to comment, and cross your fingers for me