<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>bgsmgrx (关荣轩)</title>
    <link>https://ruby-china.org/bgsmgrx</link>
    <description/>
    <language>en-us</language>
    <item>
      <title>osx rails 安装失败</title>
      <description>&lt;p&gt;注：
我是使用系统自带的 ruby gem，一敲 rails 命令就提示一下信息，所以我就用它提示的命令去安装:
Rails is not currently installed on this system. To get the latest version, simply type:
    $ sudo gem install rails
You can then rerun your "rails" command.&lt;/p&gt;

&lt;p&gt;有查过一下资料，有的人说是因为系统自带的 ruby 的问题，建议不要用，小弟是小白，对 ruby 不了解，希望各位提点一下；&lt;/p&gt;

&lt;p&gt;在 macbook 上使用#sudo gem install rails -V 安装 rails 提示了下面的错误：
....前面一段都没有问题，从下面开始有问题：
Building native extensions.  This could take a while...
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking if the C compiler accepts ... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
Building nokogiri using packaged libraries.&lt;/p&gt;

&lt;p&gt;The file "/usr/include/iconv.h" is missing in your build environment,
which means you haven't installed Xcode Command Line Tools properly.&lt;/p&gt;

&lt;p&gt;To install Command Line Tools, try running &lt;code&gt;xcode-select --install&lt;/code&gt; on
terminal and follow the instructions.  If it fails, open Xcode.app,
select from the menu "Xcode" - "Open Developer Tool" - "More Developer
Tools" to open the developer site, download the installer for your OS
version and run it.&lt;/p&gt;

&lt;p&gt;*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.&lt;/p&gt;

&lt;p&gt;Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
    --help
    --clean
    --use-system-libraries
    --enable-static
    --disable-static
    --with-zlib-dir
    --without-zlib-dir
    --with-zlib-include
    --without-zlib-include=${zlib-dir}/include
    --with-zlib-lib
    --without-zlib-lib=${zlib-dir}/lib
    --enable-cross-build
    --disable-cross-build
ERROR:  Error installing rails:
    ERROR: Failed to build gem native extension.&lt;/p&gt;

&lt;p&gt;Building has failed. See above output for more information on the failure.&lt;/p&gt;

&lt;p&gt;Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.6.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.6.2/ext/nokogiri/gem_make.out&lt;/p&gt;</description>
      <author>bgsmgrx</author>
      <pubDate>Thu, 02 Jul 2015 13:15:25 +0800</pubDate>
      <link>https://ruby-china.org/topics/26285</link>
      <guid>https://ruby-china.org/topics/26285</guid>
    </item>
    <item>
      <title>每次启动机器 ruby 的环境变量都没有了</title>
      <description>&lt;p&gt;每次启动机器输入 ruby 都提示 ruby 没有安装
手动 source .rvm/scripts/rvm一下就可以了&lt;/p&gt;

&lt;p&gt;~/.bash_profile 文件中也有相对应的设置内容
[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;amp;&amp;amp; source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session &lt;em&gt;as a function&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;但是每次启动终端的时候都提示 ruby 没有安装
这个会是什么原因导致的？&lt;/p&gt;

&lt;p&gt;操作系统版本
Ubuntu 12.04.4 LTS 64bit&lt;/p&gt;</description>
      <author>bgsmgrx</author>
      <pubDate>Wed, 12 Feb 2014 16:58:06 +0800</pubDate>
      <link>https://ruby-china.org/topics/17202</link>
      <guid>https://ruby-china.org/topics/17202</guid>
    </item>
  </channel>
</rss>
