<?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>NiceCabbage Blog &#187; rubygems</title>
	<atom:link href="http://www.nicecabbage.com/tag/rubygems/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nicecabbage.com</link>
	<description>Life, Design, Web Application</description>
	<lastBuildDate>Mon, 07 Jun 2010 02:03:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>mw: printing variables to Growl using Meow</title>
		<link>http://www.nicecabbage.com/2009/11/mw-printing-variables-to-growl-using-meow/</link>
		<comments>http://www.nicecabbage.com/2009/11/mw-printing-variables-to-growl-using-meow/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 02:57:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[rubygems]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=184</guid>
		<description><![CDATA[Today I uploaded a new Rubygem called &#8220;mw&#8221; (pronounced as [mi'u]).
mw is a tiny useful library to output the result of pp to Growl.The original idea of Growl printing comes from jugyo&#8217;s g. Though the concept is great, g does not work on my environment. I&#8217;ve got &#8220;connection errors&#8221; from Growl.
I suspect that &#8220;ruby-growl&#8221; library [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_185" class="wp-caption alignnone" style="width: 465px"><a href="http://www.nicecabbage.com/wp-content/uploads/2009/11/091129-0002.png"><img class="size-full wp-image-185   " title="mw-image" src="http://www.nicecabbage.com/wp-content/uploads/2009/11/091129-0002.png" alt="mw" width="455" height="135" /></a><p class="wp-caption-text">mw</p></div>
<p>Today I uploaded a new Rubygem called &#8220;mw&#8221; (pronounced as [<span>mi'u</span>]).</p>
<p>mw is a tiny useful library to output the result of pp to <a href="http://growl.info/">Growl</a>.The original idea of Growl printing comes from <a href="http://jugyo.org/">jugyo</a>&#8217;s <a href="http://www.slideshare.net/jugyo/g-is-very-useful">g</a>. Though the concept is great, g does not work on my environment. I&#8217;ve got &#8220;connection errors&#8221; from Growl.<br />
I suspect that &#8220;ruby-growl&#8221; library on my machine does not work well.</p>
<p>Anyway, to overcome this problem, I reinvented the same feature using Meow, a Growl notification wrapper for the rb-cocoa environment.</p>
<h2>INSTALL</h2>
<p>First, you need to be a Mac-user, and have installed rb-cocoa.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">port <span style="color: #c20cb9; font-weight: bold;">install</span> rb-cocoa</pre></div></div>

<p>Sinece I uploaded <a href="http://gemcutter.org/gems/mw">mw.gem</a> to <a href="http://gemcutter.org/">gemcutter.org</a>, installing mw is as easy as</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gem <span style="color: #c20cb9; font-weight: bold;">install</span> gemcutter
gem tumble
gem <span style="color: #c20cb9; font-weight: bold;">install</span> mw</pre></div></div>

<h2>USAGE</h2>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'mw'</span>
mw <span style="color:#996600;">&quot;message&quot;</span>
mw YourClass.<span style="color:#9900CC;">new</span></pre></div></div>

<p>To change priority, you can use mw1~5. (mw3 is normal, mw1 is the lowest, and mw5 is the highest. mw4 and mw5 will fire the sticky notes, so that the note will live on your screen persitently.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">begin</span>
do_dangerous_and_raise_some_exception
<span style="color:#9966CC; font-weight:bold;">rescue</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; e
mw4 e
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<h2>SOURCES</h2>
<p>all the sources can be seen at <a href="http://github.com/tomoya55/mw">http://github.com/tomoya55/mw</a>.</p>
<h2>NOTES</h2>
<p>1. If you are still not sure what mw is, please take a look at <a href="http://www.slideshare.net/jugyo/g-is-very-useful">jugyo&#8217;s presentation of g</a>.</p>
<p>2. My mw requires rb-cocoa and meow. If you runs ruby on Linux or Windows, you cannot use this library. use g instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2009/11/mw-printing-variables-to-growl-using-meow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop installing rubygems to your home directory when you don&#8217;t &#8220;sudo&#8221;</title>
		<link>http://www.nicecabbage.com/2009/08/stop-installing-rubygems-to-your-home-directory-when-you-dont-sudo/</link>
		<comments>http://www.nicecabbage.com/2009/08/stop-installing-rubygems-to-your-home-directory-when-you-dont-sudo/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 03:01:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TechTips]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubygems]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=153</guid>
		<description><![CDATA[Problem
You don&#8217;t want to install rubygems under your home direcotry(~/.gem/ruby/1.x/) when you just forgot to &#8220;sudo&#8221; and don&#8217;t have right permissions to write to system directories. 
Solution
First, You need to install rubygems newer than 1.3.2. To check the version, type as


gem -v
1.3.1


To update your gems itself, type as


sudo gem update --system

 Next, you need to [...]]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p>You don&#8217;t want to install rubygems under your home direcotry(~/.gem/ruby/1.x/) when you just forgot to &#8220;sudo&#8221; and don&#8217;t have right permissions to write to system directories. </p>
<h2>Solution</h2>
<p>First, You need to install rubygems newer than 1.3.2. To check the version, type as
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gem <span style="color: #660033;">-v</span>
1.3.1</pre></div></div>

<p>
To update your gems itself, type as
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem update <span style="color: #660033;">--system</span></pre></div></div>

<p> Next, you need to edit your ~/.gemrc file. Add </p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">gem:  --no-user-install</pre></div></div>

<p>
at the bottom of the file.
</p>
<p>
Now, if you forgot to &#8220;sudo&#8221; when installing new rubygems, gem will simply fail with permission erros, like
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">tomoya<span style="color: #000000; font-weight: bold;">@</span>hongkong<span style="color: #000000; font-weight: bold;">%</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> sequel
ERROR:  While executing gem ... <span style="color: #7a0874; font-weight: bold;">&#40;</span>Gem::FilePermissionError<span style="color: #7a0874; font-weight: bold;">&#41;</span>
    You don<span style="color: #ff0000;">'t have write permissions into the /opt/local/lib/ruby/gems/1.8 directory.</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2009/08/stop-installing-rubygems-to-your-home-directory-when-you-dont-sudo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gisty for gist and gisty for Ruby1.9.1</title>
		<link>http://www.nicecabbage.com/2009/06/gisty-for-gist-and-gisty-for-ruby1-9-1/</link>
		<comments>http://www.nicecabbage.com/2009/06/gisty-for-gist-and-gisty-for-ruby1-9-1/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 07:30:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[TechTips]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubygems]]></category>

		<guid isPermaLink="false">http://www.nicecabbage.com/?p=76</guid>
		<description><![CDATA[Introduction

gist is a simple web service by github for posting and sharing your cool code snippets. gisty is a command-line client for gist.

Installation of gisty

sudo gem install nokogiri
sudo gem sources -a http://gems.github.com
sudo gem install swdyh-gisty

Usage

 Posting a source code is as easy as


 gisty post hello.c world.c


 Also, you can &#8216;clone&#8217; all your code snippets.


 [...]]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>
<a href='http://gist.github.com'>gist</a> is a simple web service by github for posting and sharing your cool code snippets. <a href="">gisty</a> is a command-line client for gist.
</p>
<h2>Installation of gisty</h2>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> nokogiri
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gem sources <span style="color: #660033;">-a</span> http:<span style="color: #000000; font-weight: bold;">//</span>gems.github.com
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> swdyh-gisty</pre></div></div>

<h2>Usage</h2>
<p>
 Posting a source code is as easy as
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> gisty post hello.c world.c</pre></div></div>

<p>
 Also, you can &#8216;clone&#8217; all your code snippets.
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> gisty <span style="color: #c20cb9; font-weight: bold;">sync</span></pre></div></div>

<p>
For more information, type
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> gisty <span style="color: #7a0874; font-weight: bold;">help</span></pre></div></div>

<p><br/><br />
<br/><br />
And the problem is&#8230;</p>
<h2>Problem</h2>
<p>
gisty does not work with Ruby1.9.1.
</p>
<h2>Solution</h2>
<p>
I made a forked version of gisty on <a href=''http://github.com/tomoya55/gisty/tree/master">github repos</a>. Soon, you will be able to download this version
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> tomoya55-gisty</pre></div></div>

<p>
Notice: you cannot install tomoya55-gisty at this moment. I am now investigating what is going on on my gems. Thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nicecabbage.com/2009/06/gisty-for-gist-and-gisty-for-ruby1-9-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
