<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>BigNerdCoding (BigNerdCoding)</title>
    <link>https://ruby-china.org/BigNerdCoding</link>
    <description>知我罪我，其惟春秋</description>
    <language>en-us</language>
    <item>
      <title>Ubuntu 16.04 部署出错</title>
      <description>&lt;p&gt;参照教程 [地址][&lt;a href="https://www.digitalocean.com/community/tutorials/deploying-a-rails-app-on-ubuntu-14-04-with-capistrano-nginx-and-puma" rel="nofollow" target="_blank"&gt;https://www.digitalocean.com/community/tutorials/deploying-a-rails-app-on-ubuntu-14-04-with-capistrano-nginx-and-puma&lt;/a&gt;]，进行部署实验出现如下几个错误，急求解答：&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;使用 rails s 或者 rails s -b 0.0.0.0 能够拉起服务而 rails server --binding="IP" 则出现如下错误：&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;initialize': Cannot assign requested address - bind(2) for "IP"
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;使用 cap production deploy:initial 进行部署的时候出现错误：&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(Backtrace restricted to imported tasks)
cap aborted!
Don't know how to build task 'start' (see --tasks)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;请各位大师给解答一下疑问&lt;/p&gt;</description>
      <author>BigNerdCoding</author>
      <pubDate>Sat, 18 Mar 2017 23:31:51 +0800</pubDate>
      <link>https://ruby-china.org/topics/32577</link>
      <guid>https://ruby-china.org/topics/32577</guid>
    </item>
    <item>
      <title>Rails 中 Model 的属性验证出错 undefined local variable or method</title>
      <description>&lt;p&gt;最近开始学 Rails，买了安道的书。在做练习的时候出现了一个很奇怪的问题：&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;User&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ApplicationRecord&lt;/span&gt;
    &lt;span class="n"&gt;validates&lt;/span&gt; &lt;span class="nb"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;presence: &lt;/span&gt;&lt;span class="kp"&gt;true&lt;/span&gt;
    &lt;span class="n"&gt;validates&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;presence: &lt;/span&gt;&lt;span class="kp"&gt;true&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;加上 email 的验证会出现如下图所示错误，百思不解。希望能够得到解答&lt;/p&gt;

&lt;p&gt;&lt;img src="https://l.ruby-china.com/photo/2016/3cdf10f00af0d7f6c2abf8bda25f8bdb.jpeg!large" title="" alt=""&gt;&lt;/p&gt;</description>
      <author>BigNerdCoding</author>
      <pubDate>Mon, 12 Dec 2016 22:09:26 +0800</pubDate>
      <link>https://ruby-china.org/topics/31890</link>
      <guid>https://ruby-china.org/topics/31890</guid>
    </item>
  </channel>
</rss>
