<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>firsthym (一鸣)</title>
    <link>https://ruby-china.org/firsthym</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>Sidekiq 无法发送邮件，报错 "Could not find a valid mapping for nil"</title>
      <description>&lt;p&gt;出错的地方时在 devise mapping.rb 42 行 find_scope! 函数，报错"Could not find a valid mapping for nil"。&lt;/p&gt;

&lt;p&gt;之前发邮件都比较正常，之后重启了服务器以后，就不行了。重启了 sidekiq 和 redis 都不行（rails app 也重启了）。&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;2014-02-14T08:16:05Z 7780 TID-1f987a Devise::Async::Backend::Sidekiq JID-324c8e8f1f9a74505782a33c INFO: start
2014-02-14T08:16:05Z 7780 TID-1f987a Devise::Async::Backend::Sidekiq JID-324c8e8f1f9a74505782a33c INFO: fail: 0.004 sec
2014-02-14T08:16:05Z 7780 TID-1f987a WARN: &lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"retry"&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;, &lt;span class="s2"&gt;"queue"&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;"mailer"&lt;/span&gt;, &lt;span class="s2"&gt;"class"&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;"Devise::Async::Backend::Sidekiq"&lt;/span&gt;, &lt;span class="s2"&gt;"args"&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;[&lt;/span&gt;&lt;span class="s2"&gt;"reset_password_instructions"&lt;/span&gt;, &lt;span class="s2"&gt;"User"&lt;/span&gt;, &lt;span class="s2"&gt;"5155441417f9233ae0000001"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;, &lt;span class="s2"&gt;"jid"&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;"324c8e8f1f9a74505782a33c"&lt;/span&gt;, &lt;span class="s2"&gt;"error_message"&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;"Could not find a valid mapping for nil"&lt;/span&gt;, &lt;span class="s2"&gt;"error_class"&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;"RuntimeError"&lt;/span&gt;, &lt;span class="s2"&gt;"failed_at"&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;"2014-02-14T07:30:15Z"&lt;/span&gt;, &lt;span class="s2"&gt;"retry_count"&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;7, &lt;span class="s2"&gt;"retried_at"&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;2014-02-14 08:16:05 UTC&lt;span class="o"&gt;}&lt;/span&gt;
2014-02-14T08:16:05Z 7780 TID-1f987a WARN: Could not find a valid mapping &lt;span class="k"&gt;for &lt;/span&gt;nil
2014-02-14T08:16:05Z 7780 TID-1f987a WARN: /usr/local/rvm/gems/ruby-1.9.3-p327/gems/devise-2.1.2/lib/devise/mapping.rb:42:in &lt;span class="sb"&gt;`&lt;/span&gt;find_scope!&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/devise-2.1.2/lib/devise/mailers/helpers.rb:20:in `initialize_from_record'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/devise-2.1.2/lib/devise/mailers/helpers.rb:15:in &lt;span class="sb"&gt;`&lt;/span&gt;devise_mail&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/devise-2.1.2/app/mailers/devise/mailer.rb:9:in `reset_password_instructions'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.5/lib/abstract_controller/base.rb:167:in &lt;span class="sb"&gt;`&lt;/span&gt;process_action&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.5/lib/abstract_controller/base.rb:121:in `process'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.5/lib/abstract_controller/rendering.rb:45:in &lt;span class="sb"&gt;`&lt;/span&gt;process&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/actionmailer-3.2.5/lib/action_mailer/base.rb:457:in `process'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/actionmailer-3.2.5/lib/action_mailer/base.rb:452:in &lt;span class="sb"&gt;`&lt;/span&gt;initialize&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/actionmailer-3.2.5/lib/action_mailer/base.rb:439:in `new'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/actionmailer-3.2.5/lib/action_mailer/base.rb:439:in &lt;span class="sb"&gt;`&lt;/span&gt;method_missing&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/devise-async-0.5.1/lib/devise/async/backend/base.rb:15:in `perform'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/processor.rb:49:in &lt;span class="sb"&gt;`&lt;/span&gt;block &lt;span class="o"&gt;(&lt;/span&gt;3 levels&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="k"&gt;in &lt;/span&gt;process&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/middleware/chain.rb:109:in `call'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/middleware/chain.rb:109:in &lt;span class="sb"&gt;`&lt;/span&gt;block &lt;span class="k"&gt;in &lt;/span&gt;invoke&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/middleware/server/timeout.rb:14:in `call'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/middleware/chain.rb:111:in &lt;span class="sb"&gt;`&lt;/span&gt;block &lt;span class="k"&gt;in &lt;/span&gt;invoke&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/middleware/server/active_record.rb:6:in `call'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/middleware/chain.rb:111:in &lt;span class="sb"&gt;`&lt;/span&gt;block &lt;span class="k"&gt;in &lt;/span&gt;invoke&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/middleware/server/retry_jobs.rb:50:in `call'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/middleware/chain.rb:111:in &lt;span class="sb"&gt;`&lt;/span&gt;block &lt;span class="k"&gt;in &lt;/span&gt;invoke&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/logging.rb:22:in &lt;span class="sb"&gt;`&lt;/span&gt;with_context&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/middleware/server/logging.rb:7:in `call'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/middleware/chain.rb:111:in &lt;span class="sb"&gt;`&lt;/span&gt;block &lt;span class="k"&gt;in &lt;/span&gt;invoke&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/middleware/chain.rb:114:in `call'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/middleware/chain.rb:114:in &lt;span class="sb"&gt;`&lt;/span&gt;invoke&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/processor.rb:48:in `block (2 levels) in process'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/processor.rb:87:in &lt;span class="sb"&gt;`&lt;/span&gt;stats&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/sidekiq-2.9.0/lib/sidekiq/processor.rb:47:in `block in process'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/celluloid-0.12.4/lib/celluloid/calls.rb:23:in &lt;span class="sb"&gt;`&lt;/span&gt;call&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/celluloid-0.12.4/lib/celluloid/calls.rb:23:in `public_send'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/celluloid-0.12.4/lib/celluloid/calls.rb:23:in &lt;span class="sb"&gt;`&lt;/span&gt;dispatch&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/celluloid-0.12.4/lib/celluloid/future.rb:18:in `block in initialize'&lt;/span&gt;
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/celluloid-0.12.4/lib/celluloid/internal_pool.rb:48:in &lt;span class="sb"&gt;`&lt;/span&gt;call&lt;span class="s1"&gt;'
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/celluloid-0.12.4/lib/celluloid/internal_pool.rb:48:in `block in create'&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;</description>
      <author>firsthym</author>
      <pubDate>Fri, 14 Feb 2014 16:23:57 +0800</pubDate>
      <link>https://ruby-china.org/topics/17261</link>
      <guid>https://ruby-china.org/topics/17261</guid>
    </item>
    <item>
      <title>nginx 同时代理 passenger 和 apache</title>
      <description>&lt;p&gt;服务器环境：
nginx 用作反向代理，之前代理的是 passenger，跑的 rails 应用 (&lt;a href="http://cookgoogle.com" rel="nofollow" target="_blank"&gt;http://cookgoogle.com&lt;/a&gt;)，一切正常&lt;/p&gt;

&lt;p&gt;后来我想把我的 wordpress 搬到自己的 VPS 上，所以安装了 apache，nginx 配置如下：&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;upstream&lt;/span&gt; &lt;span class="n"&gt;apache&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="mi"&gt;106&lt;/span&gt;       &lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="mf"&gt;127.0&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;8000&lt;/span&gt; &lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;107&lt;/span&gt;     &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="mi"&gt;108&lt;/span&gt;     &lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="mi"&gt;109&lt;/span&gt;       &lt;span class="n"&gt;listen&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;110&lt;/span&gt;       &lt;span class="n"&gt;server_name&lt;/span&gt; &lt;span class="n"&gt;geekway&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;me&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;111&lt;/span&gt;       &lt;span class="n"&gt;location&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="mi"&gt;112&lt;/span&gt;         &lt;span class="n"&gt;proxy_pass&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="ss"&gt;:/&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;apache&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;113&lt;/span&gt;         &lt;span class="n"&gt;proxy_redirect&lt;/span&gt; &lt;span class="n"&gt;off&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;114&lt;/span&gt;         &lt;span class="n"&gt;proxy_redirect&lt;/span&gt;          &lt;span class="n"&gt;off&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;115&lt;/span&gt;         &lt;span class="n"&gt;proxy_set_header&lt;/span&gt;        &lt;span class="no"&gt;Host&lt;/span&gt; &lt;span class="vg"&gt;$host&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;116&lt;/span&gt;         &lt;span class="n"&gt;proxy_set_header&lt;/span&gt;        &lt;span class="no"&gt;X&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="no"&gt;Real&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="no"&gt;IP&lt;/span&gt; &lt;span class="vg"&gt;$remote_addr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;117&lt;/span&gt;         &lt;span class="n"&gt;proxy_set_header&lt;/span&gt;        &lt;span class="no"&gt;X&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="no"&gt;Forwarded&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="no"&gt;For&lt;/span&gt; &lt;span class="vg"&gt;$proxy_add_x_forwarded_for&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;118&lt;/span&gt;         &lt;span class="n"&gt;client_max_body_size&lt;/span&gt;    &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;119&lt;/span&gt;         &lt;span class="n"&gt;client_body_buffer_size&lt;/span&gt; &lt;span class="mi"&gt;128&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;120&lt;/span&gt;         &lt;span class="n"&gt;proxy_connect_timeout&lt;/span&gt;   &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;121&lt;/span&gt;         &lt;span class="n"&gt;proxy_send_timeout&lt;/span&gt;      &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;122&lt;/span&gt;         &lt;span class="n"&gt;proxy_read_timeout&lt;/span&gt;      &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;123&lt;/span&gt;         &lt;span class="n"&gt;proxy_buffer_size&lt;/span&gt;       &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;124&lt;/span&gt;         &lt;span class="n"&gt;proxy_buffers&lt;/span&gt;           &lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;125&lt;/span&gt;         &lt;span class="n"&gt;proxy_busy_buffers_size&lt;/span&gt; &lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;126&lt;/span&gt;         &lt;span class="n"&gt;proxy_temp_file_write_size&lt;/span&gt; &lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;127&lt;/span&gt; 
&lt;span class="mi"&gt;128&lt;/span&gt;       &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="mi"&gt;129&lt;/span&gt;     &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;之后用浏览器访问&lt;a href="http://geekway.me" rel="nofollow" target="_blank"&gt;http://geekway.me&lt;/a&gt;
发现没有应用样式，样式的地址是我的 upstream 的名字：&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;link&lt;/span&gt; &lt;span class="n"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"stylesheet"&lt;/span&gt; &lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"twentytwelve-style-css"&lt;/span&gt; &lt;span class="n"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"http://apache/wp-content/themes/twentytwelve/style.css?ver=3.5.1"&lt;/span&gt; &lt;span class="n"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"text/css"&lt;/span&gt; &lt;span class="n"&gt;media&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"all"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;请问还需要设置什么地方吗？&lt;/p&gt;</description>
      <author>firsthym</author>
      <pubDate>Sun, 16 Jun 2013 11:16:30 +0800</pubDate>
      <link>https://ruby-china.org/topics/11754</link>
      <guid>https://ruby-china.org/topics/11754</guid>
    </item>
    <item>
      <title>如何将 object id 转换成顺序 id？</title>
      <description>&lt;p&gt;诸如
&lt;a href="http://localhost:3000/users/502c48132061c712d800000" rel="nofollow" target="_blank"&gt;http://localhost:3000/users/502c48132061c712d800000&lt;/a&gt; -》 &lt;a href="http://localhost:3000/users/1" rel="nofollow" target="_blank"&gt;http://localhost:3000/users/1&lt;/a&gt;&lt;/p&gt;</description>
      <author>firsthym</author>
      <pubDate>Fri, 31 Aug 2012 09:47:12 +0800</pubDate>
      <link>https://ruby-china.org/topics/5273</link>
      <guid>https://ruby-china.org/topics/5273</guid>
    </item>
    <item>
      <title>gem install caldecott 失败</title>
      <description>&lt;p&gt;我的 rails 环境是用 windows installer 安装的。不知错误是什么原因，错误记录：&lt;/p&gt;

&lt;p&gt;C:\Sites&amp;gt;gem install caldecott
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing caldecott:
        ERROR: Failed to build gem native extension.&lt;/p&gt;

&lt;p&gt;D:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... no
checking for rb_thread_check_ints()... yes
checking for rb_time_new()... yes
checking for windows.h... yes
checking for winsock.h... yes
checking for main() in -lkernel32... yes
checking for main() in -lrpcrt4... yes
checking for main() in -lgdi32... yes
checking for main() in -lssl... no
creating Makefile&lt;/p&gt;

&lt;p&gt;make
generating rubyeventmachine-i386-mingw32.def
compiling binder.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is val
id for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is v
alid for C/ObjC but not for C++
In file included from project.h:137:0,
                 from binder.cpp:20:
binder.h:35:34: warning: type qualifiers ignored on function return type
In file included from project.h:138:0,
                 from binder.cpp:20:
em.h:91:47: warning: type qualifiers ignored on function return type
em.h:92:76: warning: type qualifiers ignored on function return type
em.h:93:56: warning: type qualifiers ignored on function return type
em.h:95:57: warning: type qualifiers ignored on function return type
em.h:96:60: warning: type qualifiers ignored on function return type
em.h:97:58: warning: type qualifiers ignored on function return type
em.h:98:55: warning: type qualifiers ignored on function return type
em.h:99:36: warning: type qualifiers ignored on function return type
em.h:101:47: warning: type qualifiers ignored on function return type
em.h:106:42: warning: type qualifiers ignored on function return type
em.h:123:45: warning: type qualifiers ignored on function return type
em.h:132:36: warning: type qualifiers ignored on function return type
In file included from project.h:145:0,
                 from binder.cpp:20:
eventmachine.h:45:61: warning: type qualifiers ignored on function return type
eventmachine.h:46:112: warning: type qualifiers ignored on function return type
eventmachine.h:47:69: warning: type qualifiers ignored on function return type
eventmachine.h:49:73: warning: type qualifiers ignored on function return type
eventmachine.h:62:75: warning: type qualifiers ignored on function return type
eventmachine.h:63:74: warning: type qualifiers ignored on function return type
eventmachine.h:64:77: warning: type qualifiers ignored on function return type
eventmachine.h:65:41: warning: type qualifiers ignored on function return type
In file included from project.h:145:0,
                 from binder.cpp:20:
eventmachine.h:99:60: warning: type qualifiers ignored on function return type
eventmachine.h&lt;img title=":100:" alt="💯" src="https://twemoji.ruby-china.com/2/svg/1f4af.svg" class="twemoji"&gt;58: warning: type qualifiers ignored on function return type
eventmachine.h:102:60: warning: type qualifiers ignored on function return type
eventmachine.h:105:41: warning: type qualifiers ignored on function return type
compiling cmain.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is val
id for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is v
alid for C/ObjC but not for C++
In file included from project.h:137:0,
                 from cmain.cpp:20:
binder.h:35:34: warning: type qualifiers ignored on function return type
In file included from project.h:138:0,
                 from cmain.cpp:20:
em.h:91:47: warning: type qualifiers ignored on function return type
em.h:92:76: warning: type qualifiers ignored on function return type
em.h:93:56: warning: type qualifiers ignored on function return type
em.h:95:57: warning: type qualifiers ignored on function return type
em.h:96:60: warning: type qualifiers ignored on function return type
em.h:97:58: warning: type qualifiers ignored on function return type
em.h:98:55: warning: type qualifiers ignored on function return type
em.h:99:36: warning: type qualifiers ignored on function return type
em.h:101:47: warning: type qualifiers ignored on function return type
em.h:106:42: warning: type qualifiers ignored on function return type
em.h:123:45: warning: type qualifiers ignored on function return type
em.h:132:36: warning: type qualifiers ignored on function return type
In file included from project.h:145:0,
                 from cmain.cpp:20:
eventmachine.h:45:61: warning: type qualifiers ignored on function return type
eventmachine.h:46:112: warning: type qualifiers ignored on function return type
eventmachine.h:47:69: warning: type qualifiers ignored on function return type
eventmachine.h:49:73: warning: type qualifiers ignored on function return type
eventmachine.h:62:75: warning: type qualifiers ignored on function return type
eventmachine.h:63:74: warning: type qualifiers ignored on function return type
eventmachine.h:64:77: warning: type qualifiers ignored on function return type
eventmachine.h:65:41: warning: type qualifiers ignored on function return type
In file included from project.h:145:0,
                 from cmain.cpp:20:
eventmachine.h:99:60: warning: type qualifiers ignored on function return type
eventmachine.h&lt;img title=":100:" alt="💯" src="https://twemoji.ruby-china.com/2/svg/1f4af.svg" class="twemoji"&gt;58: warning: type qualifiers ignored on function return type
eventmachine.h:102:60: warning: type qualifiers ignored on function return type
eventmachine.h:105:41: warning: type qualifiers ignored on function return type
cmain.cpp:98:71: warning: type qualifiers ignored on function return type
cmain.cpp:109:122: warning: type qualifiers ignored on function return type
cmain.cpp:119:79: warning: type qualifiers ignored on function return type
cmain.cpp:129:83: warning: type qualifiers ignored on function return type
cmain.cpp:260:85: warning: type qualifiers ignored on function return type
cmain.cpp:270:84: warning: type qualifiers ignored on function return type
cmain.cpp:280:88: warning: type qualifiers ignored on function return type
cmain.cpp:290:51: warning: type qualifiers ignored on function return type
cmain.cpp:300:70: warning: type qualifiers ignored on function return type
cmain.cpp:320:55: warning: type qualifiers ignored on function return type
cmain.cpp:546:70: warning: type qualifiers ignored on function return type
cmain.cpp:669:68: warning: type qualifiers ignored on function return type
cmain.cpp: In function 'int evma_send_file_data_to_connection(long unsigned int,
 const char*)':
cmain.cpp:752:6: error: cannot convert 'stat*' to '_stati64*' for argument '2' t
o 'int _fstati64(int, _stati64*)'
make: *** [cmain.o] Error 1&lt;/p&gt;

&lt;p&gt;Gem files will remain installed in D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
.1/gems/eventmachine-0.12.10 for inspection.
Results logged to D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/eventmach
ine-0.12.10/ext/gem_make.out&lt;/p&gt;

&lt;p&gt;C:\Sites&amp;gt;gem update --system
Latest version currently installed. Aborting.&lt;/p&gt;</description>
      <author>firsthym</author>
      <pubDate>Fri, 24 Aug 2012 09:32:57 +0800</pubDate>
      <link>https://ruby-china.org/topics/5120</link>
      <guid>https://ruby-china.org/topics/5120</guid>
    </item>
    <item>
      <title>rake db:migrate 失败</title>
      <description>&lt;p&gt;hi，
我正在学习 &lt;a href="http://guides.rubyonrails.org/getting_started.html" rel="nofollow" target="_blank"&gt;http://guides.rubyonrails.org/getting_started.html&lt;/a&gt;
做到 生成表，翘命令 rake db:migrate，报错：&lt;/p&gt;

&lt;p&gt;==  CreatePosts: migrating ====================================================
-- create_table(:posts)
rake aborted!
An error has occurred, this and all later migrations canceled:&lt;/p&gt;

&lt;p&gt;private method `String' called for #&lt;/p&gt;

&lt;p&gt;Tasks: TOP =&amp;gt; db:migrate
(See full trace by running task with --trace)&lt;/p&gt;

&lt;p&gt;不知什么原因？&lt;/p&gt;</description>
      <author>firsthym</author>
      <pubDate>Thu, 02 Aug 2012 10:02:48 +0800</pubDate>
      <link>https://ruby-china.org/topics/4695</link>
      <guid>https://ruby-china.org/topics/4695</guid>
    </item>
  </channel>
</rss>
