<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>msm (msm)</title>
    <link>https://ruby-china.org/msm</link>
    <description/>
    <language>en-us</language>
    <item>
      <title>设计关联式数据库的更新功能报错</title>
      <description>&lt;p&gt;设计了一个一对多关系的数据库。它们是
category 和 software
其关系是：
has_many :softwares
belongs_to :category
在 software 的更新页面，编辑好内容，点击更新按钮就出现下面的错误信息
NoMethodError in SoftwaresController#update
undefined method `update' for nil:NilClass
上面的错误信息，看起来是说 update 这个方法没定义，是这样吗？
但实际上，这个方法是定义了的，很迷糊，请朋友们指教
还有个奇怪之处，在 update 方法中，判断 update 成功就返回到 software 的 show 页面，点击更新按钮虽然报错，但看地址栏是 software 的 show 页面，且在地址栏按下回车就成功显示出 software 的 show 页面了。&lt;/p&gt;</description>
      <author>msm</author>
      <pubDate>Tue, 14 Jul 2015 20:45:24 +0800</pubDate>
      <link>https://ruby-china.org/topics/26482</link>
      <guid>https://ruby-china.org/topics/26482</guid>
    </item>
    <item>
      <title>有关组合框的问题</title>
      <description>&lt;p&gt;有一张数据表的数据需要在组合框中列出。现在用的方法是 select_tag。实现了列出数据的目的，但下面不知道怎么获取当前选项的值，一开始以为 select_tag 的第一个参数就是返回的当前选择项的值，结果吧它放在 edit_category_path 的参数表内，网页错误了。看了看地址，发现传进去的参数貌似是个字符串，因为英文很烂，所以自带的帮助文档也不知道怎么用，勉强在网上搜到一个与 select_tag 相关的帮助文档，虽然也是英文的，不过只看了看代码部分，还是没明白，求教了。。。&lt;/p&gt;</description>
      <author>msm</author>
      <pubDate>Sat, 30 May 2015 09:03:49 +0800</pubDate>
      <link>https://ruby-china.org/topics/25818</link>
      <guid>https://ruby-china.org/topics/25818</guid>
    </item>
    <item>
      <title>Ruby 链接 MySQL 提示装载 libmysql.dll 失败</title>
      <description>&lt;p&gt;系统是 XP 32 位，ruby 是 2.0，rails 是 4.2.1，mysql 是 5.6.24。ruby、devkit 和 rails 都安装好后，先安装了 mysql5.6。然后执行 gem install mysql2，根据提示信息，从信息中提供的地址下载了 6.1.5 的 connector，并把其中的 libmysql.dll 拷贝到 ruby 的 bin 目录下。然后用 rails 创建了一个 mysql 的项目，简单的完成前期工作后，启动服务器就报错：
D:\mysql_test&amp;gt;rails server
DL is deprecated, please use Fiddle
Failed to load libmysql.dll from D:\Ruby200\lib\ruby\gems\2.0.0\gems\mysql2-0.3.
18-x86-mingw32\vendor\libmysql.dll。花了数天时间也没能解决，向各位大神求助了！&lt;/p&gt;</description>
      <author>msm</author>
      <pubDate>Tue, 19 May 2015 16:35:31 +0800</pubDate>
      <link>https://ruby-china.org/topics/25645</link>
      <guid>https://ruby-china.org/topics/25645</guid>
    </item>
    <item>
      <title>测试链接 mysql 出现错误</title>
      <description>&lt;p&gt;mysql 服务已启动的，执行下面的语句报错：
require "mysql"
puts("hello,mysql")
错误信息：&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;D:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in &lt;span class="sb"&gt;`&lt;/span&gt;r
equire&lt;span class="s1"&gt;': cannot load such file -- mysql/mysql_api (LoadError)
        from D:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:54:in `require'&lt;/span&gt;
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql-2.9.1-x86-mingw32/lib/mys
ql.rb:6:in &lt;span class="sb"&gt;`&lt;/span&gt;rescue &lt;span class="k"&gt;in&lt;/span&gt; &amp;lt;top &lt;span class="o"&gt;(&lt;/span&gt;required&lt;span class="o"&gt;)&amp;gt;&lt;/span&gt;&lt;span class="s1"&gt;'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql-2.9.1-x86-mingw32/lib/mys
ql.rb:2:in `&amp;lt;top (required)&amp;gt;'&lt;/span&gt;
        from D:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:128:in &lt;span class="sb"&gt;`&lt;/span&gt;require&lt;span class="s1"&gt;'
        from D:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:128:in `rescue in require'&lt;/span&gt;
        from D:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:39:in &lt;span class="sb"&gt;`&lt;/span&gt;require&lt;span class="s1"&gt;'
        from test_mysql.rb:1:in `&amp;lt;main&amp;gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;就看出是装载错误，没明白装载什么出错了，求指教&lt;/p&gt;</description>
      <author>msm</author>
      <pubDate>Wed, 06 May 2015 10:00:35 +0800</pubDate>
      <link>https://ruby-china.org/topics/25450</link>
      <guid>https://ruby-china.org/topics/25450</guid>
    </item>
    <item>
      <title>gem install pry 出现的错误信息，求指教</title>
      <description>&lt;p&gt;在 gem install pry 的时候出现以下的错误信息，貌似是不能连接到指定的服务器，请教下怎样解决：&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Not Found 404 (
http://rubygems.global.ssl.fastly.net/quick/Marshal.4.8/pry-0.10.1-x86-mingw32.gemspec.rz)
&lt;/code&gt;&lt;/pre&gt;</description>
      <author>msm</author>
      <pubDate>Wed, 06 May 2015 09:53:51 +0800</pubDate>
      <link>https://ruby-china.org/topics/25449</link>
      <guid>https://ruby-china.org/topics/25449</guid>
    </item>
    <item>
      <title>怎样查看 Ruby 提供的方法的用法</title>
      <description>&lt;p&gt;搜了下，找到一个 methods，可以列出某类的可调用的方法，但没有看到具体方法的用法。特来求教&lt;/p&gt;</description>
      <author>msm</author>
      <pubDate>Mon, 27 Apr 2015 11:05:47 +0800</pubDate>
      <link>https://ruby-china.org/topics/25331</link>
      <guid>https://ruby-china.org/topics/25331</guid>
    </item>
    <item>
      <title>Ruby on Rails 有关数据查询语句的条件设定的问题</title>
      <description>&lt;p&gt;在阅读一篇讲述 ruby on rails 有关数据查询的文章时，遇到一个例子看不懂，贴上来&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;events = Event.where( ["capacity &amp;gt;= ?", 20 ] ).limit(3).order("id desc")
上述语句的查询条件看不懂，求解，谢谢！
说明：该查询针对的数据表有四个数据，分别是
name:string
description:text
is_public:boolean
capacity:integer&lt;/p&gt;
&lt;/blockquote&gt;</description>
      <author>msm</author>
      <pubDate>Sun, 19 Apr 2015 09:03:04 +0800</pubDate>
      <link>https://ruby-china.org/topics/25195</link>
      <guid>https://ruby-china.org/topics/25195</guid>
    </item>
  </channel>
</rss>
