<?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>孙立文的博客 &#187; Ruby</title>
	<atom:link href="http://sunliwen.com/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://sunliwen.com</link>
	<description>Never lose my passion!</description>
	<lastBuildDate>Sat, 21 Jan 2012 05:16:52 +0000</lastBuildDate>
	<language>zh</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>在Cygwin中使用Ruby</title>
		<link>http://sunliwen.com/2008/12/ruby-on-cygwin/</link>
		<comments>http://sunliwen.com/2008/12/ruby-on-cygwin/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 09:27:26 +0000</pubDate>
		<dc:creator>Liwen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Cygwin]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://thinklouder.cn/?p=423</guid>
		<description><![CDATA[通过Cygwin的Setup工具安装的ruby没有包含rubygems，需要手动下载安装。 可放在/cygwin/home/user,并通过下面的命令安装。 ruby setup.rb 测试一下rubygems是否成功安装：以rake为例 sudo gem install rake 如直接访问抛出错误信息，通常设置代理后就可以顺利安装。 ERROR: http://gems.rubyforge.org/ does not appear to be a repository ERROR: could not find gem rake locally or in a repository set HTTP_PROXY=http://proxy.abc.com:8008 sudo gem install rake Successfully installed rake-0.8.3 1 gem installed Installing ri documentation for rake-0.8.3... Installing RDoc documentation for rake-0.8.3... 至此Ruby环境已安装成功。 ========== 如果在Cygwin中安装rubygems之前装过One-Click [...]]]></description>
			<content:encoded><![CDATA[<p>通过<a href="http://en.wikipedia.org/wiki/Cygwin">Cygwin</a>的<a href="http://www.cygwin.com/setup.exe">Setup</a>工具安装的ruby没有包含rubygems，需要手动<a href="http://rubyforge.org/projects/rubygems/">下载</a>安装。<br />
可放在/cygwin/home/user,并通过下面的命令安装。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ruby setup.rb</pre></div></div>

<p>测试一下rubygems是否成功安装：以<a href="http://rake.rubyforge.org">rake</a>为例</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> rake</pre></div></div>

<p>如直接访问抛出错误信息，通常设置代理后就可以顺利安装。</p>
<pre>
ERROR:  http://gems.rubyforge.org/ does not appear to be a repository
ERROR:  could not find gem rake locally or in a repository
</pre>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">HTTP_PROXY</span>=http:<span style="color: #000000; font-weight: bold;">//</span>proxy.abc.com:<span style="color: #000000;">8008</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> rake</pre></div></div>

<pre>
Successfully installed rake-0.8.3
1 gem installed
Installing ri documentation for rake-0.8.3...
Installing RDoc documentation for rake-0.8.3...
</pre>
<p>至此Ruby环境已安装成功。</p>
<p>==========</p>
<p>如果在Cygwin中安装rubygems之前装过One-Click Ruby Installer，可能会遇到环境变量的问题。请看<a href="http://www.pluitsolutions.com/2006/03/30/install-ruby-on-rails-ror-on-cygwin/">Pluit</a>的解决方案。</p>
<div style=float:left><!-- JiaThis Button BEGIN -->
<div id="ckepop">
	<a class="jiathis_button_tsina"></a>
	<a class="jiathis_button_douban"></a>
	<a class="jiathis_button_instapaper"></a>
	<a class="jiathis_button_stubleupon"></a>
	<a href="http://www.jiathis.com/share?uid=1544311" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
	<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript">var jiathis_config = {data_track_clickback:true};</script>
<script type="text/javascript" src="http://v2.jiathis.com/code_mini/jia.js?uid=1544311" charset="utf-8"></script>
<!-- JiaThis Button END --></div><hr />
<p>
<small>
Tags: <a href="http://sunliwen.com/tag/cygwin/" rel="tag">Cygwin</a>, <a href="http://sunliwen.com/tag/ruby/" rel="tag">Ruby</a><br/>
<a href="http://sunliwen.com/2008/12/ruby-on-cygwin/#comments-heading">没有评论</a>
</small>
</p>]]></content:encoded>
			<wfw:commentRss>http://sunliwen.com/2008/12/ruby-on-cygwin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

