<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Blues (Blues)</title>
    <link>https://ruby-china.org/Blues</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>curl 和 libcurl 的版本号不一致的问题</title>
      <description>&lt;p&gt;我用 brew 去下载安装 imagemagick 这个 gem 的时候，总是出错，错误如下：&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;localhost:~ user$ brew install imagemagick
==&amp;gt; Installing dependencies for imagemagick: jpeg, libpng, freetype
==&amp;gt; Installing imagemagick dependency: jpeg
==&amp;gt; Downloading http://www.ijg.org/files/jpegsrc.v8d.tar.gz
curl: (48) An unknown option was passed in to libcurl

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我查了下是因为 curl 和 libcurl 的版本不一致的&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;localhost:~ user$ curl -V
curl 7.30.0 (x86_64-apple-darwin13.0) libcurl/7.21.6
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;但是我又执行了下 curl-config --version，发现&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;localhost:~ user$ curl-config --version
libcurl 7.30.0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;那么问题是：如何让 curl 和 libcurl 的版本号一致呢？操作系统：Mac OS X 10.9.5&lt;/p&gt;

&lt;p&gt;谢谢！&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Fri, 24 Apr 2015 09:52:25 +0800</pubDate>
      <link>https://ruby-china.org/topics/25288</link>
      <guid>https://ruby-china.org/topics/25288</guid>
    </item>
    <item>
      <title>Rails Guide 中的一个功能测试的疑问</title>
      <description>&lt;p&gt;地址：&lt;a href="http://guides.ruby-china.org/testing.html" rel="nofollow" target="_blank"&gt;http://guides.ruby-china.org/testing.html&lt;/a&gt;
4.1 功能测试要测试什么
节点下面的一段代码：&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PostsControllerTest&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ActionController&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;TestCase&lt;/span&gt;
  &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="s2"&gt;"should get index"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
    &lt;span class="n"&gt;get&lt;/span&gt; &lt;span class="ss"&gt;:index&lt;/span&gt;
    &lt;span class="n"&gt;assert_response&lt;/span&gt; &lt;span class="ss"&gt;:success&lt;/span&gt;
    &lt;span class="n"&gt;assert_not_nil&lt;/span&gt; &lt;span class="n"&gt;assigns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:posts&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我重新 new 了一个 project，然后 scoffold 一个 post 资源&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resources :posts
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后我在 test/conrtollers/posts_controller_test.rb 里面添加这么一段测试方法，发现总是提示：&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ActionView::Template::Error: No route matches {:action=&amp;gt;"show", :controller=&amp;gt;"posts", :id=&amp;gt;nil} missing required keys: [:id]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我就奇怪为什么我的动作明明是选的 index，怎么就变成了 show，我直接 rake routes 看了下，里面是有 index 这个动作的，这可能是怎么回事呢？谢谢！&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Wed, 04 Mar 2015 16:49:34 +0800</pubDate>
      <link>https://ruby-china.org/topics/24453</link>
      <guid>https://ruby-china.org/topics/24453</guid>
    </item>
    <item>
      <title>ruby china 一个页面上小的 issue</title>
      <description>&lt;p&gt;看图
&lt;img src="https://l.ruby-china.com/photo/2015/13f56700185dc8c7b51c1072032ae603.png" title="" alt=""&gt;
应该是因为 text_area 可以通过拖拽右下角的那个地方改变大小造成的。&lt;/p&gt;

&lt;p&gt;&lt;a href="/huacnlee" class="user-mention" title="@huacnlee"&gt;&lt;i&gt;@&lt;/i&gt;huacnlee&lt;/a&gt;&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Wed, 21 Jan 2015 10:21:59 +0800</pubDate>
      <link>https://ruby-china.org/topics/23853</link>
      <guid>https://ruby-china.org/topics/23853</guid>
    </item>
    <item>
      <title>Nginx + Passenger 本机部署问题</title>
      <description>&lt;p&gt;最近刚开始用这个，很多不太明白。&lt;/p&gt;
&lt;h2 id="首先配置如下："&gt;首先配置如下：&lt;/h2&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    passenger_root /Users/blues/.rvm/gems/ruby-2.2.0-preview2/gems/passenger-4.0.57;
    passenger_ruby /Users/blues/.rvm/gems/ruby-2.2.0-preview2/wrappers/ruby;

    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  bluesrailsblog.com;
        root /Users/blues/Documents/ror/blog/public;
        passenger_enabled on;
        #rails_env development;
        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        #location / {
        #root   html;
        #    index  index.html index.htm;
        #}

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;遇到的问题是：如果按照这样的配置，会出现错误，错误日志：&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;2015/01/06 10:08:35 [alert] 44986#0: *12 Cannot stat '/Users/blues/Documents/ror/blog/config.ru; This error means that the Nginx worker process (PID 44986, running as UID -2) does not have permission to access this file. Please read the manual to learn how to fix this problem: section 'Troubleshooting' -&amp;gt; 'Upon accessing the web app, Nginx reports a "Permission denied" error'; Extra info, client: 127.0.0.1, server: bluesrailsblog.com, request: "GET / HTTP/1.1", host: "bluesrailsblog.com"&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="1.如果把"&gt;1.如果把&lt;/h2&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#location / {
        #root   html;
        #    index  index.html index.htm;
        #}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;的注释取消，就没有问题，但是总是会出现 Nginx 的欢迎界面，而不是我在 routes.rb 里面设置的 root 路由页面，我把 nginx 里面的 index 页面删除之后就出现&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;An error occurred.

Sorry, the page you are looking for is currently unavailable.
Please try again later.

If you are the system administrator of this resource then you should check the error log for details.

Faithfully yours, nginx.
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="2. 如果把"&gt;2. 如果把&lt;/h2&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#user  nobody;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;取消注释变为&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user  root; 或者 user root root;就出现错误：
nginx: [emerg] getgrnam("root") failed in /usr/local/nginx/conf/nginx.conf:2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;参考了 2 个帖子
&lt;a href="https://ruby-china.org/topics/2873" rel="nofollow" target="_blank"&gt;https://ruby-china.org/topics/2873&lt;/a&gt;
&lt;a href="https://ruby-china.org/topics/458" rel="nofollow" target="_blank"&gt;https://ruby-china.org/topics/458&lt;/a&gt;
均没有解决问题，求指导，谢谢！&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Tue, 06 Jan 2015 10:17:37 +0800</pubDate>
      <link>https://ruby-china.org/topics/23567</link>
      <guid>https://ruby-china.org/topics/23567</guid>
    </item>
    <item>
      <title>请带团队做过 Code Review 的大神介绍经验</title>
      <description>&lt;p&gt;RT，我觉得我们团队需要做一点 code review 的事情，希望团队成员的代码写的更好一些，算是给他们一点压力。&lt;/p&gt;

&lt;p&gt;本身我的主职不是做 rails 开发，但是我对 rails 还是很感兴趣的，也算入门了。只是对做 rails 的 code review 还感觉信心不足，但是对于 OS X/iOS C/C++ 项目的 code review 没问题。现在的问题是团队有一些项目是 rails 的项目，其他的 rails 的成员我觉得也不足以完成 rails 的 code review 这个任务，所以想请大神支支招。&lt;/p&gt;

&lt;p&gt;不止 rails，如果大神们还有一些其他平台的 code review 经验，也非常欢迎讨论。&lt;/p&gt;

&lt;p&gt;谢谢！&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Thu, 24 Oct 2013 10:16:52 +0800</pubDate>
      <link>https://ruby-china.org/topics/14987</link>
      <guid>https://ruby-china.org/topics/14987</guid>
    </item>
    <item>
      <title>如何在 Rails 中使用 Postgres.app?</title>
      <description>&lt;p&gt;RT，看到很多文章介绍在 rails 中怎么使用 postgresql，但是都是使用 homebrew 去安装的 postgresql，但是那个大象（Postgres.app）我还是很喜欢的，不需要编译那么多东西，直接就 ok 乐。&lt;/p&gt;

&lt;p&gt;但是不知道在 rails 中怎么使用这个形式的 postgresql，比如在 config/database.yml 中登陆的 username 和 password，还有就是我使用&lt;/p&gt;

&lt;p&gt;Rails new my_app --database postgresql
去创建乐一个 app 之后，用
rails s
出现问题：
/Users/user/.rvm/gems/ruby-2.0.0-p0/gems/pg-0.17.0/lib/pg.rb:4:in `require': dlopen(/Users/user/.rvm/gems/ruby-2.0.0-p0/gems/pg-0.17.0/lib/pg_ext.bundle, 9): Library not loaded: /Users/user/.rvm/lib/libpq.5.6.dylib (LoadError)
  Referenced from: /Users/user/.rvm/gems/ruby-2.0.0-p0/gems/pg-0.17.0/lib/pg_ext.bundle&lt;/p&gt;

&lt;p&gt;看起来好像是和一些 postgresql 的安装文件有关，请问该怎么解决这些问题，使我们在 rails 项目直接使用 postgres.app 去作为数据库呢？&lt;/p&gt;

&lt;p&gt;可能问题有点菜，见笑乐！
求大虾指点，谢谢！&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Sun, 20 Oct 2013 20:34:03 +0800</pubDate>
      <link>https://ruby-china.org/topics/14888</link>
      <guid>https://ruby-china.org/topics/14888</guid>
    </item>
    <item>
      <title>ID 选择器后面可以跟标签么？</title>
      <description>&lt;p&gt;刚接触 web 前端，看到项目中有个代码是这样的：
#intro h1 {
  margin-top: 10px;
  margin-bottom: 10px;
  width: 90%;
  text-shadow: none;
  color: white;
}
我看很多资料都说 ID 选择器不能在后面加 标签，只有 class 才可以，那这个为什么是这样的呢？
w3c 的链接在这里：&lt;a href="http://www.w3school.com.cn/css/css_selector_id.asp" rel="nofollow" target="_blank"&gt;http://www.w3school.com.cn/css/css_selector_id.asp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;而且我测试发现这个 CSS 确实是起到了作用啊，求指点！&lt;/p&gt;

&lt;p&gt;谢谢！&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Wed, 11 Sep 2013 16:45:46 +0800</pubDate>
      <link>https://ruby-china.org/topics/14042</link>
      <guid>https://ruby-china.org/topics/14042</guid>
    </item>
    <item>
      <title>调试 JS 脚本有哪些好的工具推荐</title>
      <description>&lt;p&gt;RT，最近在学习 JS，但是有时总是出现的错误，但是很难找到问题的部分。&lt;/p&gt;

&lt;p&gt;求有经验的朋友推荐下。谢谢！&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Sat, 07 Sep 2013 17:51:06 +0800</pubDate>
      <link>https://ruby-china.org/topics/13949</link>
      <guid>https://ruby-china.org/topics/13949</guid>
    </item>
    <item>
      <title>为什么我的 Sublime text 2 无法安装插件？</title>
      <description>&lt;p&gt;额。。。。次奥，我 out 了&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Thu, 22 Aug 2013 15:38:38 +0800</pubDate>
      <link>https://ruby-china.org/topics/13524</link>
      <guid>https://ruby-china.org/topics/13524</guid>
    </item>
    <item>
      <title>path 和 url 有什么区别吗？</title>
      <description>&lt;p&gt;最近看项目的时候发现，有的地方用的 root_path，有的地方用的 root_url，但是我发现在用 url 的时候后面都跟有一个参数，比如：root_url，notice: “login!”&lt;/p&gt;

&lt;p&gt;是不是只有使用 url 的时候才可以带参数啊，看 rails guide 上也没说这 2 者之间有什么区别，求指点，谢谢！&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Tue, 20 Aug 2013 16:54:55 +0800</pubDate>
      <link>https://ruby-china.org/topics/13466</link>
      <guid>https://ruby-china.org/topics/13466</guid>
    </item>
    <item>
      <title>Rails 关闭服务器没反应</title>
      <description>&lt;p&gt;&lt;img src="//l.ruby-china.com/photo/363b5c9ee2f8c77e6e26eb14fb106f79.png" title="" alt=""&gt;
看图，&lt;/p&gt;

&lt;p&gt;我 Ctrl + C 总是停在 stopping 那里，不知道怎么回事。&lt;/p&gt;

&lt;p&gt;谢谢！&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Tue, 13 Aug 2013 09:53:02 +0800</pubDate>
      <link>https://ruby-china.org/topics/13286</link>
      <guid>https://ruby-china.org/topics/13286</guid>
    </item>
    <item>
      <title>TextMate2 问题</title>
      <description>&lt;p&gt;我重命名了文件，然后文件下面就变成一个叉叉，然后又重新生成了一个新的文件，被标记了叉叉的那个又删不掉，怎么回事？&lt;/p&gt;

&lt;p&gt;求指导&lt;/p&gt;

&lt;p&gt;&lt;img src="//l.ruby-china.com/photo/819da16955f9b0a7d8389ece40b36e4b.png" title="" alt=""&gt;&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Wed, 31 Jul 2013 16:40:16 +0800</pubDate>
      <link>https://ruby-china.org/topics/12944</link>
      <guid>https://ruby-china.org/topics/12944</guid>
    </item>
    <item>
      <title>刚刚社区挂了？？</title>
      <description>&lt;p&gt;访问地区：深圳
网络运营商：联通&lt;/p&gt;

&lt;p&gt;大概 4:30~5:30 之间，发现 ruby-china 怎么都打不开。&lt;/p&gt;

&lt;p&gt;现在又好了，咋回事啊，机房出问题了？&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Tue, 30 Jul 2013 18:08:02 +0800</pubDate>
      <link>https://ruby-china.org/topics/12912</link>
      <guid>https://ruby-china.org/topics/12912</guid>
    </item>
    <item>
      <title>怎么用 RSpec 为用 Mongoid 的模型写测试啊</title>
      <description>&lt;p&gt;之前都是用的 ActiveRecord，所以用 RSpec 都是可以参考大神们些的测试的，但是现在换成了 Mongoid 了，不知道该怎么写了，和原来一样的么？&lt;/p&gt;

&lt;p&gt;肯定有人说，先试试有错误再来说！&lt;/p&gt;

&lt;p&gt;好的，我去试试先。&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Mon, 29 Jul 2013 17:49:06 +0800</pubDate>
      <link>https://ruby-china.org/topics/12875</link>
      <guid>https://ruby-china.org/topics/12875</guid>
    </item>
    <item>
      <title>新手关于 routes 具名路由的一个疑问</title>
      <description>&lt;p&gt;在我学习 rails 的 routes 的时候，看到关于讲到具名路由的时候，说类似是这样的：
本来的路由如果是这样的：&lt;/p&gt;

&lt;p&gt;get '/static_pages/login'&lt;/p&gt;

&lt;p&gt;定义具名路由应该这样：&lt;/p&gt;

&lt;p&gt;match '/login' to: 'session#new'&lt;/p&gt;

&lt;p&gt;当然 match 也可以换成 get&lt;/p&gt;

&lt;p&gt;我想问的是，在公司的项目里面这样定义具名路由的也有，但是还有一种是这样的：&lt;/p&gt;

&lt;p&gt;get 'login' to 'session#new'&lt;/p&gt;

&lt;p&gt;第二个的里面的'login'前面为什么没有一个'/'呢？不明白，不是所有的都要在当前的 root 节点后面吗，如果没有'/'怎么能够表示在 root 节点下呢？在好几本书里面讲具名路由都没有这种写法。&lt;/p&gt;

&lt;p&gt;问题可能有点小白，求扫盲，谢谢！&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Sat, 20 Jul 2013 18:48:02 +0800</pubDate>
      <link>https://ruby-china.org/topics/12639</link>
      <guid>https://ruby-china.org/topics/12639</guid>
    </item>
    <item>
      <title>gem 'annotate'只能为 ActiveRecord 的子类注解吗?</title>
      <description>&lt;p&gt;我的项目是使用的 mongoid 去做的 ORM，不是 ActiveRecord，我在 Gemfile 中添加了
gem 'annotate', '2.5.0'想为 model 添加注解，但是 terminal 提示：Nothing annotated.&lt;/p&gt;

&lt;p&gt;但是使用 ActiveRecord 作为 ORM 的时候却是没问题的，求教！&lt;/p&gt;

&lt;p&gt;谢谢！&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Wed, 17 Jul 2013 10:26:32 +0800</pubDate>
      <link>https://ruby-china.org/topics/12560</link>
      <guid>https://ruby-china.org/topics/12560</guid>
    </item>
    <item>
      <title>Rails 中参数该怎么从 controller 里面传递到 view 里面，然后渲染页面啊</title>
      <description>&lt;p&gt;最近看一个新项目，有点晕，因为以前没做过 ror，我不知道 rails 中 controller 中的参数是怎么传递到对应的 view 中去的。&lt;/p&gt;

&lt;p&gt;另外一个是我还经常在 controller 中看到一个叫做 params 的 hash 参数，貌似这个 hash 里面总是有内容的，但是我搞不清楚它里面的数据是哪里来的。比如类似这样的代码：&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;new&lt;/span&gt;
    &lt;span class="vi"&gt;@user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;User&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:email&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
      &lt;span class="vi"&gt;@user.username&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:email&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:player&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
      &lt;span class="vi"&gt;@player&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kp"&gt;true&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
 &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;这个里面的 params 就不知道是哪里来的，这是 UsersController 里面的 new 方法。&lt;/p&gt;

&lt;p&gt;求大虾指点，谢谢！&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Sun, 14 Jul 2013 15:23:58 +0800</pubDate>
      <link>https://ruby-china.org/topics/12493</link>
      <guid>https://ruby-china.org/topics/12493</guid>
    </item>
    <item>
      <title>Rails 中的 fields 和 attr_accessible 有什么区别吗？</title>
      <description>&lt;p&gt;最近看公司的新项目的源代码的时候，发现里面的 model 定义的属性全部都是 fields，比如说类似这样的：
fields :name, :email, :password,....&lt;/p&gt;

&lt;p&gt;但是我看 Ruby on Rails tutorial 的时候作者都是这样写的：
attr_accessible :name, :email, :password,....&lt;/p&gt;

&lt;p&gt;请问这个 fields 和 attr_accessible 有什么区别吗？&lt;/p&gt;

&lt;p&gt;PS：我看书的时候知道了，attr_accessible 其实是一个函数，这行代码 attr_accessible :name, :email, :password,....其实就是给 name，email，password,....这些字段定义了 getter 和 setter 方法，然后就可以使用 user.name 和 user.name = @"guest"这样的方式去访问了，不知道理解的对不对。&lt;/p&gt;

&lt;p&gt;谢谢！&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Sun, 14 Jul 2013 13:46:04 +0800</pubDate>
      <link>https://ruby-china.org/topics/12491</link>
      <guid>https://ruby-china.org/topics/12491</guid>
    </item>
    <item>
      <title>Rails 新手应该怎么接手一个新的 Rails 项目</title>
      <description>&lt;p&gt;各位好，本人最近因为工作需要，需要接手一个 Rails 项目，所以在一个月以前我好好的拜读了一本书“Ruby on rails tutorial”教程的中文版，严格按照书上的介绍完成了一个类似 twitter 的 rails 网站，现在已经读完，而且那个例子也可以运行了。&lt;/p&gt;

&lt;p&gt;但是我打开接手的项目，发现我还是不知道该从哪里入手开始看这个项目，应该是个什么顺序啊？&lt;/p&gt;

&lt;p&gt;我现在看的顺序是 routes，controller，model 和 view，但是发现这样可能会花很久的时间才可以熟悉，求教大神尽快熟悉的方法。&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Tue, 02 Jul 2013 11:53:03 +0800</pubDate>
      <link>https://ruby-china.org/topics/12178</link>
      <guid>https://ruby-china.org/topics/12178</guid>
    </item>
    <item>
      <title>Heroku 的问题</title>
      <description>&lt;p&gt;今天学习 Ruby on rails 教程中文版的时候，里面有讲到部署到 heroku，我按照他的做法做的，但是每次我使用 heroku open 去打开网站的时候，它就出现“We're sorry, but something went wrong.”，因为总是 push 的时候 time out，我按照社区里面一位老兄的办法解决了，链接：&lt;a href="http://ruby-china.org/topics/10813" rel="nofollow" target="_blank"&gt;http://ruby-china.org/topics/10813&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;我不知道照那样改了会不会引发我现在遇到的问题，如果不是那可能会是什么问题呢？&lt;/p&gt;

&lt;p&gt;PS：Rails 新手，因为新的项目才开始做的。&lt;/p&gt;

&lt;p&gt;谢谢！&lt;/p&gt;</description>
      <author>Blues</author>
      <pubDate>Sat, 29 Jun 2013 18:02:32 +0800</pubDate>
      <link>https://ruby-china.org/topics/12094</link>
      <guid>https://ruby-china.org/topics/12094</guid>
    </item>
  </channel>
</rss>
