<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>benrobb &#187; How To</title>
	<atom:link href="http://benrobb.com/category/tech/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://benrobb.com</link>
	<description></description>
	<lastBuildDate>Wed, 14 Mar 2012 03:38:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress Integration with Facebook &amp; Twitter</title>
		<link>http://benrobb.com/2012/03/10/wordpress-integration-with-facebook-twitter/</link>
		<comments>http://benrobb.com/2012/03/10/wordpress-integration-with-facebook-twitter/#comments</comments>
		<pubDate>Sat, 10 Mar 2012 23:18:59 +0000</pubDate>
		<dc:creator>benrobb</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://benrobb.com/?p=371</guid>
		<description><![CDATA[Today, I setup a couple of WordPress plugins for automatically posting blog links to Facebook and Twitter. WP to Twitter The first is WP to Twitter.  Instructions are pretty straightforward for creating a Twitter app for integration.  Small hitch was that after creating my Access Token I had to reload the page in order for the access tokens to actually show up.  Now whenever I create a new post, it will post a Tweet using [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://benrobb.com/wp-content/uploads/2012/03/wordpress-facebook-twitter.jpg?9d7bd4"><img class="aligncenter size-full wp-image-372" title="wordpress-facebook-twitter" src="http://benrobb.com/wp-content/uploads/2012/03/wordpress-facebook-twitter.jpg?9d7bd4" alt="" width="300" height="282" /></a></p>
<p>Today, I setup a couple of WordPress plugins for automatically posting blog links to Facebook and Twitter.</p>
<h3>WP to Twitter</h3>
<p>The first is <a title="WP to Twitter Plugin" href="http://wordpress.org/extend/plugins/wp-to-twitter/">WP to Twitter</a>.  Instructions are pretty straightforward for creating a Twitter app for integration.  Small hitch was that after creating my Access Token I had to reload the page in order for the access tokens to actually show up.  Now whenever I create a new post, it will post a Tweet using my Twitter account with a link back to my post.  Bit.ly integration is supported, WP tags are converted to Twitter hashtags and there are a few other options as well.</p>
<h3>Add Link to Facebook</h3>
<p>The second plugin is <a title="Add Link to Facebook Plugin" href="http://wordpress.org/extend/plugins/add-link-to-facebook/">Add Link to Facebook</a>.  The name of this one is somewhat of a misnomer because it does way more than just add links.  It appears to integrate blog comments and Facebook comments as well as a host of other features.  For now, I&#8217;m only planning on using it to post links, but I will probably explore some of the other features later on.</p>
<p>Setup for this one was a bit more complicated.  The plugin page has a setup guide as well as an FAQ.  When attempting to authorize the application within the WP setup, I kept getting a redirect_uri error on setup end eventually ended up deleting the plugin, deleting the Facebook app I had created and starting from scratch a second time.  The second time through creating the Facebook app I caught a message that said the app had been created, but could take &#8220;several minutes&#8221; to replicate across their servers.</p>
<p>I decided to wait for awhile.  After 15 minutes or so, I was still receiving the error, so I went to play Legend of Zelda for awhile, and tried again an hour or so later.  This time, it went to Facebook and authorized just fine, and now I&#8217;m just playing with different settings.</p>
]]></content:encoded>
			<wfw:commentRss>http://benrobb.com/2012/03/10/wordpress-integration-with-facebook-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto: Install iLife 06 on Leopard</title>
		<link>http://benrobb.com/2007/12/01/howto-install-ilife-06-on-leopard/</link>
		<comments>http://benrobb.com/2007/12/01/howto-install-ilife-06-on-leopard/#comments</comments>
		<pubDate>Sat, 01 Dec 2007 17:41:20 +0000</pubDate>
		<dc:creator>benrobb</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[ilife]]></category>
		<category><![CDATA[install]]></category>

		<guid isPermaLink="false">http://benrobb.com/2007/12/01/howto-install-ilife-06-on-leopard/</guid>
		<description><![CDATA[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&#8217;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 [...]]]></description>
			<content:encoded><![CDATA[<p>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&#8217;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.</p>
<p>1. Pop in the Tiger Install Disk 1.</p>
<p>2. Double-click &#8220;Install Bundled Software Only&#8221;</p>
<p><img src="http://benrobb.com/wp-content/uploads/2007/12/picture-1.png?9d7bd4" alt="Install Bundled Software" height="468" width="448" /></p>
<p>3. Agree to everything, and then  click the Customize button when you get to the Installation Type screen.</p>
<p><img src="http://benrobb.com/wp-content/uploads/2007/12/picture-2.png?9d7bd4" alt="Customize" height="319" width="450" /></p>
<p>4. Select the parts of iLife you want to install.  I wanted iPhoto, iMovie, iDVD, and GarageBand.</p>
<p><img src="http://benrobb.com/wp-content/uploads/2007/12/picture-3.png?9d7bd4" alt="Software Selection" height="321" width="452" /></p>
<p>5. Put in Disk 2.</p>
<p><img src="http://benrobb.com/wp-content/uploads/2007/12/picture-4.png?9d7bd4" alt="Disk 2" height="321" width="449" /></p>
<p>6. Since it&#8217;s snowing, go grab a cup of hot chocolate while you wait for the install to finish.</p>
<p>7. Now run three rounds of Software Update, and you&#8217;re ready to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://benrobb.com/2007/12/01/howto-install-ilife-06-on-leopard/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Howto: Outlook Plays Nice With gCal Thanks to gSyncit</title>
		<link>http://benrobb.com/2007/11/16/howto-outlook-plays-nice-with-gcal-thanks-to-gsyncit/</link>
		<comments>http://benrobb.com/2007/11/16/howto-outlook-plays-nice-with-gcal-thanks-to-gsyncit/#comments</comments>
		<pubDate>Sat, 17 Nov 2007 04:38:38 +0000</pubDate>
		<dc:creator>benrobb</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[sync]]></category>

		<guid isPermaLink="false">http://benrobb.com/2007/11/16/howto-outlook-plays-nice-with-gcal-thanks-to-gsyncit/</guid>
		<description><![CDATA[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&#8217;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 [...]]]></description>
			<content:encoded><![CDATA[<p>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&#8217;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.</p>
<p>I got tired of completely clearing out the calendar to get it to sync again (I did it twice and couldn&#8217;t take it anymore).  I first turned to <a href="http://www.funambol.com/" title="Funambol">Funambol</a> and <a href="http://sheduleworld.com" title="Schedule World">Schedule World</a> with instructions from <a href="http://internetducttape.com/2006/08/11/the-holy-grail-of-synchronization-how-to-synchronize-microsoft-outlook-multiple-locations-google-calendar-gmail-ipod-and-mobile-phone-with-funambol-scheduleworld/" title="The Holy Grail of Synchronization">this article</a> over at internetducttape.com.</p>
<p>I should have read the comments a little closer before trying it out, because this Funambol doesn&#8217;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&#8217;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.</p>
<p>One of <a href="http://virtute.org/" title="Zach Cochran">my colleagues</a> pointed me in the direction of <a href="http://www.syncmycal.com/" title="Syncmycal">SyncMyCal</a>.  They make a $25 dollar product that he uses and said it handles exception dates very well.  They also make a <a href="http://www.syncmycal.com/compare_versions.htm" title="compare version">free version</a>, but it will only sync a 7 day window which didn&#8217;t meet my needs.  I&#8217;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).</p>
<p><a href="http://www.daveswebsite.com/software/gsync/" title="gsyncit">gSyncit</a> 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).</p>
<p>I figure I&#8217;ll give it a few days to see how it handles more new appointments and a few more exception dates, but I&#8217;m thinking that I&#8217;ll soon be paying Dave his $10 for a product well executed.</p>
<p>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.</p>
]]></content:encoded>
			<wfw:commentRss>http://benrobb.com/2007/11/16/howto-outlook-plays-nice-with-gcal-thanks-to-gsyncit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HowTo: Lift Your Browsing Restrictions</title>
		<link>http://benrobb.com/2007/03/20/howto-lift-your-browsing-restrictions/</link>
		<comments>http://benrobb.com/2007/03/20/howto-lift-your-browsing-restrictions/#comments</comments>
		<pubDate>Tue, 20 Mar 2007 15:19:55 +0000</pubDate>
		<dc:creator>benrobb</dc:creator>
				<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://benrobb.com/2007/03/20/howto-lift-your-browsing-restrictions/</guid>
		<description><![CDATA[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&#8217;ve got a spare offsite SSH Server, there is a solution to all your problems. The information is [...]]]></description>
			<content:encoded><![CDATA[<p>SSH + Socks + (Firefox + FoxyProxy) = Browsing Freedom</p>
<p>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&#8217;ve got a spare offsite SSH Server, there is <a href="http://lifehacker.com/software/ssh/geek-to-live--encrypt-your-web-browsing-session-with-an-ssh-socks-proxy-237227.php" title="Geek To Live">a solution to all your problems</a>.</p>
<p>The information is not new at all, nor is it complicated, it&#8217;s simply combining technologies that most geeks already know about to achieve a result that makes me grin.  Take this information for what it&#8217;s worth.</p>
<p>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.</p>
<p>That&#8217;s all I&#8217;m going to say.</p>
]]></content:encoded>
			<wfw:commentRss>http://benrobb.com/2007/03/20/howto-lift-your-browsing-restrictions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto: Put WSDL on Rails [Part 2]</title>
		<link>http://benrobb.com/2007/02/01/howto-put-wsdl-on-rails-part-2/</link>
		<comments>http://benrobb.com/2007/02/01/howto-put-wsdl-on-rails-part-2/#comments</comments>
		<pubDate>Fri, 02 Feb 2007 06:22:12 +0000</pubDate>
		<dc:creator>benrobb</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://benrobb.com/2007/02/01/howto-put-wsdl-on-rails-part-2/</guid>
		<description><![CDATA[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&#8217;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 [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://benrobb.com/2007/01/30/howto-put-wsdl-on-rails/" title="howto put WSDL on rails">the first article</a> about WSDL on Rails we created our own web service that accepted a string, modified it, and returned a new string.  Now we&#8217;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.</p>
<p><strong>1. Fire up the old WebServiceProvider application that we created in Part 1</strong></p>
<p>From the application root directory type <code>./script/server</code></p>
<p><strong>2.  Create a new WebServiceConsumer application</strong></p>
<p>In a new terminal window type <code>rails WebServiceConsumer</code></p>
<p><strong>3. Create a controller for your service consumer</strong></p>
<p><code>cd WebServiceConsumer<br />
./script/generate controller consumer</code></p>
<p><strong>4. Subscribe to your WebServiceProvider using its WSDL</strong></p>
<p>Open up your consumer_controller.rb in app/controllers.  It will be empty and it needs to look like this:</p>
<p><code>class ConsumerController &lt; ApplicationController</code></p>
<p><code>  require 'soap/wsdlDriver'</code></p>
<p><code>  def subscribe<br />
if params[:terms] == nil<br />
@service_output = ""<br />
else<br />
url = "http://localhost:3000/subscription/service.wsdl"<br />
factory = SOAP::WSDLDriverFactory.new(url)<br />
service = factory.create_rpc_driver<br />
@service_output = service.Subscribe(params[:terms])<br />
end<br />
end<br />
end<br />
</code><br />
This is where the magic happens.  The line <code>require 'soap/wsdlDriver'</code> brings in the needed Ruby library.  The subscribe method is simply an action like any other in your application.  We&#8217;re going to create a form that accepts some user input and then we&#8217;ll pass them on to our WebServiceProvider.  The url, factory, and service lines could all be done in one line, but I&#8217;ve broken them out here to demonstrate.</p>
<p>If the box is left blank, we don&#8217;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&#8217;s description of itself as defined by its WSDL.  Then our local <strong>service</strong> object acts as a proxy and any method calls we make on the local object are simply passed on to it the actual WebServiceProvider.</p>
<p>We can then define our <code>@service_output</code> as a variable we can then call in our view.  Now for testing.</p>
<p><strong>5.  Create two views for testing</strong></p>
<p>In app/views/consumer create an index.rhtml file as follows:<br />
<code><br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;WebServiceConsumer&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h1&gt;WebServiceConsumer&lt;/h1&gt;<br />
&lt;p&gt;<br />
Enter your terms below. They will be passed on to our web service and you'll be able to see the response.<br />
&lt;/p&gt;</code></p>
<p><code>    &lt;%= start_form_tag :action=&gt; 'subscribe' %&gt;<br />
&lt;p&gt;&lt;label&gt;Terms&lt;/label&gt;&lt;br/&gt;<br />
&lt;%= text_field 'terms', '' %&gt;&lt;/p&gt;<br />
&lt;%= submit_tag "Subscribe" %&gt;<br />
&lt;%= end_form_tag %&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></p>
<p>Also in app/views/consumer create subscribe.rhtml as follows:<br />
<code><br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;WebServiceConsumer&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h1&gt;WebServiceConsumer&lt;/h1&gt;<br />
&lt;p&gt;<br />
The web service returned: &lt;br /&gt;&lt;br /&gt;<br />
&lt;%= @service_output %&gt;<br />
&lt;/p&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></p>
<p>6.  Now fire up your WebServiceConsumer app on a different port</p>
<p>Depending on your particular setup this may be different.  I use lighttpd, so you&#8217;ll need to open app/config/lighttpd.conf and change the <code>server.port = 3000</code> to say something like <code>server.port = 3100</code>.  Then you can run <code>./script/server</code> to fire up your app on port 3100.</p>
<p>Now point your browser to http://localhost:3100/consumer</p>
<p>Enter your terms into the text box, click <strong>Subscribe</strong>, and pat yourself on the back.  You&#8217;ve just subscribed to a web service.</p>
]]></content:encoded>
			<wfw:commentRss>http://benrobb.com/2007/02/01/howto-put-wsdl-on-rails-part-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Howto: Make a Rails Environment in Ubuntu</title>
		<link>http://benrobb.com/2007/02/01/howto-make-a-rails-environment-in-ubuntu/</link>
		<comments>http://benrobb.com/2007/02/01/howto-make-a-rails-environment-in-ubuntu/#comments</comments>
		<pubDate>Thu, 01 Feb 2007 15:41:08 +0000</pubDate>
		<dc:creator>benrobb</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://benrobb.com/2007/02/01/howto-make-a-rails-environment-in-ubuntu/</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>Now I&#8217;m running mine inside a virtual machine with <a href="http://www.vmware.com/products/server/" title="vmware server">VMWare Server</a> on my Windows Server 2003 box.  I won&#8217;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&#8217;ll point them out as we go along.</p>
<p><strong>1. Start with <a href="http://www.ubuntu.com/products/GetUbuntu/download#currentrelease" title="ubuntu server">Ubuntu Server</a> distro.</strong>  I&#8217;m using Ubuntu 6.10 Edgy Eft.<br />
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&#8217;ll be asked what kind of install you want to do.  Pick the LAMP option.  Do all appropriate setup, naming, networks, etc., and I&#8217;ll meet you again at the shell after you login.</p>
<p><strong>2. Edit your sources list.</strong></p>
<p><code>sudo vi /etc/apt/sources.list</code></p>
<p>Once you get inside, you&#8217;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 <strong>x</strong> will delete a single character.  Pushing the letter <strong>i</strong> will put you in insert mode to comment our the cdrom line.  Pushing <strong>Esc</strong> will get you out of edit mode. Pushing <strong>:</strong>, then <strong>wq</strong>, and finally <strong>Enter</strong> will put you back at shell with an edited sources list.</p>
<p><strong>3. Get SSH running</strong><br />
For me this is essential.  The interface through VMWare isn&#8217;t the speediest thing, and when you&#8217;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.</p>
<p><code>sudo apt-get install openssh-server</code></p>
<p>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 <a href="http://benrobb.com/2007/01/20/howto-port-forward-to-your-virtual-machine/" title="Port forwarding to a virtual machine">follow my other instructions</a> on port forwarding to a virtual machine.</p>
<p>If you&#8217;re happy where you&#8217;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.</p>
<p><strong>4. Update all your packages</strong></p>
<p><code>sudo apt-get update<br />
sudo apt-get upgrade<br />
sudo apt-get install saidar</code></p>
<p>Saidar is optional, it&#8217;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&#8217;d expect from your Task Manager or Activity Monitor.  Now it&#8217;s time to get down to business.</p>
<p><strong>5. Install Ruby</strong></p>
<p><code>sudo apt-get install ruby ruby1.8 ruby1.8-dev ri rdoc irb libmysql-ruby libmysqlclient15-dev</code></p>
<p>If you didn&#8217;t choose the LAMP option earlier (or picked a desktop distro) you&#8217;ll want to add Apache2 and mysql-server to this list:</p>
<p><code>sudo apt-get install ruby ruby1.8 ruby1.8-dev ri rdoc irb libmysql-ruby libmysqlclient15-dev apache2 mysql-server</code></p>
<p><strong>6.  Install RubyGems</strong><br />
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.</p>
<p><code>wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz<br />
tar -xvzf rubygems-0.9.0.tgz<br />
cd rubygems-0.9.0<br />
sudo ruby setup.rb<br />
cd ~<br />
rm -rf rubygems-0.9.0<br />
rm rubygems-0.9.0.tgz</code></p>
<p><strong>7. Install Rails</strong></p>
<p><code>sudo gem install rails --include-dependencies</code></p>
<p>This will show some errors while installing documentation, but never fear.  All is well.  We both know that you weren&#8217;t planning on reading the documentation anyway.</p>
<p><strong>8. Install Lighttpd with FastCGI</strong></p>
<p><code>sudo apt-get install lighttpd libfcgi-dev libfcgi-ruby1.8 build-essential<br />
</code></p>
<p>This will show an error that it tried to bind to port 80 and failed.  That&#8217;s ok, because we have apache running there.  What we&#8217;ve done is simply install it so that our Rails apps will use Lighttpd rather than the built-in WEBRick.</p>
<p>If like me you really just don&#8217;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&#8217;ll have to play with the lighttpd config file at some point anyway.</p>
<p><code>vi /etc/lighttpd/lighttpd.conf</code></p>
<p>Find and uncomment the line that says</p>
<p><code># server.port = 81</code></p>
<p>Now we&#8217;ll run Stop just to make sure and then Start it up again.</p>
<p><code>sudo /etc/init.d/lighttpd stop<br />
sudo /etc/init.d/lighttpd start</code></p>
<p>Now install the fcgi RubyGem:</p>
<p><code>sudo gem install fcgi</code></p>
<p><strong>9. Make sure that your FastCGI bindings and MySQL bindings are working properly.</strong><br />
Now to make sure that our fastcgi and mysql libraries are working properly, we&#8217;ll fire up IRB.  IRB stands for Interactive Ruby.  It basically gives us a functional, yet empty ruby environment to play around.</p>
<p><code>irb<br />
irb(main):001:0&gt; require 'mysql'<br />
=&gt; true<br />
irb(main):002:0&gt; require 'fcgi'<br />
=&gt; true</code></p>
<p>Now, unless you want to do all your mysql configuration from the command line, you&#8217;ll need to be able to connect as root to your mysql database from a remote host.  See <a href="http://benrobb.com/2007/01/15/howto-remote-root-access-to-mysql/">my instructions</a> on how to do that.  You may need to set up port forwarding through port 3306 in order to get this to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://benrobb.com/2007/02/01/howto-make-a-rails-environment-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Howto: Put WSDL on Rails</title>
		<link>http://benrobb.com/2007/01/30/howto-put-wsdl-on-rails/</link>
		<comments>http://benrobb.com/2007/01/30/howto-put-wsdl-on-rails/#comments</comments>
		<pubDate>Wed, 31 Jan 2007 06:51:39 +0000</pubDate>
		<dc:creator>benrobb</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://benrobb.com/2007/01/30/howto-put-wsdl-on-rails/</guid>
		<description><![CDATA[Why do I love Rails so much? Because there is so much to love! Who ever dreamed that creating web services could be so simple? Where other frameworks can consume them very simply, Rails defines simplicity when it comes to creating them. Consuming them is easy as well, but it&#8217;s on the creation side that Rails really stands out from the competition. So how do you do it? First off, let me say that my [...]]]></description>
			<content:encoded><![CDATA[<p>Why do I love Rails so much?  Because there is so much to love!  Who ever dreamed that creating web services could be so simple?  Where other frameworks can consume them very simply, Rails defines simplicity when it comes to creating them.  Consuming them is easy as well, but it&#8217;s on the creation side that Rails really stands out from the competition.  So how do you do it?</p>
<p>First off, let me say that my inexperience in web services means that I&#8217;m far from a subject matter expert.  I can however follow simple instructions, and I found a beautiful set over at the SOA Ranch.  This is a 3 part series, though more are supposedly coming.  I hope these articles continue to be published, but I have my doubts as the most recent articles are nearly 6 months old now.  The first one I found was <span style="text-decoration: line-through;">part 3</span> part 2.5 in the series, and you can follow the links back to part 1 &amp; part 2 (update 1/3/2009: I&#8217;ve removed the links since they no longer point to Rails content, apologies for the inconvenience).</p>
<p>So let&#8217;s get down to business.  I&#8217;ll make the assumption that you&#8217;ve got a <a title="how to make a working rails environment" href="http://benrobb.com/2007/02/01/howto-make-a-rails-environment-in-ubuntu/">working Rails environment</a>.  For Mac users, <a title="Locomotive" href="http://locomotive.raaum.org/">the latest version of Locomotive</a> has everything you need for creating web services.  For everyone else you&#8217;ll have to make your Rails environment the old fashioned way, although you can look forward to <a title="rubuntu" href="http://brainspl.at/articles/2006/02/16/rubuntu-is-almost-born">Rubuntu</a> soon.  We&#8217;re going to create a very simple web service that accepts a string, changes it a bit and returns a string.</p>
<p>First create yourself a new application</p>
<p><code>rails WebServiceProvider</code></p>
<p>Then you&#8217;ll want to open your application in your favorite Rails editor.  Then we need to generate your web service.</p>
<p><code>./script/generate web_service Manipulation manipulate</code></p>
<p>This will create an API file for us to define our web service&#8217;s interface.  It also creates a controller for us to use, and then a test file for us to use later (we won&#8217;t get to scripted testing in this article, although we will test it manually to prove that it works).</p>
<p>Now open up your manipulation_api.rb file in app/apis.  You&#8217;ll see the following line of code that is the beginnings of our string manipulating web service.</p>
<p><code>api_method :manipulate</code></p>
<p>We&#8217;ll need to define parameters and data types for our method like so:</p>
<p><code>api_method :manipulate, :expects =&gt; [:string], :returns =&gt; [:string]</code></p>
<p>There are many data types that can be used here, but we&#8217;re keeping things easy for now.  Now we&#8217;ll go look at the ManipulationController at app/controllers/manipulation_controller.rb.  Because we followed the standard Rails naming conventions the mapping of the web service to the controller is already done, but if we hadn&#8217;t, this mapping can be done explicitly by adding the following to our controller.</p>
<p><code>web_service_api ManipulationApi</code></p>
<p>We can also give our web service a different name with the wsdl_service_name directive</p>
<p><code>wsdl_service_name 'Manipulation'</code></p>
<p>Notice also that in the controller is where we define all our logic for what happens with the parameters being passed in by our web service consumer.  the manipulate method has already been created for us, so we simply need to tell our method to accept a string, perform our logic, and return another  string.</p>
<p>Again we&#8217;ll keep things simple.</p>
<p><code>def manipulate(terms)<br />
return "Yeah! " + terms + "!"<br />
end<br />
</code></p>
<p>Now for all intents and purposes, our web service has been coded.  We&#8217;ll add one more line to our controller that will generate a web front-end for the service so we can go see how it looks on the browser end.  Just add the following line to your controller.</p>
<p><code>web_service_scaffold :invoke</code></p>
<p>Now let&#8217;s turn on the server and see how things look.  Back at the terminal type</p>
<p><code>./script/server</code></p>
<p>Open your browser and point it to <a title="invoke web service" href="http://localhost:3000/Manipulation/invoke">http://localhost:3000/Manipulation/invoke</a>.  This shows us the web view of our API.  Follow the manipulate link to see the auto-generated web form that will show us what our service looks like.  Type your message into Param0 box and click the invoke button to see all your beautiful web service XML.  Another important point for those wishing to consume your web service is that Rails is automatically generating your wsdl for you.  You can see how this works by checking the routes.rb file in app/config but just know that visiting <a href="http://localhost:3000/Manipulation/service.wsdl">http://localhost:3000/Manipulation/service.wsdl</a> you can see the WSDL file that others will need to use your web service.  You can use something besides service.wsdl by editing your routes.rb file appropriately.</p>
<p>Now this is obviously a simple example, but it illustrates the basic steps and important points.  You probably wouldn&#8217;t have much use for a web service that adds the word &#8220;Yeah&#8221; and a few exclamation points to some user-input, but if we were doing this in the context of a real web application, you can start to imagine the possibilities available in your controller if you&#8217;ve got a dynamic database-driven application to work with.  You can add other methods to your API, define the param and return types there, then define the logic in the controller in the appropriate method.  Once you get the basics down, you&#8217;re on your way and the sky is the limit.  Good luck developing your first piece of the Web 2.0.</p>
]]></content:encoded>
			<wfw:commentRss>http://benrobb.com/2007/01/30/howto-put-wsdl-on-rails/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Howto: Port forward to Your Virtual Machine</title>
		<link>http://benrobb.com/2007/01/20/howto-port-forward-to-your-virtual-machine/</link>
		<comments>http://benrobb.com/2007/01/20/howto-port-forward-to-your-virtual-machine/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 18:36:49 +0000</pubDate>
		<dc:creator>benrobb</dc:creator>
				<category><![CDATA[*Nix]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://benrobb.com/2007/01/20/howto-port-forward-to-your-virtual-machine/</guid>
		<description><![CDATA[So sometimes I do things just for the fun factor. As mentioned in a previous post, I like having Windows server, but I prefer Linux for web-hosting. I finally found the solution to do both at the same time on one machine. In the real world people have been doing this for years, but it’s a first for me. After doing all my installing, I then installed VMWare’s now free VMWare Server. I downloaded the [...]]]></description>
			<content:encoded><![CDATA[<p>So sometimes I do things just for the fun factor. As mentioned in a previous post, I like having Windows server, but I prefer Linux for web-hosting. I finally found the solution to do both at the same time on one machine. In the real world people have been doing this for years, but it’s a first for me.</p>
<p>After doing all my installing, I then installed VMWare’s now free VMWare Server. I downloaded the Ubuntu Server distro and decided on the 6.10 release dubbed Edgy Eft. It doesn’t have the LTS, but is perfect for my needs because the repositories include everything I need for my Ruby on Rails setup (including Lighttpd).</p>
<p>Then I just had to figure out how to get traffic from my host to my virtual host. I wanted to use Bridged Ethernet and did that originally, but even though my VM grabbed an IP address on my Lan, when trying to access it from another computer, I was told that there was:</p>
<p>No route to host</p>
<p>If you’re smarter than I am, you can probably figure out a way around this, but I was just trying to get it to work. I turned to NAT. Go to VM &gt; Settings &gt; Ethernet in your VMWare Server Console, select NAT, and click OK.</p>
<p>Now boot your VM log in, and run an</p>
<p>ifconfig</p>
<p>to see what your IP Address is. Again in your server console go to Host &gt; Virtual Network Settings. Select the NAT tab. Make sure to move this window so you can clearly read your VM’s IP address. VMNet8 is the default virtual adapter for NAT, so if this is your only VM go ahead and click the Edit button (if you have others, make sure to select the proper adapter for your VM from the dropdown menu, then click edit). Now click the Port Forwarding button and then the Add button. Fill in the host port, the VM ip address, and the VM port. For me this meant forwarding port 80 from the host to port 80 on the VM. Don’t forget a nice description. Click OK 4 times. Now just forward traffic through your router (as needed) and you’re good to go.</p>
<p>My Ubuntu VM is now serving Apache2+MySql+PHP5 to the world. Soon it will be serving Ruby on Rails.</p>
<p>For a graphical tutorial see:</p>
<ul>
<li><a href="http://www.vmware.com/support/ws55/doc/ws_net_nat_advanced.html" title="VMWare howto">The Official VMWare HowTo</a></li>
<li><a href="http://www.howtogeek.com/howto/vmware/allow-access-to-a-vmware-virtual-machinenat-from-another-computer/" title="How-To Geek">The How-To Geek</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://benrobb.com/2007/01/20/howto-port-forward-to-your-virtual-machine/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Howto: Secure VNC through SSH Tunneling</title>
		<link>http://benrobb.com/2007/01/16/howto-secure-vnc-through-ssh-tunneling/</link>
		<comments>http://benrobb.com/2007/01/16/howto-secure-vnc-through-ssh-tunneling/#comments</comments>
		<pubDate>Tue, 16 Jan 2007 18:26:18 +0000</pubDate>
		<dc:creator>benrobb</dc:creator>
				<category><![CDATA[*Nix]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://benrobb.com/2007/01/16/howto-secure-vnc-through-ssh-tunneling/</guid>
		<description><![CDATA[So the my web server sits in the baby’s room at my house. It sits in the corner, and the only thing plugged into it is power and network. This is fine for just about everything that I do, but every once in awhile, I have a problem that requires a user interface. VNC to the rescue. Ubuntu comes with Vino, a little VNC Server, pre-installed. You can go to System &#62; Preferences &#62; Remote [...]]]></description>
			<content:encoded><![CDATA[<p>So the my web server sits in the baby’s room at my house. It sits in the corner, and the only thing plugged into it is power and network. This is fine for just about everything that I do, but every once in awhile, I have a problem that requires a user interface. VNC to the rescue. Ubuntu comes with Vino, a little VNC Server, pre-installed. You can go to System &gt; Preferences &gt; Remote Desktop to set a password, turn off local user verification, and turn on desktop sharing (as opposed to just viewing).</p>
<p>Then you find your favorite VNC viewer, and type in the network address of your server. This works fine as long as you’re on the local network, but what happens when you’re not on your local network. You could always forward the VNC port through your firewall (port 5900 by default), but VNC is not a secure protocol. Any password typed in would be transmitted in plain-text, and anyone in the world could intercept, and then control your computer, no hack attack needed.</p>
<p>This is where SSH comes to the rescue. SecureSHell (or SSH) creates an encrypted tunnel between two end-points over the network, and gives you a shell (command prompt for you windows folks) to the remote computer. It’s been around for years, it’s secure, and it continues to prove it’s worth as people come up with more and more uses for it. Tunneling is an example of this.</p>
<p>You can set SSH to accept traffic from a certain port on your computer, send it through an encrypted tunnel, and then end up at a certain port once it gets to the other side of the tunnel &#8211; SSH Tunneling.</p>
<p>So when I want to get a graphical interface to my server at home in my office, I can simply open my own shell (Windows users can use Putty) and type</p>
<p><code>ssh -L 5900:localhost:5900 username@remote.server.address</code></p>
<p>where the first “5900” represents the local port number and the second represents the remote port number.</p>
<p>You are then prompted for a password like any other SSH connection, and then logged in. Then you simply open your favorite VNC Viewer (I use VNCViewer on my Mac, Chicken of the VNC had serious speed issues) and connect to localhost. Your traffic which would normally be destined for port 5900 is forwarded through the tunnel and instead goes to port 5900 at the other end of the tunnel.</p>
<p>You’ve now got secure VNC.</p>
]]></content:encoded>
			<wfw:commentRss>http://benrobb.com/2007/01/16/howto-secure-vnc-through-ssh-tunneling/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Howto: Start Subversion at Boot on Ubuntu</title>
		<link>http://benrobb.com/2007/01/15/howto-start-subversion-at-boot-on-ubuntu/</link>
		<comments>http://benrobb.com/2007/01/15/howto-start-subversion-at-boot-on-ubuntu/#comments</comments>
		<pubDate>Mon, 15 Jan 2007 18:25:19 +0000</pubDate>
		<dc:creator>benrobb</dc:creator>
				<category><![CDATA[*Nix]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[featured]]></category>

		<guid isPermaLink="false">http://benrobb.com/2007/01/15/howto-start-subversion-at-boot-on-ubuntu/</guid>
		<description><![CDATA[I don’t know if I’ve extolled the virtues of Ubuntu on this blog yet, but they are many. They are, however, not the topic of this post. Every once in a while, I like to try different operating systems on my server, and at the moment, I’m just coming back to an Ubuntu server after a brief fling with Windows Server 2003. On the list of things to do after install was to get Ubuntu [...]]]></description>
			<content:encoded><![CDATA[<p>I don’t know if I’ve extolled the virtues of Ubuntu on this blog yet, but they are many. They are, however, not the topic of this post. Every once in a while, I like to try different operating systems on my server, and at the moment, I’m just coming back to an Ubuntu server after a brief fling with Windows Server 2003.</p>
<p>On the list of things to do after install was to get Ubuntu to start the svnserve daemon at boot. I’ve taken the time to look this up enough times that I figured I’d just add it here. This procedure holds for anything you’d like to do at boot, I’m simply running my svn daemon.</p>
<p><strong>Step 1 &#8211; Create your script.</strong><br />
Simply create a new file (I called mine svnserve) and type the command you’d like to run</p>
<p><code>cd /etc/init.d/ # (thanks Alfonso)<br />
sudo touch svnserve<br />
sudo vi svnserve<br />
svnserve -d -r /usr/local/svn/repository_name</code></p>
<p><strong>Step 2 &#8211; Save the script in the /etc/init.d/ folder</strong></p>
<p><strong>Step 3 &#8211; Make the script executable</strong><br />
<code>sudo chmod +x svnserve</code></p>
<p><strong>Step 4 &#8211; Add the script to the boot sequence</strong><br />
<code>sudo update-rc.d svnserve defaults</code></p>
<p>That’s it. When you’re done you should see some output similar to</p>
<p><code>Adding system startup for /etc/init.d/svnserve ...<br />
/etc/rc0.d/K20svnserve -&gt; ../init.d/svnserve<br />
/etc/rc1.d/K20svnserve -&gt; ../init.d/svnserve<br />
/etc/rc6.d/K20svnserve -&gt; ../init.d/svnserve<br />
/etc/rc2.d/S20svnserve -&gt; ../init.d/svnserve<br />
/etc/rc3.d/S20svnserve -&gt; ../init.d/svnserve<br />
/etc/rc4.d/S20svnserve -&gt; ../init.d/svnserve<br />
/etc/rc5.d/S20svnserve -&gt; ../init.d/svnserve</code></p>
]]></content:encoded>
			<wfw:commentRss>http://benrobb.com/2007/01/15/howto-start-subversion-at-boot-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 4/34 queries in 0.009 seconds using disk: basic
Object Caching 1058/1125 objects using disk: basic

Served from: benrobb.com @ 2012-05-18 04:21:59 -->
