<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Artoria</title>
    <link>https://ruby-china.org/Artoria</link>
    <description>对于Elixir和Crystal的态度：滋瓷。 但致力于用Ruby生成直接解决对应的问题。 https://github.com/RGSS3/doremi</description>
    <language>en-us</language>
    <item>
      <title>做了一个关于换源的小工具</title>
      <description>&lt;h2 id="2016-12-2 更新一个注释"&gt;2016-12-2 更新一个注释&lt;/h2&gt;
&lt;p&gt;dalao 们说我钦点安全源 gems.ruby-china.org 的力度不够，那么涉及到 rails 有关的可以使用这个
&lt;code&gt;rails new app -m https://raw.githubusercontent.com/RGSS3/rails-new/master/zh-CN/win/app.rb&lt;/code&gt;
这个不是 gem 换源，而是在已有 rails 情况下提供&lt;code&gt;source “http://gems.ruby-china.org/”&lt;/code&gt;和 devkit 的 url 的硬编码支持&lt;/p&gt;

&lt;p&gt;关于有唯一 option 的情况是否要做成钦点而不是靠自动/手动推荐的问题，真正钦点的例子我只见过&lt;code&gt;like Gecko&lt;/code&gt;&lt;/p&gt;
&lt;h2 id="原贴"&gt;原贴&lt;/h2&gt;
&lt;p&gt;新装好的 Ruby 可以直接运行：&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ruby &lt;span class="nt"&gt;-ropen-uri&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt;&lt;span class="s2"&gt;"puts open('http://codepad.org/CPe9wJuo/raw.rb', &amp;amp;:read)"&lt;/span&gt; | ruby
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;包括：&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;检查现在的源是不是有效&lt;/li&gt;
&lt;li&gt;如果无效或者指定了强制参数 (环境变量 FORCE_SOURCE 存在)，则自动找源，并且验证（一般来说第一个就是 ruby-china 的源)

&lt;ul&gt;
&lt;li&gt;验证说的是比如 gems.github.com 虽然是个有效的源，会被 gem 添加，但是连 rails 这样的 gem 都没有……&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;如果找到了源，设为当前源和 bundler 的默认镜像
也就是说可以直接&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gem &lt;span class="nb"&gt;install &lt;/span&gt;rails 

rails new app &lt;span class="o"&gt;(&lt;/span&gt;不打断&lt;span class="o"&gt;)&lt;/span&gt;  

&lt;span class="nb"&gt;cd &lt;/span&gt;app  

rails s  
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;windows 上也有效
&lt;img src="https://l.ruby-china.com/photo/2016/fdadedac3173097eccf47548723dbcee.png!large" title="" alt=""&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;项目的 github: 
&lt;a href="https://github.com/RGSS3/gemsource" rel="nofollow" target="_blank"&gt;https://github.com/RGSS3/gemsource&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;顺便卖
&lt;a href="https://github.com/RGSS3/doremi" rel="nofollow" target="_blank"&gt;https://github.com/RGSS3/doremi&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;顺便求深圳或远程 Ruby 岗位&lt;/p&gt;</description>
      <author>Artoria</author>
      <pubDate>Wed, 30 Nov 2016 18:01:48 +0800</pubDate>
      <link>https://ruby-china.org/topics/31746</link>
      <guid>https://ruby-china.org/topics/31746</guid>
    </item>
  </channel>
</rss>
