<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Mike Admire</title>
	
	<link>http://mikeadmire.com</link>
	<description>Insert Clever Comment Here</description>
	<lastBuildDate>Sun, 04 Dec 2011 14:08:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/MikeAdmire" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="mikeadmire" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Postgresql on Mac OS X Lion</title>
		<link>http://mikeadmire.com/postgresql-on-mac-os-x-lion/</link>
		<comments>http://mikeadmire.com/postgresql-on-mac-os-x-lion/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 15:27:35 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://mikeadmire.com/?p=84</guid>
		<description><![CDATA[Here is a quick note about something I&#8217;ve run into when installing Postgresql on Mac OS X Lion.  I use Homebrew to install Postgres, but when trying to enter commands like createdb or createuser I was getting an error asking &#8230; <a href="http://mikeadmire.com/postgresql-on-mac-os-x-lion/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here is a quick note about something I&#8217;ve run into when installing <a title="Postgresql" href="http://www.postgresql.org/" target="_blank">Postgresql</a> on Mac OS X Lion.  I use <a title="Homebrew" href="http://mxcl.github.com/homebrew/" target="_blank">Homebrew</a> to install Postgres, but when trying to enter commands like createdb or createuser I was getting an error asking me to verify that the server was running locally and accepting connections on the Unix domain socket.</p>
<p>There are binaries for Postgres in /usr/bin that are NOT from the install. I resolved this by opening /etc/paths and moving /usr/bin to be after /usr/local/bin. Once that change was made and I opened a new terminal I no longer had any of the previous issues.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikeadmire.com/postgresql-on-mac-os-x-lion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check Your Apache Banner</title>
		<link>http://mikeadmire.com/check-your-apache-banner/</link>
		<comments>http://mikeadmire.com/check-your-apache-banner/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 22:49:55 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://mikeadmire.com/?p=80</guid>
		<description><![CDATA[Pull your web server headers sometime and see if you are giving out too much information. curl -LI http://your.webserver.here From a security perspective, giving out information about the version number of the web server, the underlying operating system, and the &#8230; <a href="http://mikeadmire.com/check-your-apache-banner/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Pull your web server headers sometime and see if you are giving out too much information.</p>
<pre>curl -LI http://your.webserver.here</pre>
<p>From a security perspective, giving out information about the version number of the web server, the underlying operating system, and the application software version isn&#8217;t the best idea. A couple things you can do to remedy this on Apache:</p>
<p>Set <a title="ServerTokens" href="http://httpd.apache.org/docs/2.2/mod/core.html#servertokens" target="_blank">ServerTokens</a> to Prod in the apache.conf (/etc/apache2/conf.d/security on Ubuntu 10.4)</p>
<pre>ServerTokens Prod</pre>
<p>This removes the Apache version and any information about the operating system. It will show that it is Apache, but that is it.</p>
<p>If you are running PHP you should also edit the php.ini file (/etc/php5/apache2/php.ini on Ubuntu 10.4). Make sure that expose_php is set to off.</p>
<pre>expose_php off</pre>
<p>Those two changes will make sure your Apache server isn&#8217;t announcing what version it is, what OS it&#8217;s running on, and which version of PHP it&#8217;s running.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikeadmire.com/check-your-apache-banner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running Cucumber Tests From Inside of Vim</title>
		<link>http://mikeadmire.com/running-cucumber-tests-from-inside-of-vim/</link>
		<comments>http://mikeadmire.com/running-cucumber-tests-from-inside-of-vim/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 06:00:52 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Vim]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[macvim]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[slime]]></category>

		<guid isPermaLink="false">http://mikeadmire.com/?p=4</guid>
		<description><![CDATA[I have been looking for a good way to run Cucumber tests from inside of vim without having to switch to a terminal window and enter the cucumber command. My first solution was to add a couple of key maps &#8230; <a href="http://mikeadmire.com/running-cucumber-tests-from-inside-of-vim/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div>
<p>I have been looking for a good way to run <a href="http://cukes.info/">Cucumber</a> tests from inside of vim without having to switch to a terminal window and enter the cucumber command. My first solution was to add a couple of key maps to my .vimrc file:</p>
<pre class="qoate-code">
map c :!cucumber -r features %
map C :!cucumber
</pre>
<p>I use a comma as my leader. (set in the .vimrc file with)</p>
<pre class="qoate-code">
let mapleader = ","
</pre>
<p>So by entering ,c while in command mode, vim fires off the cucumber command against the file that is in the current buffer (the one I&#8217;m working on) and ,C runs cucumber against the current working directory. This works okay, but it isn&#8217;t a perfect solution. Some of the problems are:</p>
<ol>
<li>The vim session freezes until the tests finish</li>
<li>When I exit the command window I lose all of the output from running the tests</li>
<li>With <a href="http://code.google.com/p/macvim/">MacVim</a> I lose color in the terminal</li>
</ol>
<p>None of these are that big of a deal, but they do make it feel clunky.</p>
<p>Then I came across <a href="http://lmarburger.github.com/2009/12/using-slime-to-execute-cucumber-features.html">this post</a> from Larry Marburger over the weekend that talks about setting vim up to send Cucumber commands to a screen session. He references a <a href="http://technotales.wordpress.com/2007/10/03/like-slime-for-vim/">blog post</a> by Jonathan Palardy that goes in to some good detail about how to get everything setup for this to work. Using these two posts as a reference I started experimenting, and I think I&#8217;ve come up with a pretty cool work flow.</p>
<p>These directions require <a href="http://www.gnu.org/software/screen/">Screen</a> in order to work. I&#8217;m using <a href="http://code.google.com/p/macvim/">MacVim</a>, but if you are on a Linux machine you can replace mvim with gvim.</p>
<p>First off you need <a href="https://github.com/mikeadmire/small_stuff/blob/master/slime.vim" target="_blank">slime.vim</a>. Move this to your ~/.vim/plugins/ directory.</p>
<p>Next, add this to your <a href="../2010/06/using-bash-aliases">bash alias</a> file:</p>
<pre class="qoate-code">
function svim { local dir=`pwd`; mvim; screen -S slime; cd $dir; }
</pre>
<p>This creates a new shell function that:</p>
<ol>
<li>gets your current directory</li>
<li>opens MacVim</li>
<li>starts screen with a session named slime</li>
<li>cd the new screen session back to the original directory you started from</li>
</ol>
<p>Next we need to add 2 lines to our ~/.screenrc file:</p>
<pre class="qoate-code">
termcapinfo xterm* ti@:te@
shelltitle 'w0'
</pre>
<p>Now we have some default Screen parameters that we can reference from our Vim session and we can setup some keyboard maps to make things easier:</p>
<p>.vimrc file</p>
<pre class="qoate-code">
map &lt;leader&gt;t :call Send_to_Screen("cucumber -r features " . expand("%") . "\n")&lt;CR&gt;|
map &lt;leader&gt;T :call Send_to_Screen("cucumber" . "\n")&lt;CR&gt;|
</pre>
<p>The first one allows me to type ,t to run cucumber on the .features file I currently have open. The second sets up ,T to run cucumber on the entire project. Both send the command to a remote Screen session and Vim goes right back to what you were doing. By sending the commands to a remote screen this deals with all three of the problems that I mentioned earlier.</p>
<ol>
<li>You don&#8217;t have to wait for the tests to finish running before being able to move on to the next task.</li>
<li>The output continues to be displayed in the terminal window while you work through any problems.</li>
<li>The colors are displayed properly.</li>
</ol>
<p>So what does the work flow look like with this setup?</p>
<ol>
<li>Open a terminal</li>
<li>cd to the project directory</li>
<li>Type svim</li>
<li>Start working on a features file in mvim or gvim</li>
<li>Type ,t to execute the scenarios from the current file</li>
<li>Check output on terminal window (This works great if you have two monitors so that you don&#8217;t have to command/control tab to the terminal window)</li>
<li>Type ,T if you want to execute all scenarios for the project</li>
</ol>
<p>That&#8217;s it.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://mikeadmire.com/running-cucumber-tests-from-inside-of-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Bash Aliases</title>
		<link>http://mikeadmire.com/using-bash-aliases/</link>
		<comments>http://mikeadmire.com/using-bash-aliases/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 06:00:45 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://mikeadmire.com/?p=7</guid>
		<description><![CDATA[Bash aliases are a very useful feature for UNIX command line users. In this article I will discuss what they are and how to take advantage of them. Aliases are a way to say &#8220;when I type this, I want &#8230; <a href="http://mikeadmire.com/using-bash-aliases/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div>
<p>Bash aliases are a very useful feature for UNIX command line users.  In  this article I will discuss what they are and how to take advantage of  them.</p>
<p>Aliases are a way to say &#8220;when I type this, I want you to interpret it as this other thing.&#8221;  For example:</p>
<pre class="qoate-code">
alias ft='find . -type f'
</pre>
<p>If you type &#8216;ft&#8217; at the command line before entering this alias command, you will most likely get:</p>
<pre class="qoate-code">
-bash: ft: command not found
</pre>
<p>Once you type the alias command in, typing &#8216;ft&#8217; should start firing off a  list of all files recursively under your current directory.  You now  have a way to enter the longer command by simply typing 2 characters.   This can come in handy when there are strings of commands that you use  frequently that are long and/or hard to remember.</p>
<p>So now that we understand what an alias is, let&#8217;s make it so that every  time we open a new terminal window we setup some aliases automatically.   This can be done by putting the alias directly in the .bashrc files in  your home directory, but I prefer to create a .bash_aliases file and  reference that from the .bashrc file.  This helps me keep things  organized and makes it easier to share aliases across multiple machines.   So under your home directory use your favorite text editor to create  (or open) a file called .bash_aliases. Add some aliases like:</p>
<p>~/.bash_aliases file:</p>
<pre class="qoate-code">
alias tu='top -o cpu' #top cpu processes
alias tm='top -o vsize' #top memory processes
alias ls='ls -FG'
</pre>
<p>Notice how I create an alias for an existing command &#8216;ls&#8217;.  This allows  me to set my preferred defaults so that I can just use &#8216;ls&#8217; and get the  enhanced command instead.  Now we need to add a couple of lines to our  .bashrc file so that it knows to pull in the aliases from our  .bash_aliases file.</p>
<p>~/.bashrc file:<br />
</pre><br />
if [ -f ~/.bash_aliases ]; then source ~/.bash_aliases; fi<br />
</pre><br />
Adding this line to your .bashrc tells bash that when you start a  terminal to check your home directory for a file named .bash_aliases and  include it as a configuration file.</p>
<p>That is it.  Now when you find a need for a new command shortcut you can  simply add it to your .bash_aliases file and it will be available  anytime you start up a new shell.  If you would like to see the list of  aliases that you have, maybe that you've created or that were setup for  you when your account was created, simply type:</p>
<pre class="qoate-code">
alias
</pre>
<p>That should give you a full list of all currently existing shell aliases.</p>
<p>Hopefully this gives you the basic idea of creating and managing bash  aliases.  They can be a real benefit if you spend much time at the  command line helping you reduce keystrokes and speed up repetitive  processes.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://mikeadmire.com/using-bash-aliases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unix Find Xargs And No Such File Or Directory</title>
		<link>http://mikeadmire.com/unix-find-xargs-and-no-such-file-or-directory/</link>
		<comments>http://mikeadmire.com/unix-find-xargs-and-no-such-file-or-directory/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 06:00:27 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[xargs]]></category>

		<guid isPermaLink="false">http://mikeadmire.com/?p=14</guid>
		<description><![CDATA[A useful command that I frequently use when looking for a particular string in a file is a find command piped to xargs grep. For example, if I am looking for the word Mike in any file inside of /usr/local &#8230; <a href="http://mikeadmire.com/unix-find-xargs-and-no-such-file-or-directory/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div>
<p>A useful command that I frequently use when looking for a particular  string in a file is a find command piped to xargs grep. For example, if I  am looking for the word Mike in any file inside of /usr/local I will  type:</p>
<pre class="qoate-code">
find /usr/local -type f | xargs grep Mike
</pre>
<p>This says to start in the directory of /usr/local and search recursively  for anything that is a file. Then pass that file to grep to search  inside the file for the text Mike. There is one problem with this  though. It doesn&#8217;t handle spaces in file names. When it comes across a  file name with a space you will usually see something like:</p>
<pre class="qoate-code">
grep: /Someplace/Somewhere: No such file or directory
</pre>
<p>This can be confusing since you would assume that find actually found  something to pass to grep. It is misleading though, as the problem  actually has to do with a white space character in the file name or  directory. It is very common to see spaces on Linux and Mac OS X  systems, so it is important to learn to work around this problem. The  solution is pretty simple. Both GNU find and xargs support a zero option  that displays white space as a NUL character.</p>
<pre class="qoate-code">
find /usr/local -type f -print0 | xargs -0 grep Mike
</pre>
<p>This should take care of the white space issues.  I hope this helps.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://mikeadmire.com/unix-find-xargs-and-no-such-file-or-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Query Soap Service Using Ruby</title>
		<link>http://mikeadmire.com/query-soap-service-using-ruby/</link>
		<comments>http://mikeadmire.com/query-soap-service-using-ruby/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 06:00:26 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[soap]]></category>

		<guid isPermaLink="false">http://mikeadmire.com/?p=23</guid>
		<description><![CDATA[OK, to get this out of the way. I know SOAP isn&#8217;t cool. However, there may still be times when you need to query data from a SOAP web service. This is an attempt to document the process of retrieving &#8230; <a href="http://mikeadmire.com/query-soap-service-using-ruby/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div>
<p>OK, to get this out of the way. I know SOAP isn&#8217;t cool. However, there may still be times when you need to query data from a SOAP web service. This is an attempt to document the process of retrieving and working with that data.</p>
<p>In this example I will describe how to query the WSDL to get a list of methods and parameters, and use that to submit the method call. I will be calling a web service method called &#8216;webMethod&#8217; that accepts one parameter called &#8216;publishDate&#8217;. If you don&#8217;t already know this information about the web service you are communicating with, there is a free tool called SoapUI that works pretty well. It&#8217;s written in Java, so you should be able to get it to work on about any platform.</p>
<p>Depending on the version of Ruby you are running, the first thing that may be required is to install soap4r:</p>
<pre class="qoate-code">
gem install soap4r
</pre>
<p>Next is to set the location of the WSDL file on the web server, set the encoding, and instantiate the driver:</p>
<pre class="qoate-code">
require 'soap/wsdlDriver'
wsdl = 'http://server/WebService.asmx?WSDL'
driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
XSD::Charset.encoding = 'UTF8'
</pre>
<p>This next line will create two logs in the directory of the process called devLog_webMethod_response.xml and devLog_webMethod_request.xml that will show the raw request and response each time the process is called. In place of webMethod will be the actual method name of the web service being called. This can be commented out when the application is moved to production.</p>
<pre class="qoate-code">
driver.wiredump_file_base = "devLog"
</pre>
<p>Now it&#8217;s time to retrieve the data:</p>
<pre class="qoate-code">
@response = driver.webMethod(:publishDate =&gt; '2008-09-01')
</pre>
<p>At this point @response contains the XML response from the web service. In order to retrieve the data we will need to know a little bit about the structure of the XML. We can find out this information by opening the log file created by the previous step. Let&#8217;s open devLog_webMethod_response.xml:</p>
<pre class="qoate-code">
&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;soap:Body&gt;
&lt;WebMethodResponse xmlns="WebMethod"&gt;
&lt;WebMethodResult&gt;
&lt;Article&gt;
&lt;Name&gt;Example 1&lt;/Name&gt;
&lt;Headline&gt;Poor Excuse For An Article&lt;/Headline&gt;
&lt;Body&gt;Nothing to see here, move along please.&lt;/Body&gt;
&lt;/Article&gt;
&lt;Article&gt;
&lt;Name&gt;Example 2&lt;/Name&gt;
&lt;Headline&gt;Woot! I Made Headlines&lt;/Headline&gt;
&lt;Body&gt;Yeah, OK. Another poorly written example article.&lt;/Body&gt;
&lt;/Article&gt;
&lt;/WebMethodResult&gt;
&lt;/WebMethodResponse&gt;
&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;
</pre>
<p>OK, so here we have two articles that contain the data we are after and they are both inside the WebMethodResult tags. So to access those bits we might do something like:</p>
<pre class="qoate-code">
@response.webMethodResult.article.each do |article|
puts article["Name"]
puts article["Headline"]
puts article["Body"]
end
</pre>
<p>That works great as long as there is always more than one article. If, on the other hand, there is only one article in the result, it is no longer an array and the .each method will fail. So to get around this we can move our logic to a method and then test the article first to see which way we should handle it. So the previous code might be rewritten as:</p>
<pre class="qoate-code">
def print_article(article)
puts article["Name"]
puts article["Headline"]
puts article["Body"]
end

if(@response.webMethodResult.article.is_a?(Array))
@response.webMethodResult.article.each do |article|
print_article(article)
end
else
print_article(@response.webMethodResult.article)
end
</pre>
<p>If you are asked to do some work with SOAP based web services, hopefully this makes it a little easier to get up and running.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://mikeadmire.com/query-soap-service-using-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE 7 And Word Wrap</title>
		<link>http://mikeadmire.com/ie-7-and-word-wrap/</link>
		<comments>http://mikeadmire.com/ie-7-and-word-wrap/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 06:00:16 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE7]]></category>

		<guid isPermaLink="false">http://mikeadmire.com/?p=25</guid>
		<description><![CDATA[I guess this is what I get for doing most of my testing in Firefox. I created an aspx page to be opened in a javascript window.open to allow a customer to preview some rendered HTML. I used labels in &#8230; <a href="http://mikeadmire.com/ie-7-and-word-wrap/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div>
<p>I guess this is what I get for doing most of my testing in Firefox. I created an aspx page to be opened in a javascript window.open to allow a customer to preview some rendered HTML. I used labels in the aspx page and then populate those with data returned from a database. Everything looked great in Firefox, but when I checked it in Internet Explorer, there was no word wrapping. Each line ran off the page. After some research I found a CSS property called word-wrap. The property is part of the CSS3 draft and is used to force word wrapping. Since this is a simple page that is opened in a pop-up window, I was able to fix the problem by simply adding the following to the CSS style.</p>
<pre class="qoate-code">
body {
  word-wrap: break-word;
}
</pre>
<p>If I understand the CSS3 draft correctly, this should actually force a word wrap even if it occurs in the middle of a word. However, in testing with both Firefox and IE 7, this is not the case. It breaks at the end of the word.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://mikeadmire.com/ie-7-and-word-wrap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby.Exe Unable To Locate Component Readline.Dll</title>
		<link>http://mikeadmire.com/ruby-exe-unable-to-locate-component-readline-dll/</link>
		<comments>http://mikeadmire.com/ruby-exe-unable-to-locate-component-readline-dll/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 06:00:50 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://mikeadmire.com/?p=27</guid>
		<description><![CDATA[I just installed ruby 1.8.7 on a Windows machine and when I started IRB I got this error: The fix: Download the readline binary zip from here. Unzip the file. Change directory to the new directory created by unzipping the &#8230; <a href="http://mikeadmire.com/ruby-exe-unable-to-locate-component-readline-dll/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div>
<div id="post_body_6">
<p>I just installed ruby 1.8.7 on a Windows machine and when I started IRB I got this error:</p>
<pre class="qoate-code">
ruby.exe Unable To Locate Component readline.dll
</pre>
<p>The fix:</p>
<ol>
<li>Download the readline binary zip from <a href="http://gnuwin32.sourceforge.net/downlinks/readline-bin-zip.php">here</a>.</li>
<li>Unzip the file.</li>
<li>Change directory to the new directory created by unzipping the file.</li>
<li>Change directory to the bin directory.</li>
<li>Copy the readline5.dll file.</li>
<li>Change directory to your ruby/bin directory (for me this is C:\ruby\bin).</li>
<li>Paste readline5.dll file there.</li>
<li>Rename file readline.dll.</li>
</ol>
<p>As long as your rubybin directory is set in your PATH environment variable, that should take care of the problem.</p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://mikeadmire.com/ruby-exe-unable-to-locate-component-readline-dll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby On Rails Development Environment On Ubuntu Linux 8.04.1</title>
		<link>http://mikeadmire.com/ruby-on-rails-development-environment-on-ubuntu-linux-8-04-1/</link>
		<comments>http://mikeadmire.com/ruby-on-rails-development-environment-on-ubuntu-linux-8-04-1/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 06:00:05 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://mikeadmire.com/?p=30</guid>
		<description><![CDATA[I just went through the process of setting up a new Linux desktop for Rails development. In an effort to keep it short and to the point, I&#8217;ve trimmed up some of the info that I found useful from wiki.rubyonrails.org. &#8230; <a href="http://mikeadmire.com/ruby-on-rails-development-environment-on-ubuntu-linux-8-04-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div>
<div id="post_body_7">
<p>I just went through the process of setting up a new Linux desktop for Rails development. In an effort to keep it short and to the point, I&#8217;ve trimmed up some of the info that I found useful from wiki.rubyonrails.org. This is just a basic development stack. I plan to write another post on the editors that I&#8217;ve tried and what I&#8217;ve found to work best for me so far. Anyway, let&#8217;s get started. I tend to work primarily at a command prompt, so that&#8217;s the method I&#8217;ve described here. Open a terminal window and follow along:</p>
<pre class="qoate-code">
sudo apt-get install ruby rdoc libyaml-ruby libzlib-ruby ri libopenssl-ruby ruby1.8-dev build-essential
</pre>
<p>You don&#8217;t want to install the rubygems package from the Ubuntu repository. It is consistently out of date, so you will need to pull the tarball down from RubyForge:</p>
<pre class="qoate-code">
wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz

tar xvzf rubygems-1.2.0.tgz

cd rubygems-1.2.0

sudo ruby setup.rb
</pre>
<p>At least with the versions I&#8217;ve installed, I had to create a symbolic link to gem1.8:</p>
<pre class="qoate-code">
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
</pre>
<p>You should now be able to do a gem update:</p>
<pre class="qoate-code">
sudo gem update --system
</pre>
<p>And install Rails:</p>
<pre class="qoate-code">
sudo gem install rails
</pre>
<p>Now it&#8217;s time to take care of the database installation:</p>
<pre class="qoate-code">
sudo apt-get install mysql-server libsqlite3-0 libsqlite3-dev

sudo gem install mysql sqlite3-ruby
</pre>
<p>If you want to install RMagick:</p>
<pre class="qoate-code">
sudo apt-get install imagemagick libmagick9-dev

sudo gem install rmagick
</pre>
<p>That should do it.  Now go have some fun!</p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://mikeadmire.com/ruby-on-rails-development-environment-on-ubuntu-linux-8-04-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Change The Default Editor In Debian And Ubuntu</title>
		<link>http://mikeadmire.com/how-to-change-the-default-editor-in-debian-and-ubuntu/</link>
		<comments>http://mikeadmire.com/how-to-change-the-default-editor-in-debian-and-ubuntu/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 06:00:56 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://mikeadmire.com/?p=33</guid>
		<description><![CDATA[I&#8217;ve been a fan of Ubuntu Linux since I first started using it a few years ago. One of the first things I do when building a new Ubuntu machine is set the default editor to Vim. I have been &#8230; <a href="http://mikeadmire.com/how-to-change-the-default-editor-in-debian-and-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div>
<div id="post_body_2">
<p>I&#8217;ve been a fan of Ubuntu Linux since I first started using it a few years ago.  One of the first things I do when building a new Ubuntu machine is set the default editor to Vim.  I have been using Vi for a long time and the keyboard shortcuts are very natural for me, so the first time I typed a command like visudo or crontab -e and got the Nano editor, I was shocked.  With Ubuntu 8.04 it&#8217;s really very easy:</p>
<p>Open a terminal window (Applications/Accessories/Terminal) Type: sudo apt-get install vim-full</p>
<p>That should do it.  By default only the vim.tiny package is installed and installing the vim package (apt-get install vim) only gets you vim.basic.  Both of those will leave the default editor as Nano.  Installing the vim-full package will take care of modifying the default editor for you to be vim.gnome.  If you would like to change the setting to something else, or that didn&#8217;t work with the version of Debian or Ubuntu that you have, try:</p>
<pre class="qoate-code">
sudo /usr/sbin/update-alternatives --config editor
</pre>
<p>Then pick the number that corresponds with your choice.</p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://mikeadmire.com/how-to-change-the-default-editor-in-debian-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

