<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>yangyangnote (YangYang)</title>
    <link>https://ruby-china.org/yangyangnote</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>iOS 进程问题</title>
      <description>&lt;h4 id="写了一个协议方法"&gt;写了一个协议方法&lt;/h4&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public func onEvent(event:MidiEvent, ms:Int64) 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;并做了判断 &lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if event is NoteOn {

  myLabel.backgroundColor=UIColor.yellow

}
else if let e = event as? NoteOff {

            myLabel.backgroundColor=UIColor.blue

}
&lt;/code&gt;&lt;/pre&gt;&lt;h4 id="现在我播放MIDI音乐时,不断进入这两个判断,但是为什么Label的颜色不会一直变,而是播完后只显示最后一次的颜色蓝色?"&gt;现在我播放 MIDI 音乐时，不断进入这两个判断，但是为什么 Label 的颜色不会一直变，而是播完后只显示最后一次的颜色蓝色？&lt;/h4&gt;</description>
      <author>yangyangnote</author>
      <pubDate>Mon, 12 Mar 2018 17:18:22 +0800</pubDate>
      <link>https://ruby-china.org/topics/35217</link>
      <guid>https://ruby-china.org/topics/35217</guid>
    </item>
    <item>
      <title>Git 提交问题</title>
      <description>&lt;h2 id="Git 分支合并问题"&gt;Git 分支合并问题&lt;/h2&gt;&lt;h2 id="前提"&gt;前提&lt;/h2&gt;
&lt;p&gt;一般开发的时候，我们是从 master 分支切出来一个自己的开发分支，在本地进行开发和调试。完成之后，可以发布到测试服务器上，这时候你可以选择把开发分支合并到 testing 分支之后把 testing 分支发布到测试服务器。&lt;/p&gt;

&lt;p&gt;现在我已经从 master 分支上切换到我自己的开发分支，并在里面完成了修改。&lt;/p&gt;
&lt;h2 id="问题"&gt;问题&lt;/h2&gt;
&lt;p&gt;这时候我是要把他 commit 以后，push 到远程服务器，在合并到 testing 分支，然后发布到测试服务器
还是把他 commit 以后，先合并到 testing 分支，在用在 testing 分支 push 到远程服务器，在发布到测试服务器呢？感觉是第二种对吗？&lt;/p&gt;

&lt;p&gt;&lt;a href="/Rei" class="user-mention" title="@Rei"&gt;&lt;i&gt;@&lt;/i&gt;Rei&lt;/a&gt; &lt;a href="/nightire" class="user-mention" title="@nightire"&gt;&lt;i&gt;@&lt;/i&gt;nightire&lt;/a&gt; &lt;a href="/awking" class="user-mention" title="@awking"&gt;&lt;i&gt;@&lt;/i&gt;awking&lt;/a&gt; &lt;/p&gt;</description>
      <author>yangyangnote</author>
      <pubDate>Sun, 18 Dec 2016 16:46:46 +0800</pubDate>
      <link>https://ruby-china.org/topics/31928</link>
      <guid>https://ruby-china.org/topics/31928</guid>
    </item>
    <item>
      <title>创建 Rails 新项目遇见问题</title>
      <description>&lt;p&gt;&lt;a href="/Rei" class="user-mention" title="@Rei"&gt;&lt;i&gt;@&lt;/i&gt;Rei&lt;/a&gt; &lt;a href="/xiaoronglv" class="user-mention" title="@xiaoronglv"&gt;&lt;i&gt;@&lt;/i&gt;xiaoronglv&lt;/a&gt; &lt;/p&gt;
&lt;h3 id="已经确定的"&gt;已经确定的&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;ruby 的版本是 2.3.1&lt;/li&gt;
&lt;li&gt;gem 的版本是 2.6.6&lt;/li&gt;
&lt;li&gt;rails 的版本是 5.0.0.1&lt;/li&gt;
&lt;li&gt;RubyGems 下面的镜像只有 gems.ruby-china.org&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="已经做的"&gt;已经做的&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;创建了 rails 目录名字叫 projectrails&lt;/li&gt;
&lt;li&gt;移动到该目录下&lt;/li&gt;
&lt;li&gt;新创建 rails 项目 &lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yydeMacBook-Air% mkdir projectsrails*
yydeMacBook-Air% cd projectsrails*
yydeMacBook-Air% rails new demo --skip-test-unit*
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id="问题"&gt;问题&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;当出现 run bundle install 的并运行到 Using bundler 1.12.5 的时候问题出现了&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your user account isn't allowed to install to the system Rubygems.
  You can cancel this installation and run:&lt;/p&gt;

&lt;p&gt;bundle install --path vendor/bundle&lt;/p&gt;

&lt;p&gt;to install the gems into ./vendor/bundle/, or you can enter your password
  and install the bundled gems to Rubygems using sudo.&lt;/p&gt;

&lt;p&gt;Password:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;当我按第一种要求按退出执行 bundle install --path vendor/bundle,报错说Could not locate Gemfile&lt;/li&gt;
&lt;li&gt;当我按第二种要求输入密码，又出现报错&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using mime-types 3.1
An error occurred while installing byebug (9.0.6), and Bundler cannot continue.
Make sure that &lt;code&gt;gem install byebug -v '9.0.6'&lt;/code&gt; succeeds before bundling.
         run  bundle exec spring binstub --all
bundler: command not found: spring
Install missing gem executables with &lt;code&gt;bundle install&lt;/code&gt;&lt;/p&gt;
&lt;h3 id="总结"&gt;总结&lt;/h3&gt;
&lt;p&gt;因为之前对后端程序不是很了解，所以到现在我不敢轻举妄动，因为盲点比较多，怕越弄越糊涂。希望高人指点。&lt;/p&gt;</description>
      <author>yangyangnote</author>
      <pubDate>Sun, 23 Oct 2016 00:28:38 +0800</pubDate>
      <link>https://ruby-china.org/topics/31411</link>
      <guid>https://ruby-china.org/topics/31411</guid>
    </item>
  </channel>
</rss>
