<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>popotiger (周维明)</title>
    <link>https://ruby-china.org/popotiger</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>rake assets:precompile --trace 报错 Command failed with status</title>
      <description>&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[popo@mac dpos]$ rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/home/popo/.rvm/rubies/ruby-1.9.2-p320/bin/ruby /home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
Command failed with status (): [/home/popo/.rvm/rubies/ruby-1.9.2-p320/b...]
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/file_utils.rb:45:in `call'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/file_utils.rb:45:in `sh'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/file_utils_ext.rb:40:in `sh'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/file_utils.rb:80:in `ruby'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/file_utils_ext.rb:40:in `ruby'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/actionpack-3.2.2/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/actionpack-3.2.2/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/actionpack-3.2.2/lib/sprockets/assets.rake:29:in `block (2 levels) in &amp;lt;top (required)&amp;gt;'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/task.rb:227:in `call'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/task.rb:227:in `block in execute'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/task.rb:222:in `each'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/task.rb:222:in `execute'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/home/popo/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/task.rb:152:in `invoke'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:140:in `invoke_task'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:98:in `block (2 levels) in top_level'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:98:in `each'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:98:in `block in top_level'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:107:in `run_with_threads'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:92:in `top_level'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:70:in `block in run'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:157:in `standard_exception_handling'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/lib/rake/application.rb:67:in `run'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/gems/rake-0.9.3/bin/rake:37:in `&amp;lt;top (required)&amp;gt;'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/bin/rake:23:in `load'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/bin/rake:23:in `&amp;lt;main&amp;gt;'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/bin/ruby_executable_hooks:15:in `eval'
/home/popo/.rvm/gems/ruby-1.9.2-p320@dpos/bin/ruby_executable_hooks:15:in `&amp;lt;main&amp;gt;'
Tasks: TOP =&amp;gt; assets:precompile

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;求大神看看是什么问题？&lt;/p&gt;

&lt;p&gt;系统：Linux mac 2.6.32-431.17.1.el6.x86_64 #1 SMP Wed May 7 23:32:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
内存：512M&lt;/p&gt;

&lt;p&gt;看这个帖子：&lt;a href="http://stackoverflow.com/questions/14991365/command-failed-with-status-when-precompiling-assets" rel="nofollow" target="_blank"&gt;http://stackoverflow.com/questions/14991365/command-failed-with-status-when-precompiling-assets&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;难道是我内存太少？&lt;/p&gt;</description>
      <author>popotiger</author>
      <pubDate>Thu, 10 Jul 2014 00:19:36 +0800</pubDate>
      <link>https://ruby-china.org/topics/20407</link>
      <guid>https://ruby-china.org/topics/20407</guid>
    </item>
    <item>
      <title>centos crontab 不能运行 ruby script/runner ***.rb 脚本</title>
      <description>&lt;p&gt;shell:(task.sh)&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class="nb"&gt;source&lt;/span&gt; /home/zzwm/.rvm/environments/ruby-1.9.2-p320
&lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; /mnt/b/log/zzwm/operation &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /mnt/b/log/zzwm/operation
&lt;span class="nb"&gt;cd&lt;/span&gt; /data/projects/zzwm/opdg
&lt;span class="nb"&gt;sleep &lt;/span&gt;2
&lt;span class="nv"&gt;RAILS_ENV&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;production ruby script/runner operation.rb &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /mnt/b/log/operation.log 2&amp;gt;&amp;amp;1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;/etc/crontab:&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*/1 * * * * root /data/projects/shell/task.sh
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;/var/log/cron:&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Jul  4 13:34:01 srv3 CROND[2229]: (root) CMD (/data/projects/shell/task.sh)
Jul  4 13:34:01 srv3 CROND[2228]: (root) MAIL (mailed 106 bytes of output but got status 0x004b#012)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;1、手动运行&lt;code&gt;bash /data/projects/shell/task.sh&lt;/code&gt;  没有问题。
2、我还有一个定时任务是在相同的目录下执行 rake 命令就没有问题。
求大神帮忙解决。&lt;/p&gt;</description>
      <author>popotiger</author>
      <pubDate>Fri, 04 Jul 2014 14:48:51 +0800</pubDate>
      <link>https://ruby-china.org/topics/20316</link>
      <guid>https://ruby-china.org/topics/20316</guid>
    </item>
  </channel>
</rss>
