<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>cyzgbw (Overlord)</title>
    <link>https://ruby-china.org/cyzgbw</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>更新代码后本地代码丢失</title>
      <description>&lt;p&gt;本地用 rubymine 开发，并未提交，从 oschina 的 git 更新其他人代码的时候执行 update project，update type 选择的是 Branch Default，clean working tree brfore update 选择的是 using stash，结果更新后本地修改的代码全部被覆盖为 git 上面的原始代码了，请问这个还有救没有，能否恢复 update 之前的代码？不然只有全部重新写一遍了。&lt;/p&gt;</description>
      <author>cyzgbw</author>
      <pubDate>Mon, 07 Dec 2015 11:56:02 +0800</pubDate>
      <link>https://ruby-china.org/topics/28297</link>
      <guid>https://ruby-china.org/topics/28297</guid>
    </item>
    <item>
      <title>public 中的中文静态资源获取失败</title>
      <description>&lt;p&gt;rails4.0.2，在 public 文件夹下面有中文文件，在开发环境中通过 url 获取此中文文件失败，换成英文则正常，使用的是 rails 自带服务器，请问这里的中文静态资源如何获取，谢谢。&lt;/p&gt;</description>
      <author>cyzgbw</author>
      <pubDate>Sat, 18 Apr 2015 01:16:45 +0800</pubDate>
      <link>https://ruby-china.org/topics/25186</link>
      <guid>https://ruby-china.org/topics/25186</guid>
    </item>
    <item>
      <title>rails 在 windows 平台下如何实现后台运行</title>
      <description>&lt;p&gt;我知道在 linux 下用 rails s -d 就可以实现后台运行了，但是如今只有 windows 服务器（这个没得法），执行 rails s -d 就会出现 daemon() function is unimplemented on this machine 的错误，不知道大家有没有解决过这一类的问题，或者有其他服务器程序的配置方法，麻烦告诉我一下，万分感谢&lt;/p&gt;</description>
      <author>cyzgbw</author>
      <pubDate>Wed, 13 Nov 2013 17:05:41 +0800</pubDate>
      <link>https://ruby-china.org/topics/15519</link>
      <guid>https://ruby-china.org/topics/15519</guid>
    </item>
    <item>
      <title>mysql 数据库 could not obtain a database connection</title>
      <description>&lt;p&gt;采用 rails 默认的数据库配置配置&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;production:
  adapter: mysql2
  encoding: utf8
  database: TaskSystem_development
  pool: 8
  username: root
  password: XXX
  host: localhost
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;运行一段时间后就出现&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ctiveRecord::ConnectionTimeoutError (could not obtain a database connection within 5.000 seconds (waited 5.000 seconds)):
  activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `block in wait_poll'
  activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `loop'
  activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `wait_poll'
  activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:136:in `block in poll'
  e:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;上网搜索有的说是 pool 加大，但是加大后还是会出现这个情况，有没有人遇到过这个情况，求助！&lt;/p&gt;</description>
      <author>cyzgbw</author>
      <pubDate>Thu, 07 Nov 2013 10:24:14 +0800</pubDate>
      <link>https://ruby-china.org/topics/15363</link>
      <guid>https://ruby-china.org/topics/15363</guid>
    </item>
    <item>
      <title>Ubuntu12 中 Apache 部署 rails4 出现 403 错误</title>
      <description>&lt;p&gt;我在用 apache 在 ubuntu12.04 上来部署 rails4.0 项目的时候，启动 rails 后通过浏览器访问总是 403 错误，我 google 了很多解决方案，大多数是说在配置中加入 Allow from all 即可，但是我在使用后并不能成功，大家有没有遇到相关的情况，是怎么解决的啊&lt;/p&gt;</description>
      <author>cyzgbw</author>
      <pubDate>Mon, 21 Oct 2013 17:26:29 +0800</pubDate>
      <link>https://ruby-china.org/topics/14915</link>
      <guid>https://ruby-china.org/topics/14915</guid>
    </item>
    <item>
      <title>assets:precompile 中引用其他 gem 中 js 的问题</title>
      <description>&lt;p&gt;我在执行 rake assets:precompile 的时候，发现如果在 application.js 中 require 了一些 gem 中的 js 文件，就会出现&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;rake&lt;/span&gt; &lt;span class="n"&gt;aborted!&lt;/span&gt;
&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\xBE\xDC&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="no"&gt;UTF&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="no"&gt;LE&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这样的错误，我搜索了半天看那个 js 里面也没有什么异常的，有么有哪位朋友遇到过啊？&lt;/p&gt;</description>
      <author>cyzgbw</author>
      <pubDate>Wed, 25 Sep 2013 13:14:06 +0800</pubDate>
      <link>https://ruby-china.org/topics/14379</link>
      <guid>https://ruby-china.org/topics/14379</guid>
    </item>
    <item>
      <title>Production 中 js 和 css 文件的处理</title>
      <description>&lt;p&gt;以前用 j2ee 开发，很多页面都是自己特有的 js 和 css 文件，换成 ror 开发之后，在开发模式下每个页面单独应用自己的的 coffee 文件和 scss 文件都没事，问题是一旦换成 production 模式后就出大问题了，assets:precompile 会把 application.js 引用的压缩成一个文件，这个对于 gem 中的 js 文件用起来很好，但是我们自己写的很多 coffee.js 不能全部压缩整合到一个文件中，只能是不同的页面引用不同的文件，而引用的话在 public 中又找不到，请问这个该如何是好？
请问大家是如何处理这些问题的？&lt;/p&gt;</description>
      <author>cyzgbw</author>
      <pubDate>Wed, 25 Sep 2013 10:24:28 +0800</pubDate>
      <link>https://ruby-china.org/topics/14374</link>
      <guid>https://ruby-china.org/topics/14374</guid>
    </item>
    <item>
      <title>请问 Application 路由应该如何写</title>
      <description>&lt;p&gt;我写了一个 Admin::ApplicationController &amp;lt; ApplicationController，用于后台管理的页面继承，在生成一个 controller 继承自 admin(Admin::OrganizationsController &amp;lt; Admin::ApplicationController),在路由中配置&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;namespace&lt;/span&gt; &lt;span class="ss"&gt;:admin&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
    &lt;span class="n"&gt;resources&lt;/span&gt; &lt;span class="ss"&gt;:organizations&lt;/span&gt; 
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;但是在浏览器中访问/admin/organizations 的时候没有进入
我估计是在路由配置上出了问题，请问这里的路由该如何配置啊？&lt;/p&gt;</description>
      <author>cyzgbw</author>
      <pubDate>Mon, 13 May 2013 10:11:18 +0800</pubDate>
      <link>https://ruby-china.org/topics/10933</link>
      <guid>https://ruby-china.org/topics/10933</guid>
    </item>
  </channel>
</rss>
