RSS Feed Subscribe to RSS

Howto: Install iLife 06 on Leopard

It came as a bit of a surprise to me that after doing a clean install of Leopard that there was no more iPhoto. I suppose if I had looked around at all, I would have known, but I obviously hadn’t. Not to worry, after digging out the disks that came with my Macbook Pro, I decided to put together this install guide for others that ended up in my boat.

1. Pop in the Tiger Install Disk 1.

2. Double-click “Install Bundled Software Only”

Install Bundled Software

3. Agree to everything, and then click the Customize button when you get to the Installation Type screen.

Customize

4. Select the parts of iLife you want to install. I wanted iPhoto, iMovie, iDVD, and GarageBand.

Software Selection

5. Put in Disk 2.

Disk 2

6. Since it’s snowing, go grab a cup of hot chocolate while you wait for the install to finish.

7. Now run three rounds of Software Update, and you’re ready to go.

Tags: , , ,

Howto: Outlook Plays Nice With gCal Thanks to gSyncit

Being a Mac user at home is nice, but makes calendar compatibility with my work computer a little challenging. For awhile, I used my Blackberry and synced it to both computers, but it wasn’t made for this purpose and after a few syncs, it inevitably started crashing the Desktop Manager on my Windows machine at work while trying to sync calendars.

I got tired of completely clearing out the calendar to get it to sync again (I did it twice and couldn’t take it anymore). I first turned to Funambol and Schedule World with instructions from this article over at internetducttape.com.

I should have read the comments a little closer before trying it out, because this Funambol doesn’t work with Exception Dates. Exception dates occur when you have a recurring appointment and then change one occurence without changing the series. With my work, this happens all the time because I’ll have weekly recurring appointments with clients that often get bumped by an hour or a day. Whenever these exceptions occured, the sync process started adding appointments to my Outlook calendar even though I had said the sync should only go one direction. It also had an annoying habit of popping up the Outlook reminder dialog several times during the sync.

One of my colleagues pointed me in the direction of SyncMyCal. They make a $25 dollar product that he uses and said it handles exception dates very well. They also make a free version, but it will only sync a 7 day window which didn’t meet my needs. I’m willing to shell out $25 to save the aggravation, but a last ditch effort on Google revealed another possibility (I swear I performed the same search two days earlier).

gSyncit comes in here. Dave claims to offer the same functionality with a free version and a full that costs $10. The only limitation on the free version is no auto-sync and a popup when you load Outlook or sync. So far it works beautifully. I installed it this morning, and the first, second, and third sync went off without a hitch (or Outlook reminders popping all over my screen, or creating ghost appointments on my real calendar).

I figure I’ll give it a few days to see how it handles more new appointments and a few more exception dates, but I’m thinking that I’ll soon be paying Dave his $10 for a product well executed.

What I can now do is subscribe to my gCal work calendar with iCal on my Mac at home, and now I have a single source for everything happening in my life. And since iCal obviously plays nice with iTunes and iPods, my iPod is now the portable source of truth for my busy life. I guess I should here add my thanks to Google for supporting open standards and making my cross-platform life a little simpler as well. And thanks to Apple for doing that too.

Tags: , ,

HowTo: Lift Your Browsing Restrictions

SSH + Socks + (Firefox + FoxyProxy) = Browsing Freedom

Although tunnel through them would be a more accurate description. I hesitate whether to post this or not, but the little wanna-be-hacker inside me is making me do it. If you find your browsing is constrained by filters, proxies, or any other kind of unwanted restraints and you’ve got a spare offsite SSH Server, there is a solution to all your problems.

The information is not new at all, nor is it complicated, it’s simply combining technologies that most geeks already know about to achieve a result that makes me grin. Take this information for what it’s worth.

SSH is the popular Secure SHell program. Socks is a kind of internet proxy that uses an SSH connection as a proxy. FoxyProxy is a firefox extension that enables proxies on a per site basis.

That’s all I’m going to say.

Howto: Put WSDL on Rails [Part 2]

In the first article about WSDL on Rails we created our own web service that accepted a string, modified it, and returned a new string. Now we’ll take a look at creating another application that can consume or subscribe to our web service. This is almost too easy. I figure the best way to demonstrate the simplicity is to keep this article as short as possible.

1. Fire up the old WebServiceProvider application that we created in Part 1

From the application root directory type ./script/server

2. Create a new WebServiceConsumer application

In a new terminal window type rails WebServiceConsumer

3. Create a controller for your service consumer

cd WebServiceConsumer
./script/generate controller consumer

4. Subscribe to your WebServiceProvider using its WSDL

Open up your consumer_controller.rb in app/controllers. It will be empty and it needs to look like this:

class ConsumerController < ApplicationController

require 'soap/wsdlDriver'

def subscribe
if params[:terms] == nil
@service_output = “”
else
url = “http://localhost:3000/subscription/service.wsdl”
factory = SOAP::WSDLDriverFactory.new(url)
service = factory.create_rpc_driver
@service_output = service.Subscribe(params[:terms])
end
end
end

This is where the magic happens. The line require 'soap/wsdlDriver' brings in the needed Ruby library. The subscribe method is simply an action like any other in your application. We’re going to create a form that accepts some user input and then we’ll pass them on to our WebServiceProvider. The url, factory, and service lines could all be done in one line, but I’ve broken them out here to demonstrate.

If the box is left blank, we don’t do anything. If the user inputs some data, then we have a little bit of work to do. We create a new service object based on the WebServiceProvider’s description of itself as defined by its WSDL. Then our local service object acts as a proxy and any method calls we make on the local object are simply passed on to it the actual WebServiceProvider.

We can then define our @service_output as a variable we can then call in our view. Now for testing.

5. Create two views for testing

In app/views/consumer create an index.rhtml file as follows:

<html>
<head>
<title>WebServiceConsumer</title>
</head>
<body>
<h1>WebServiceConsumer</h1>
<p>
Enter your terms below. They will be passed on to our web service and you'll be able to see the response.
</p>

<%= start_form_tag :action=> 'subscribe' %>
<p><label>Terms</label><br/>
<%= text_field 'terms', '' %></p>
<%= submit_tag "Subscribe" %>
<%= end_form_tag %>
</body>
</html>

Also in app/views/consumer create subscribe.rhtml as follows:

<html>
<head>
<title>WebServiceConsumer</title>
</head>
<body>
<h1>WebServiceConsumer</h1>
<p>
The web service returned: <br /><br />
<%= @service_output %>
</p>
</body>
</html>

6. Now fire up your WebServiceConsumer app on a different port

Depending on your particular setup this may be different. I use lighttpd, so you’ll need to open app/config/lighttpd.conf and change the server.port = 3000 to say something like server.port = 3100. Then you can run ./script/server to fire up your app on port 3100.

Now point your browser to http://localhost:3100/consumer

Enter your terms into the text box, click Subscribe, and pat yourself on the back. You’ve just subscribed to a web service.

Howto: Make a Rails Environment in Ubuntu

In class today, there was a demonstration on how to get Apache/Axis/Tomcat running to demo some SOAP web services written in Java. As I plug Rails again, I was again amazed at the simplicity with which Rails handles all this. I began to think that there might be some interest in Rails web services for those other members in my class, so in an attempt to help them out, I decided to provide instructions on setting up a Ruby on Rails environment.

Now I’m running mine inside a virtual machine with VMWare Server on my Windows Server 2003 box. I won’t get into all the reasons here, but these intructions would work for any VM or for a real install as a host operating system. There are only one or two differences and I’ll point them out as we go along.

1. Start with Ubuntu Server distro. I’m using Ubuntu 6.10 Edgy Eft.
Find the mirror you want, then click the Other Installation Options and find the server. If you must have a graphical environment, you can get the desktop version, but know that youll have to install apache2 and mysql on your own. If you choose the server option, you’ll be asked what kind of install you want to do. Pick the LAMP option. Do all appropriate setup, naming, networks, etc., and I’ll meet you again at the shell after you login.

2. Edit your sources list.

sudo vi /etc/apt/sources.list

Once you get inside, you’ll want to uncomment 4 lines, which will enable the universe repository along with the security universe repository. I typically comment out the cdrom: repository as well. For those unfamiliar with vi, the letter x will delete a single character. Pushing the letter i will put you in insert mode to comment our the cdrom line. Pushing Esc will get you out of edit mode. Pushing :, then wq, and finally Enter will put you back at shell with an edited sources list.

3. Get SSH running
For me this is essential. The interface through VMWare isn’t the speediest thing, and when you’re running over a Remote Desktop connection, things start to feel like molasses. A few things will fix us right up, because through SSH everything runs beautifully.

sudo apt-get install openssh-server

This will install and start the SSH server. Now you may need to configure port-forwarding through port 22 in order to connect to your Rails/Ubuntu server. In addition if you need to forward traffic to your VM, then at your router point port 22 at the host OS and follow my other instructions on port forwarding to a virtual machine.

If you’re happy where you’re at, then you can skip step 3. If you want to do it, then SSH to your new server and continue to Step 4.

4. Update all your packages

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install saidar

Saidar is optional, it’s a neat little monitoring utility that runs at the command line, but tells you about your CPU usage, memory usage, disk usage, and everything else you’d expect from your Task Manager or Activity Monitor. Now it’s time to get down to business.

5. Install Ruby

sudo apt-get install ruby ruby1.8 ruby1.8-dev ri rdoc irb libmysql-ruby libmysqlclient15-dev

If you didn’t choose the LAMP option earlier (or picked a desktop distro) you’ll want to add Apache2 and mysql-server to this list:

sudo apt-get install ruby ruby1.8 ruby1.8-dev ri rdoc irb libmysql-ruby libmysqlclient15-dev apache2 mysql-server

6. Install RubyGems
RubyGems is like the apt-get utility for strictly Ruby packages. This series of commands at the shell will download, install, and clean up the RubyGems package.

wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz
tar -xvzf rubygems-0.9.0.tgz
cd rubygems-0.9.0
sudo ruby setup.rb
cd ~
rm -rf rubygems-0.9.0
rm rubygems-0.9.0.tgz

7. Install Rails

sudo gem install rails --include-dependencies

This will show some errors while installing documentation, but never fear. All is well. We both know that you weren’t planning on reading the documentation anyway.

8. Install Lighttpd with FastCGI

sudo apt-get install lighttpd libfcgi-dev libfcgi-ruby1.8 build-essential

This will show an error that it tried to bind to port 80 and failed. That’s ok, because we have apache running there. What we’ve done is simply install it so that our Rails apps will use Lighttpd rather than the built-in WEBRick.

If like me you really just don’t like errors you can edit the lighttpd.conf file so that it binds to a different port. This is not necessary at this point, but if you plan on running Rails apps in production you’ll have to play with the lighttpd config file at some point anyway.

vi /etc/lighttpd/lighttpd.conf

Find and uncomment the line that says

# server.port = 81

Now we’ll run Stop just to make sure and then Start it up again.

sudo /etc/init.d/lighttpd stop
sudo /etc/init.d/lighttpd start

Now install the fcgi RubyGem:

sudo gem install fcgi

9. Make sure that your FastCGI bindings and MySQL bindings are working properly.
Now to make sure that our fastcgi and mysql libraries are working properly, we’ll fire up IRB. IRB stands for Interactive Ruby. It basically gives us a functional, yet empty ruby environment to play around.

irb
irb(main):001:0> require 'mysql'
=> true
irb(main):002:0> require 'fcgi'
=> true

Now, unless you want to do all your mysql configuration from the command line, you’ll need to be able to connect as root to your mysql database from a remote host. See my instructions on how to do that. You may need to set up port forwarding through port 3306 in order to get this to work.