<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>xranthoar (xranthoar)</title>
    <link>https://ruby-china.org/xranthoar</link>
    <description/>
    <language>en-us</language>
    <item>
      <title>我有一台 $10/mo 的 linode，可以干什么好玩的</title>
      <description>&lt;p&gt;最近无聊租了一台 $10 的 linode，各位平时都用他玩什么呢，有什么好玩的请推荐一下！&lt;/p&gt;

&lt;p&gt;ps，东京节点&lt;/p&gt;</description>
      <author>xranthoar</author>
      <pubDate>Fri, 25 Jul 2014 05:01:27 +0800</pubDate>
      <link>https://ruby-china.org/topics/20662</link>
      <guid>https://ruby-china.org/topics/20662</guid>
    </item>
    <item>
      <title>Ryan Bates 怎么了</title>
      <description>&lt;p&gt;众所周知，Railscasts 已经三四个月没有更新了，Ryan Bates 这是怎么了。。遭遇了什么困难吗&lt;/p&gt;</description>
      <author>xranthoar</author>
      <pubDate>Thu, 03 Oct 2013 14:54:58 +0800</pubDate>
      <link>https://ruby-china.org/topics/14515</link>
      <guid>https://ruby-china.org/topics/14515</guid>
    </item>
    <item>
      <title>使用腾讯企业邮箱如何设置 action_mailer</title>
      <description>&lt;p&gt;现在项目中是这么配置的&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;action_mailer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;smtp_settings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="ss"&gt;address: &lt;/span&gt;&lt;span class="s1"&gt;'smtp.exmail.qq.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="ss"&gt;port: &lt;/span&gt;&lt;span class="mi"&gt;465&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="ss"&gt;domain: &lt;/span&gt;&lt;span class="s1"&gt;'example.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="ss"&gt;user_name: &lt;/span&gt;&lt;span class="s1"&gt;'xx@yy.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="ss"&gt;password: &lt;/span&gt;&lt;span class="s1"&gt;'secret'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="ss"&gt;authentication: &lt;/span&gt;&lt;span class="s1"&gt;'plain'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="ss"&gt;enable_starttls_auto: &lt;/span&gt;&lt;span class="kp"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;但是发送邮件时报错
&lt;code&gt;Net::ReadTimeout: Net::ReadTimeout&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;各位有使用腾讯企业邮箱配置 action_mailer 的经验吗？谢谢！&lt;/p&gt;</description>
      <author>xranthoar</author>
      <pubDate>Tue, 01 Oct 2013 15:12:05 +0800</pubDate>
      <link>https://ruby-china.org/topics/14497</link>
      <guid>https://ruby-china.org/topics/14497</guid>
    </item>
    <item>
      <title>存在已有的 Rails 和国内 CDN (阿里云，又拍云) 进行 assets 托管的方案吗？</title>
      <description>&lt;p&gt;如题~&lt;/p&gt;

&lt;p&gt;记得以前 ruby-china 是放在又拍上的？&lt;/p&gt;</description>
      <author>xranthoar</author>
      <pubDate>Sun, 01 Sep 2013 09:15:48 +0800</pubDate>
      <link>https://ruby-china.org/topics/13793</link>
      <guid>https://ruby-china.org/topics/13793</guid>
    </item>
    <item>
      <title>Mongodb 的 profiler</title>
      <description>&lt;p&gt;众所周知，rails 的 profiler 都会关注 sql 语句的执行时间，并且有专门监测是否有需要做 includes 和 join 的工具，那么对于基于 mongodb 的 app（并且用 mongoid 做 orm）&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;有没有好的 profiler&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;mongodb 一般能做什么性能调优？&lt;code&gt;tricks&lt;/code&gt; or &lt;code&gt;articles&lt;/code&gt;？&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <author>xranthoar</author>
      <pubDate>Tue, 02 Apr 2013 12:07:59 +0800</pubDate>
      <link>https://ruby-china.org/topics/9919</link>
      <guid>https://ruby-china.org/topics/9919</guid>
    </item>
    <item>
      <title>关于 precompile</title>
      <description>&lt;p&gt;有时候引用了一些外来的 assets 库，precompile 之后会产生大量的文件，这时候如果仅仅对 assets 做了一点很小的更改也需要重新 precompile，有没有指定仅仅 compile 一部分 assets 的办法呢？特别是当 assets 由 cdn 来服务的时候，要用 ftp 同步会很浪费时间。谢谢各位回答&lt;/p&gt;</description>
      <author>xranthoar</author>
      <pubDate>Fri, 30 Nov 2012 11:44:22 +0800</pubDate>
      <link>https://ruby-china.org/topics/7216</link>
      <guid>https://ruby-china.org/topics/7216</guid>
    </item>
    <item>
      <title>html 邮件中的 asset 问题</title>
      <description>&lt;p&gt;在邮件中用 &lt;code&gt;asset_path("xxx.png")&lt;/code&gt;，在邮件中的 css 中用 &lt;code&gt;background-image: url(asset_path("xxx.png"))&lt;/code&gt; 貌似得到的东西都不太对，前一种情况得到的是非 url 的相对地址，后者得到的是 &lt;code&gt;background-image: none;&lt;/code&gt;，一般在邮件中使用 asset 都是怎么引用的呢？&lt;/p&gt;</description>
      <author>xranthoar</author>
      <pubDate>Mon, 26 Nov 2012 20:09:43 +0800</pubDate>
      <link>https://ruby-china.org/topics/7110</link>
      <guid>https://ruby-china.org/topics/7110</guid>
    </item>
    <item>
      <title>有什么适用于人人网验证登陆的 gem 或方法吗</title>
      <description>&lt;p&gt;如题，有无类似于 omniauth-weibo 的 gem，或者有什么可行的解决方案？&lt;/p&gt;</description>
      <author>xranthoar</author>
      <pubDate>Thu, 06 Sep 2012 16:57:49 +0800</pubDate>
      <link>https://ruby-china.org/topics/5395</link>
      <guid>https://ruby-china.org/topics/5395</guid>
    </item>
    <item>
      <title>推荐一些比较好的 iOS 开发社区吧</title>
      <description>&lt;p&gt;rt~&lt;/p&gt;

&lt;p&gt;谢谢各位  &lt;/p&gt;</description>
      <author>xranthoar</author>
      <pubDate>Mon, 09 Jul 2012 19:09:36 +0800</pubDate>
      <link>https://ruby-china.org/topics/4211</link>
      <guid>https://ruby-china.org/topics/4211</guid>
    </item>
    <item>
      <title>Ruby 开发大型软件的能力如何？</title>
      <description>&lt;p&gt;Ruby 在处理轻量型的东西的时候感觉得心应手手感非常的好，但是在遇到一些复杂的产品的时候它也能够伸展自如吗？从性能，平台性和团队开发（我想大应用应该都是军团作战吧）的效率来说，Ruby 的潜力如何。&lt;/p&gt;

&lt;p&gt;所谓大应用指的一些专业的软件，包括科研软件、企业级软件等等。&lt;/p&gt;

&lt;p&gt;用比较俗的说法来说，能媲美 Java 等语言吗。&lt;/p&gt;

&lt;p&gt;（... 提一点小疑问，Ruby 新手一只..不过反而是新手才喜欢问这些问题吧）  &lt;/p&gt;</description>
      <author>xranthoar</author>
      <pubDate>Thu, 31 May 2012 13:02:16 +0800</pubDate>
      <link>https://ruby-china.org/topics/3575</link>
      <guid>https://ruby-china.org/topics/3575</guid>
    </item>
    <item>
      <title>问一个 ruby-china 的 notification 的效率问题</title>
      <description>&lt;p&gt;现在 ruby-china 的通知是一个单独的表，和用户做关联，基于通知多样性的原因用了一个叫做 Notification::Base 的基类，&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Notification::Base&lt;/span&gt;
  &lt;span class="kp"&gt;include&lt;/span&gt; &lt;span class="no"&gt;Mongoid&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Document&lt;/span&gt;
  &lt;span class="kp"&gt;include&lt;/span&gt; &lt;span class="no"&gt;Mongoid&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Timestamps&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Created&lt;/span&gt;
  &lt;span class="kp"&gt;include&lt;/span&gt; &lt;span class="no"&gt;Mongoid&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;BaseModel&lt;/span&gt;
  &lt;span class="c1"&gt;# ...&lt;/span&gt;
  &lt;span class="n"&gt;belongs_to&lt;/span&gt; &lt;span class="ss"&gt;:user&lt;/span&gt;
  &lt;span class="c1"&gt;# ...&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;另外一种比较常见的处理方法是 embed 在 user 里，后者的查询时间是 O(1) 的，前者会随着表的增大速度变慢，ruby-china 有否考虑过这点，有考虑 ? 如何考虑的 : 考虑一下吧。
&lt;a href="/huacnlee" class="user-mention" title="@huacnlee"&gt;&lt;i&gt;@&lt;/i&gt;huacnlee&lt;/a&gt;  &lt;/p&gt;</description>
      <author>xranthoar</author>
      <pubDate>Sat, 26 May 2012 18:35:09 +0800</pubDate>
      <link>https://ruby-china.org/topics/3501</link>
      <guid>https://ruby-china.org/topics/3501</guid>
    </item>
    <item>
      <title>mongoid 怎么实现对多的单向多态？</title>
      <description>&lt;p&gt;也就是实现一个 A  指向许多个 B 并且这种关系是多态的，但不需要 B 这一边和 A 建立关系，开发中遇到的问题是这样的。为了收集消息 (Notification, embed 在 User 或 Organization 里) 发送的情况，建立了一个名为 NotifRecord 的表：&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;NotifRecord&lt;/span&gt;
  &lt;span class="kp"&gt;include&lt;/span&gt; &lt;span class="no"&gt;Mongoid&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Document&lt;/span&gt;
  &lt;span class="kp"&gt;include&lt;/span&gt; &lt;span class="no"&gt;Mongoid&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Timestamps&lt;/span&gt;

  &lt;span class="n"&gt;field&lt;/span&gt; &lt;span class="ss"&gt;:content&lt;/span&gt;
  &lt;span class="n"&gt;field&lt;/span&gt; &lt;span class="ss"&gt;:type&lt;/span&gt;

  &lt;span class="n"&gt;belongs_to&lt;/span&gt; &lt;span class="ss"&gt;:notifier&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;polymorphic: &lt;/span&gt;&lt;span class="kp"&gt;true&lt;/span&gt;
  &lt;span class="n"&gt;has_many&lt;/span&gt; &lt;span class="ss"&gt;:to_notify_orgs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;inverse_of: &lt;/span&gt;&lt;span class="kp"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;class_name: &lt;/span&gt;&lt;span class="s1"&gt;'User'&lt;/span&gt;
  &lt;span class="n"&gt;has_many&lt;/span&gt; &lt;span class="ss"&gt;:to_notify_users&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;inverse_of: &lt;/span&gt;&lt;span class="kp"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;class_name: &lt;/span&gt;&lt;span class="s1"&gt;'Organization'&lt;/span&gt;
  &lt;span class="n"&gt;has_many&lt;/span&gt; &lt;span class="ss"&gt;:read_by_users&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;inverse_of: &lt;/span&gt;&lt;span class="kp"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;class_name: &lt;/span&gt;&lt;span class="s1"&gt;'User'&lt;/span&gt;
  &lt;span class="n"&gt;has_many&lt;/span&gt; &lt;span class="ss"&gt;:read_by_orgs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;inverse_of: &lt;/span&gt;&lt;span class="kp"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;class_name: &lt;/span&gt;&lt;span class="s1"&gt;'Organization'&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;想让其储存发通知的对象和已读通知的对象，在这里对象即可能是组织 (Organization) 也可能是用户 (User)，有什么办法实现 has_many :to_notify 和 has_many :read_by 而不用指定 class_name 呢？
谢谢解答  &lt;/p&gt;</description>
      <author>xranthoar</author>
      <pubDate>Mon, 21 May 2012 10:04:06 +0800</pubDate>
      <link>https://ruby-china.org/topics/3393</link>
      <guid>https://ruby-china.org/topics/3393</guid>
    </item>
    <item>
      <title>Bootstrap 对浏览器的支持问题</title>
      <description>&lt;p&gt;bootstrap 宣称对 modern browsers 都有很好的支持，但我觉得除了 chrome 和 safari 能完美以外其他的都不怎么能应付，有没有什么好的插件什么的东西（或者别的方式）增加浏览器的支持呢。。  &lt;/p&gt;</description>
      <author>xranthoar</author>
      <pubDate>Tue, 01 May 2012 16:29:30 +0800</pubDate>
      <link>https://ruby-china.org/topics/3009</link>
      <guid>https://ruby-china.org/topics/3009</guid>
    </item>
  </channel>
</rss>
