<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>verfino (helix-dan)</title>
    <link>https://ruby-china.org/verfino</link>
    <description>大一时刚学习上网下X片,下了一个叫ruby.rmvb的文件,打开看发现是ruby的视频教程,于是就学会了ruby</description>
    <language>en-us</language>
    <item>
      <title>Gollum 编辑保存报错</title>
      <description>&lt;p&gt;具体错误信息是这样
&lt;code&gt;Encoding::CompatibilityError - incompatible character encodings: UTF-8 and ASCII-8BIT:&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;系统是 &lt;code&gt;OS X&lt;/code&gt;
Ruby 版本 不论是 &lt;code&gt;1.9.3-p*&lt;/code&gt; 还是 &lt;code&gt;2.*&lt;/code&gt; 都不行
Gemfile 里面只有&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gem 'thin'
gem 'gollum'
gem 'creole'
gem 'redcarpet'
gem 'org-ruby'
gem 'wikicloth'
gem 'RedCloth'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;即使是重新搭建一个空的环境也是这样。换过几台机器（同样都是 OS X）也没办法解决。有遇到并且解决过的吗？&lt;/p&gt;

&lt;p&gt;今天下午再搞不定怕是要弄个新东西代替 Gollum 了。&lt;/p&gt;</description>
      <author>verfino</author>
      <pubDate>Thu, 12 Jun 2014 13:45:19 +0800</pubDate>
      <link>https://ruby-china.org/topics/19899</link>
      <guid>https://ruby-china.org/topics/19899</guid>
    </item>
    <item>
      <title>当在 Rails 中使用了 establish_connection 的时候，data query cache not work</title>
      <description>&lt;p&gt;大家有遇到过这种情况吗？&lt;/p&gt;

&lt;p&gt;当你使用了 establish_connection 的时候 查询是这样的
Model:
&lt;img src="//l.ruby-china.com/photo/5b10ed29c27093ad034ca98896dfae53.png" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;Log:这时候的缓存没有开启（因为你使用了 establish connection）
&lt;img src="//l.ruby-china.com/photo/474b4161b950c88a11bb46e5c0502697.png" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;接下来 google 来的方法，加入某句 cache 就可以 工作
Model:
&lt;img src="//l.ruby-china.com/photo/10992bfc1ea26d541c5f6d35e7672130.png" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;Log:(期待的事情发生了，cache 工作了)
&lt;img src="//l.ruby-china.com/photo/5ed7eab58b51e0a7374ca184f4622fc3.png" title="" alt=""&gt;
.
.
.
但是不如意的事情来了，当你的 request 再发送一次
Log:
&lt;img src="//l.ruby-china.com/photo/5392b4f3032ca275fb2fb1934d3f60bb.png" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;竟然全被 cache 了。。。。。&lt;/p&gt;

&lt;p&gt;Orz  求解决方案&lt;/p&gt;

&lt;p&gt;=====================&lt;/p&gt;

&lt;p&gt;我暂时的解决方案是这样:
在每个要用到 cache 的地方  加这个。。。。
&lt;img src="//l.ruby-china.com/photo/4bbe477b364e1c2f3413ebeda17a3dfe.png" title="" alt=""&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;-但是这也太不友好了，有什么优雅的方法吗？&lt;/li&gt;
&lt;/ul&gt;</description>
      <author>verfino</author>
      <pubDate>Tue, 29 Oct 2013 21:50:04 +0800</pubDate>
      <link>https://ruby-china.org/topics/15133</link>
      <guid>https://ruby-china.org/topics/15133</guid>
    </item>
    <item>
      <title>跨数据库的 JOINS 语法怎么个写法？？</title>
      <description>&lt;p&gt;&lt;img src="//l.ruby-china.com/photo/cb21546ba04b78ac8bae01a2c5a69a37.png" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;如图，forum_check_posts 跟 forum_posts 两张表不在同一个数据库中，甚至不在一个服务器上&lt;/p&gt;</description>
      <author>verfino</author>
      <pubDate>Wed, 16 Oct 2013 15:37:33 +0800</pubDate>
      <link>https://ruby-china.org/topics/14796</link>
      <guid>https://ruby-china.org/topics/14796</guid>
    </item>
    <item>
      <title>Rails4 (或者 Ruby2) 是否与 thin (＋nginx) 存在兼容问题？？</title>
      <description>&lt;p&gt;用 nginx + thin 配置的 Rails4 + Ruby2.0&lt;/p&gt;

&lt;p&gt;&lt;img src="//l.ruby-china.com/photo/12de59ceb241896c2c249c233b32e504.png" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;上线后发现，系统使用十几分钟后，就会发现假死。&lt;/p&gt;

&lt;p&gt;nginx 的 error log 提示是一堆 timeout:
&lt;img src="//l.ruby-china.com/photo/c117a62b20a50f79ef2aaca9b8541c22.png" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;就像是 nginx 在等待 thin 给他一个返回结果，用来发送下一个 request 给 thin，但是 thin 确迟迟不动，按照 log 来看貌似是 upstream 挂了&lt;/p&gt;

&lt;p&gt;rails 的代码正常。&lt;/p&gt;

&lt;p&gt;已经很多天了，问题还是没得到解决，正想从 Rails4 降级回 Rails3，还是在社区里最后挣扎一下 Orz&lt;/p&gt;</description>
      <author>verfino</author>
      <pubDate>Fri, 11 Oct 2013 22:05:13 +0800</pubDate>
      <link>https://ruby-china.org/topics/14681</link>
      <guid>https://ruby-china.org/topics/14681</guid>
    </item>
    <item>
      <title>Rails4 中，同时操作多个数据库的问题</title>
      <description>&lt;p&gt;项目中设计到多个数据库，现在可以查询多个数据库中的内容。
但是 save/update 的时候，确报错。&lt;/p&gt;

&lt;p&gt;在项目中（Rails4）如何能做到修改多个数据库呢？&lt;/p&gt;

&lt;p&gt;google 了下答案，有个方法叫 delegates_connection_to，将其添加到 Model 中说是可以。
&lt;code&gt;delegates_connection_to :feedback_development, :on =&amp;gt; [:create, :save, :destroy]&lt;/code&gt;
但是试了下说是 no method found，不知道是不是 Rails4 有别的处理&lt;/p&gt;

&lt;p&gt;=============&lt;/p&gt;

&lt;p&gt;突然觉得这不是数据库链接的问题.....&lt;/p&gt;</description>
      <author>verfino</author>
      <pubDate>Sat, 17 Aug 2013 16:02:49 +0800</pubDate>
      <link>https://ruby-china.org/topics/13398</link>
      <guid>https://ruby-china.org/topics/13398</guid>
    </item>
    <item>
      <title>如何 (拥有权限) 删除在 Bitbucket.org 上项目的分支？</title>
      <description>&lt;p&gt;是不是只有 owner 才有权限删除分支？&lt;/p&gt;</description>
      <author>verfino</author>
      <pubDate>Thu, 15 Aug 2013 11:29:07 +0800</pubDate>
      <link>https://ruby-china.org/topics/13340</link>
      <guid>https://ruby-china.org/topics/13340</guid>
    </item>
    <item>
      <title>[已解决] bundle install 遇到问题 (nokogiri 的安装)</title>
      <description>&lt;p&gt;bundle install 的时候，在安装 nokogiri 的时候出现了问题&lt;/p&gt;

&lt;p&gt;libxml2 is missing.  please visit &lt;a href="http://nokogiri.org/tutorials/installing_nokogiri.html" rel="nofollow" target="_blank"&gt;http://nokogiri.org/tutorials/installing_nokogiri.html&lt;/a&gt; for help with installing dependencies.&lt;/p&gt;

&lt;p&gt;&lt;img src="//l.ruby-china.com/photo/883abf0288c7c0acf4a919f9764cb1ce.png" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;去 stack overflow 看了下&lt;/p&gt;

&lt;p&gt;主要是两种解决方案，尝试了下，均不可用&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; 很多朋友说有答案 &lt;a href="http://nokogiri.org/tutorials/installing_nokogiri.html" rel="nofollow" target="_blank"&gt;http://nokogiri.org/tutorials/installing_nokogiri.html&lt;/a&gt; 但这里压根打不开（已经开了代理）&lt;/li&gt;
&lt;li&gt;apt-get install libxslt-dev libxml2-dev  这种方法还是不可用&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;求助  求解决办法阿&lt;/p&gt;</description>
      <author>verfino</author>
      <pubDate>Tue, 04 Jun 2013 17:03:56 +0800</pubDate>
      <link>https://ruby-china.org/topics/11482</link>
      <guid>https://ruby-china.org/topics/11482</guid>
    </item>
    <item>
      <title>在 Ubuntu 上 编译安装了 Ruby 1.9.3 如何将其卸载？</title>
      <description>&lt;p&gt;由于 1.9.3 会导致一个暂时无法解决的问题，故装了 1.9.2 取代之&lt;/p&gt;

&lt;p&gt;现在在 Ubuntu 上有 2 个版本（1.9.2 和 1.9.3）&lt;/p&gt;

&lt;p&gt;1.9.3 是用 make install 安装的，现在如何将其卸载掉呢？&lt;/p&gt;

&lt;p&gt;（找不到安装路径啊）  &lt;/p&gt;</description>
      <author>verfino</author>
      <pubDate>Thu, 19 Jul 2012 15:38:45 +0800</pubDate>
      <link>https://ruby-china.org/topics/4419</link>
      <guid>https://ruby-china.org/topics/4419</guid>
    </item>
    <item>
      <title>要换公司了... Rails 招聘的话,还要写面试题目么?</title>
      <description>&lt;p&gt;第一份 ruby 的工作时去年 7 月了...公司给予一定的 RoR 培训的，当时的面试题是用 C 写的一些很简单的小题目，然后你了解 MVC 也就够了&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;-马上要换工作了  如今的 Rails 企业招聘，仅仅的聊聊代码不可以么？必须要做面试题才能工作么？&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;所以想知道题目都会出一些什么类型的啊？ &lt;/p&gt;</description>
      <author>verfino</author>
      <pubDate>Wed, 16 May 2012 16:29:59 +0800</pubDate>
      <link>https://ruby-china.org/topics/3316</link>
      <guid>https://ruby-china.org/topics/3316</guid>
    </item>
  </channel>
</rss>
