<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>suyuhang (苏苏苏)</title>
    <link>https://ruby-china.org/suyuhang</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>ImageMagick 操作 eps 图片问题</title>
      <description>&lt;p&gt;我想在 eps 图片上 写中文字&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;convert -font /Users/suyuhang/Downloads/Fonts/simsun.ttc -fill purple -pointsize 40 -draw 'text 70,100 "我才18"'
 /Users/suyuhang/Downloads/zxr.eps /Users/suyuhang/Downloads/zxr1.eps


convert: no decode delegate for this image format `EPT' @ error/constitute.c/ReadImage/501.


convert: no images defined `/Users/suyuhang/Downloads/zxr1.eps' @ error/convert.c/ConvertImageCommand/3212.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我需要安装什么么？&lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Thu, 21 May 2015 15:58:33 +0800</pubDate>
      <link>https://ruby-china.org/topics/25688</link>
      <guid>https://ruby-china.org/topics/25688</guid>
    </item>
    <item>
      <title>批量下载 doc 文件</title>
      <description>&lt;p&gt;单独下载 doc 文件我使用的是 format.doc 渲染页面 生成的 doc 文件&lt;/p&gt;

&lt;p&gt;但是现在有一个问题 就是需要批量下载 doc 文件&lt;/p&gt;

&lt;p&gt;1.生成 doc 文件
2.转换成 zip 
3.下载 zip 文件&lt;/p&gt;

&lt;p&gt;找不到批量下载 doc 文件的方法 求解啊 大神们&lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Wed, 10 Sep 2014 15:54:30 +0800</pubDate>
      <link>https://ruby-china.org/topics/21456</link>
      <guid>https://ruby-china.org/topics/21456</guid>
    </item>
    <item>
      <title>Kaminari 问题</title>
      <description>&lt;p&gt;Kaminari 我使用了这个 gem 我想把现实在 view 上的 弄成中文，求个方法，我在 bing，和 google 找了半天都没找到，英语有限 呵  谢谢了&lt;/p&gt;

&lt;p&gt;rmagick 和 minimagick 那个更好些？&lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Wed, 23 Jul 2014 17:48:08 +0800</pubDate>
      <link>https://ruby-china.org/topics/20645</link>
      <guid>https://ruby-china.org/topics/20645</guid>
    </item>
    <item>
      <title>有人用 rubyzip 解压过 zip 文件嚒</title>
      <description>&lt;p&gt;有人用过 rubyzip 解压 zip 文件，我想看看代码，上网看的不太明白，是我理解有问题，所以麻烦各位了 &lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Tue, 20 May 2014 17:07:17 +0800</pubDate>
      <link>https://ruby-china.org/topics/19418</link>
      <guid>https://ruby-china.org/topics/19418</guid>
    </item>
    <item>
      <title>zlib 方法</title>
      <description>&lt;p&gt;我一直搜索找不到一个很好的 rubyonrails 自带 zlib 压缩文件和解压的文档，哪位大神可以给我个文档&lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Mon, 19 May 2014 15:30:01 +0800</pubDate>
      <link>https://ruby-china.org/topics/19382</link>
      <guid>https://ruby-china.org/topics/19382</guid>
    </item>
    <item>
      <title>页面跳转错误 求解 急！！！！！</title>
      <description>&lt;p&gt;在 controller 中&lt;/p&gt;

&lt;p&gt;1.我用这句话就没错&lt;/p&gt;

&lt;p&gt;&lt;a href="/suggestions" class="user-mention" title="@suggestions"&gt;&lt;i&gt;@&lt;/i&gt;suggestions&lt;/a&gt; = Suggestion.group("content").order("count(*) desc").page(&lt;a href="/page" class="user-mention" title="@page"&gt;&lt;i&gt;@&lt;/i&gt;page&lt;/a&gt;).per(&lt;a href="/count" class="user-mention" title="@count"&gt;&lt;i&gt;@&lt;/i&gt;count&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;2.而这句话就有问题&lt;/p&gt;

&lt;p&gt;Suggestion.select("content,user_id,count(*) as count).group("content").order("count desc")  &lt;/p&gt;

&lt;p&gt;报错是
No route matches {:action=&amp;gt;"show", :controller=&amp;gt;"suggestions", :id=&amp;gt;#}&lt;/p&gt;

&lt;p&gt;第一句加 controller 就没问题 可是第二句就有问题&lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Thu, 15 May 2014 15:30:30 +0800</pubDate>
      <link>https://ruby-china.org/topics/19277</link>
      <guid>https://ruby-china.org/topics/19277</guid>
    </item>
    <item>
      <title>rmagick  问题</title>
      <description>&lt;p&gt;class PhotoUploader &amp;lt; CarrierWave::Uploader::Base
include CarrierWave::RMagick&lt;/p&gt;

&lt;p&gt;version :thumb do 
  process :resize_to_limit =&amp;gt; [200,200]
  end &lt;/p&gt;

&lt;p&gt;#  process :store_geometry
   #   def store_geometry
    #       img = ::Magick::Image::read(&lt;a href="/file.file" class="user-mention" title="@file.file"&gt;&lt;i&gt;@&lt;/i&gt;file.file&lt;/a&gt;).first
      #       if model
     #     model.weight = img.columns
    #      model.height = img.rows
   #        end
      end&lt;/p&gt;

&lt;p&gt;开始我是用注销的这个方法写的 但是不能修改图片的尺寸。&lt;/p&gt;

&lt;p&gt;后来我用 thumb 定义版本这么写 可是却一直报错&lt;/p&gt;

&lt;p&gt;错误如下：wrong number of arguments (1 for 0)&lt;/p&gt;

&lt;p&gt;我在 show 页面也写了 
&amp;lt;%= image_tag &lt;a href="/teacher.picture" class="user-mention" title="@teacher.picture"&gt;&lt;i&gt;@&lt;/i&gt;teacher.picture&lt;/a&gt;(:thumb) %&amp;gt; &lt;/p&gt;

&lt;p&gt;我想请问各位 怎么修改一下 就可以自定义尺寸了&lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Fri, 09 May 2014 12:57:52 +0800</pubDate>
      <link>https://ruby-china.org/topics/19123</link>
      <guid>https://ruby-china.org/topics/19123</guid>
    </item>
    <item>
      <title>attributes 和 self 的区别问题</title>
      <description>&lt;p&gt;最近我一直苦恼一个问题，当我建立了一个 model 的时候，写了一个 api&lt;/p&gt;

&lt;p&gt;然后我通过定义类&lt;/p&gt;

&lt;p&gt;class Comic &amp;lt; ActiveRecord::Base&lt;/p&gt;

&lt;p&gt;attr_accessible :name&lt;/p&gt;

&lt;p&gt;def name
self.name 或者写成 attributes['name']
end&lt;/p&gt;

&lt;p&gt;def as_json(options={})
super(:methods =&amp;gt; [:name])
end&lt;/p&gt;

&lt;p&gt;end&lt;/p&gt;

&lt;p&gt;疑问：
1.我有一个疑问，self 是当前的 class，self.name 和 attributes['name'] 的区别是什么？&lt;/p&gt;

&lt;p&gt;我知道 attributes 这么访问属性是一个 hash&lt;/p&gt;

&lt;p&gt;但是我比较纠结的是 每一个类 都是一个 hash 嚒？&lt;/p&gt;

&lt;p&gt;2.而且我在 method name 中对 name 属性 进行 URI:escape() 时候，却发现，URI:escape(self.name) 报错，而 URI:escape(arrtibutes['name']) 却可以顺利进行。&lt;/p&gt;

&lt;p&gt;3.attributes 就是 attributes_accessoror 包括 seter&amp;amp;geter 方法，
那 attributes 也算是一个 hash，所以他在拿类的属性时候，attributes['key'] 嚒？
那我能理解为，attributes['key'] 就是调用 getter 方法，就像 java 中的对象.get 方法得到值吗？
self 表示当前的类，那为什么当我进行属性编码的时候，self.属性值 却不行，然而 attributes［‘属性值’］却可以？&lt;/p&gt;

&lt;p&gt;我是个新手 我想问问 这块应该仔细的看哪里。&lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Sun, 27 Apr 2014 13:47:18 +0800</pubDate>
      <link>https://ruby-china.org/topics/18879</link>
      <guid>https://ruby-china.org/topics/18879</guid>
    </item>
    <item>
      <title>model 里的属性</title>
      <description>&lt;p&gt;最近我一直苦恼一个问题，当我建立了一个 model 的时候，写了一个 api&lt;/p&gt;

&lt;p&gt;然后我通过定义类&lt;/p&gt;

&lt;p&gt;class Comic &amp;lt; ActiveRecord::Base&lt;/p&gt;

&lt;p&gt;attr_accessible :name &lt;/p&gt;

&lt;p&gt;def   name
self.name 或者写成 attributes['name']
end&lt;/p&gt;

&lt;p&gt;def as_json(options={})
 super(:methods =&amp;gt; [:name])
 end&lt;/p&gt;

&lt;p&gt;end&lt;/p&gt;

&lt;p&gt;我有一个疑问，self 是当前的 class，self.name 和 attributes['name'] 的区别，&lt;/p&gt;

&lt;p&gt;我知道后者这么访问属性是一个 hash &lt;/p&gt;

&lt;p&gt;但是我比较纠结的是 每一个类 都是一个 hash 嚒？&lt;/p&gt;

&lt;p&gt;而且我在  method name 中对 name 属性 进行 URI:escape() 时候，却发现，URI:escape(self.name) 报错，而 URI:escape(arrtibutes['name']) 却可以顺利进行。&lt;/p&gt;

&lt;p&gt;我是个新手 我想问问 这块应该仔细的看哪里。&lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Fri, 25 Apr 2014 16:55:42 +0800</pubDate>
      <link>https://ruby-china.org/topics/18852</link>
      <guid>https://ruby-china.org/topics/18852</guid>
    </item>
    <item>
      <title>[北京] 移动互联网创业公司, 找服务器开发的合作者，精通 Ruby</title>
      <description>&lt;p&gt;目前拿到了 A 轮投资 100W 美元，现在寻找一位服务器开发负责人
如果你一直在寻找一个创业的机会，如果你一直对创业蠢蠢欲动，那就一起吧。&lt;/p&gt;

&lt;p&gt;基本要求：
精通 Ruby on Rails、Mysql
有管理后台分布式或集群架构经验
有优秀的独立研发能力，学习能力和较强的责任心
有数据抓取经验
有针对移动平台的后端开发经验&lt;/p&gt;

&lt;p&gt;另外：
有创业经验或者创业想法者优先
有带团队经验者优先
有编写爬虫经验者优先
有大负载网站编程者优先&lt;/p&gt;

&lt;p&gt;薪水 10~15k 
如果能力够强待遇、股权：面议
周末双休，按照国家正常法定假期休假&lt;/p&gt;

&lt;p&gt;联系：levin0922@gmail.com 卫先生&lt;/p&gt;

&lt;p&gt;工作地点：北京，中关村&lt;/p&gt;

&lt;p&gt;注：
如果你渴望一个家的团队，来找我们吧
如果你是一个有责任心的人，来找我们吧
如果你想成就一方霸业，来找我们吧&lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Fri, 25 Apr 2014 11:27:48 +0800</pubDate>
      <link>https://ruby-china.org/topics/18846</link>
      <guid>https://ruby-china.org/topics/18846</guid>
    </item>
    <item>
      <title>[北京] 移动互联网创业公司, 找服务器开发的合作者，精通 Ruby</title>
      <description>&lt;p&gt;目前拿到了 A 轮投资 100W 美元，现在寻找一位服务器开发负责人
如果你一直在寻找一个创业的机会，如果你一直对创业蠢蠢欲动，那就一起吧。&lt;/p&gt;

&lt;p&gt;基本要求：
精通 Ruby on Rails、Mysql
有管理后台分布式或集群架构经验
有优秀的独立研发能力，学习能力和较强的责任心
有数据抓取经验
有针对移动平台的后端开发经验&lt;/p&gt;

&lt;p&gt;另外：
有创业经验或者创业想法者优先
有带团队经验者优先
有编写爬虫经验者优先
有大负载网站编程者优先&lt;/p&gt;

&lt;p&gt;薪水 10~15k 
如果能力够强待遇、股权：面议&lt;/p&gt;

&lt;p&gt;联系：levin0922@gmail.com 卫先生&lt;/p&gt;

&lt;p&gt;工作地点：北京，中关村&lt;/p&gt;

&lt;p&gt;注：
如果你渴望一个家的团队，来找我们吧
如果你是一个有责任心的人，来找我们吧
如果你想成就一方霸业，来找我们 吧&lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Thu, 24 Apr 2014 22:03:23 +0800</pubDate>
      <link>https://ruby-china.org/topics/18837</link>
      <guid>https://ruby-china.org/topics/18837</guid>
    </item>
    <item>
      <title>model 中的 self.comic_url  设置 url 的 encoding 求助！！！ </title>
      <description>&lt;p&gt;后台我是用 modle 中获取属性 comic_url，可是却怎么也查不到怎么写 self.comic_url 想了半天&lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Wed, 23 Apr 2014 15:39:41 +0800</pubDate>
      <link>https://ruby-china.org/topics/18799</link>
      <guid>https://ruby-china.org/topics/18799</guid>
    </item>
    <item>
      <title>怎么设置 url 的 encoding 啊</title>
      <description>&lt;p&gt;在对象中有一个 url，但是却发现编码问题很恶心，我想设置一下，对象中 url 的 encoind 求助大神们&lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Wed, 23 Apr 2014 15:08:28 +0800</pubDate>
      <link>https://ruby-china.org/topics/18798</link>
      <guid>https://ruby-china.org/topics/18798</guid>
    </item>
    <item>
      <title>url 的 encoding 问题</title>
      <description>&lt;p&gt;在对象中有一个 url，但是却发现编码问题很恶心，我想设置一下，对象中 url 的 encoind 求助大神们&lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Wed, 23 Apr 2014 14:29:20 +0800</pubDate>
      <link>https://ruby-china.org/topics/18794</link>
      <guid>https://ruby-china.org/topics/18794</guid>
    </item>
    <item>
      <title>devise &amp; cancan &amp; rolify</title>
      <description>&lt;p&gt;有人有这三个的视频或者学习资料嚒？求一份 谢谢各位了（我是个初学者）&lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Tue, 22 Apr 2014 09:20:47 +0800</pubDate>
      <link>https://ruby-china.org/topics/18760</link>
      <guid>https://ruby-china.org/topics/18760</guid>
    </item>
    <item>
      <title>controller 设置 layout:false</title>
      <description>&lt;p&gt;为什么在 controller 设置 layout:false 然后一点击删除 就会自动跳转到 show 方法，而且我发现删除方法和 show 竟然同一个功能了，可是如果删除 layout:false 就又恢复了，求大神解释。&lt;/p&gt;

&lt;p&gt;注：我是一个新手&lt;/p&gt;</description>
      <author>suyuhang</author>
      <pubDate>Wed, 16 Apr 2014 18:33:15 +0800</pubDate>
      <link>https://ruby-china.org/topics/18642</link>
      <guid>https://ruby-china.org/topics/18642</guid>
    </item>
  </channel>
</rss>
