<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>plasmiq</title>
    <link>https://ruby-china.org/plasmiq</link>
    <description/>
    <language>en-us</language>
    <item>
      <title>&lt;&lt; 在这里是什么意思？</title>
      <description>&lt;p&gt;这段代码看不懂&lt;/p&gt;

&lt;p&gt;a = "test"
a.freeze
a &amp;lt;&amp;lt; "a" # 修改 a 会出现 TypeError&lt;/p&gt;

&lt;p&gt;"&amp;lt;&amp;lt;"不是向数组中增加元素用的么，这里是什么意思啊？&lt;/p&gt;

&lt;p&gt;p.s.
有没有 ruby 语法的速查手册啊，直接按字母顺序排的，像词典一样？&lt;/p&gt;</description>
      <author>plasmiq</author>
      <pubDate>Wed, 27 Feb 2013 09:43:29 +0800</pubDate>
      <link>https://ruby-china.org/topics/8961</link>
      <guid>https://ruby-china.org/topics/8961</guid>
    </item>
    <item>
      <title>有谁在 CentOS 上布署过 RoR 么？</title>
      <description>&lt;p&gt;参考了这个流程 &lt;a href="http://blog.csdn.net/g599351300/article/details/7635411" rel="nofollow" target="_blank"&gt;http://blog.csdn.net/g599351300/article/details/7635411&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;文章中提到两种安装 libyaml 的方法，在 centos 下都不管用：
（1）直接 tar xzvf yaml-0.1.4.tar.gz 时，安装配置一切正常，Rails -v 也显示 rails 配置成功（Rails 3.2.11）
但真正使用 rails new 命令建立第一个框架时却提示没有 libyaml: 
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.&lt;/p&gt;

&lt;p&gt;（2）用 yum install libyaml-dev 指令时会提示没有 libyaml-dev 包&lt;/p&gt;</description>
      <author>plasmiq</author>
      <pubDate>Fri, 08 Feb 2013 22:12:45 +0800</pubDate>
      <link>https://ruby-china.org/topics/8653</link>
      <guid>https://ruby-china.org/topics/8653</guid>
    </item>
    <item>
      <title>初次使用 Heroku，求救</title>
      <description>&lt;p&gt;Heroku 的文档怎么也看不懂，求救：
&lt;a href="https://devcenter.heroku.com/articles/rails3#local-workstation-setup" rel="nofollow" target="_blank"&gt;https://devcenter.heroku.com/articles/rails3#local-workstation-setup&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;——————————————————————————
Write your app&lt;/p&gt;

&lt;p&gt;You may be starting from an existing app. If not, a vanilla Rails 3 app will serve as a suitable sample app:
……
——————————————————————————&lt;/p&gt;

&lt;p&gt;这一段完全没说究竟这段代码应该写在哪个目录下的哪个文件里，后面直接一句
git push heroku master
就把代码给 push 上去了，完全看不懂怎么操作，皑皑&lt;/p&gt;</description>
      <author>plasmiq</author>
      <pubDate>Mon, 04 Feb 2013 01:45:41 +0800</pubDate>
      <link>https://ruby-china.org/topics/8585</link>
      <guid>https://ruby-china.org/topics/8585</guid>
    </item>
    <item>
      <title>Ruby China 有手机 app 么？</title>
      <description>&lt;p&gt;想没事的时候就用手机刷刷&lt;/p&gt;</description>
      <author>plasmiq</author>
      <pubDate>Sun, 16 Dec 2012 22:48:52 +0800</pubDate>
      <link>https://ruby-china.org/topics/7617</link>
      <guid>https://ruby-china.org/topics/7617</guid>
    </item>
    <item>
      <title>小白想写一个伪 twitter 的程序，求最简代码</title>
      <description>&lt;p&gt;需求很简单，注册用户可以发布一行文字，其他注册用户可以订阅。据说 Ruby 的库里有现成的模板，这种程序可以几分钟写好？&lt;/p&gt;

&lt;p&gt;前几天小白在傻乎乎地一页页啃教科书……现在想还是得学以致用，求实现这一功能的最简代码实例。&lt;/p&gt;</description>
      <author>plasmiq</author>
      <pubDate>Sun, 16 Dec 2012 14:52:19 +0800</pubDate>
      <link>https://ruby-china.org/topics/7606</link>
      <guid>https://ruby-china.org/topics/7606</guid>
    </item>
    <item>
      <title>ruby 面向对象，只有 method 没有 property，那这段代码怎么理解？</title>
      <description>&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;favorites&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="ss"&gt;:composer&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"Brahms"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:painter&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"Van Gogh"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:comedian&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"Groucho"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;1 composer 是什么冬冬？
2 ruby 执行这段代码时，究竟做了什么？&lt;/p&gt;</description>
      <author>plasmiq</author>
      <pubDate>Thu, 06 Dec 2012 10:34:48 +0800</pubDate>
      <link>https://ruby-china.org/topics/7359</link>
      <guid>https://ruby-china.org/topics/7359</guid>
    </item>
    <item>
      <title>s =~ /(.)\1/</title>
      <description>&lt;p&gt;s =~ /(.)\1/ # look for a double letter&lt;/p&gt;

&lt;p&gt;这段咋理解啊，直接 Orz 了……&lt;/p&gt;</description>
      <author>plasmiq</author>
      <pubDate>Wed, 05 Dec 2012 01:40:06 +0800</pubDate>
      <link>https://ruby-china.org/topics/7316</link>
      <guid>https://ruby-china.org/topics/7316</guid>
    </item>
    <item>
      <title>有没有简洁使用的 Ruby 语法手册？</title>
      <description>&lt;p&gt;需要两种：&lt;/p&gt;

&lt;p&gt;1 字典式的，遇到看不懂的就可以查
2 微博式的，每天看两条&lt;/p&gt;</description>
      <author>plasmiq</author>
      <pubDate>Wed, 05 Dec 2012 01:38:29 +0800</pubDate>
      <link>https://ruby-china.org/topics/7314</link>
      <guid>https://ruby-china.org/topics/7314</guid>
    </item>
    <item>
      <title>求解：关于空格</title>
      <description>&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Dog
  def name
    @name ||= "Fido"
  end
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;正常，但如果在||和=之间插入一个空格，系统就报错。Ruby 什么时候可以插空格，什么时候不可以？&lt;/p&gt;</description>
      <author>plasmiq</author>
      <pubDate>Tue, 04 Dec 2012 00:53:43 +0800</pubDate>
      <link>https://ruby-china.org/topics/7283</link>
      <guid>https://ruby-china.org/topics/7283</guid>
    </item>
    <item>
      <title>求解：stack level too deep</title>
      <description>&lt;p&gt;是何道理？&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def f(x)
  if x == 0 
    f(x)==0     #  return 0
  else
    f(x)==1     #  return 1
  end
end

puts "x="
x=gets().to_i
print f(x)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;执行报错：stack level too deep&lt;/p&gt;

&lt;p&gt;如果按注释中的写法，则没问题。&lt;/p&gt;</description>
      <author>plasmiq</author>
      <pubDate>Sat, 24 Nov 2012 00:53:16 +0800</pubDate>
      <link>https://ruby-china.org/topics/7056</link>
      <guid>https://ruby-china.org/topics/7056</guid>
    </item>
    <item>
      <title>求解：comparison of String with 0 failed (ArgumentError)</title>
      <description>&lt;p&gt;def f(x)
 if x &amp;gt;0
  return x
 else
  return -x
 end
end&lt;/p&gt;

&lt;p&gt;print "x="
x=gets()
puts f(x)&lt;/p&gt;

&lt;p&gt;运行，提示"x="
输入任何值返回都是第二行错误：comparison of String with 0 failed (ArgumentError)&lt;/p&gt;

&lt;p&gt;求解&lt;/p&gt;</description>
      <author>plasmiq</author>
      <pubDate>Sat, 24 Nov 2012 00:24:03 +0800</pubDate>
      <link>https://ruby-china.org/topics/7055</link>
      <guid>https://ruby-china.org/topics/7055</guid>
    </item>
  </channel>
</rss>
