title: Unable to do bundle install and gem install bundler -v 1.17.3 with ruby version ruby-1.8.7-p374
body: <p>OS in use:  Mac OS High Sierra
  Version: 10.13.6</p>
  
  <p>I have an RVM installed with the following Ruby versions:</p>
  
  <pre><code>
  MAC-070618-A:website anujaw$ rvm list
     ruby-1.8.7-head [ i686 ]
     ruby-1.8.7-p358 [ i686 ]
  =&gt; ruby-1.8.7-p374 [ i686 ]
   * ruby-2.3.7 [ x86_64 ]
     ruby-2.4.0 [ x86_64 ]
  
  # =&gt; - current
  # =* - current &amp;&amp; default
  #  * - default
  
  </code></pre>
  
  <p>Ruby version I need for running an app locally on my machine is: ruby-1.8.7-p374
  I am trying to do a <code>bundle install</code> and getting below error:</p>
  
  <pre><code>/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems.rb:241:in `bin_path': can't find gem bundler (&gt;= 0.a) (Gem::GemNotFoundException)
      from /usr/local/bin/bundle:22:in `&lt;main&gt;'
  
  </code></pre>
  
  <p>When I do <code>gem install bundler</code> as below, I get an error:</p>
  
  <pre><code>
  MAC-070618-A:website anujaw$ gem install bundler -v 1.17.3
  ERROR:  Loading command: install (LoadError)
      no such file to load -- openssl
  ERROR:  While executing gem ... (NoMethodError)
      undefined method `invoke_with_build_args' for nil:NilClass
  
  </code></pre>
  
  <p>I already have OpenSSL installed, see below:</p>
  
  <pre><code>    MAC-070618-A:website anujaw$ brew info openssl
      openssl: stable 1.0.2q (bottled) [keg-only]
      SSL/TLS cryptography library
      https://openssl.org/
      /usr/local/Cellar/openssl/1.0.2o_2 (1,792 files, 12.3MB)
        Poured from bottle on 2018-07-23 at 14:37:12
      /usr/local/Cellar/openssl/1.0.2q (1,794 files, 12.1MB)
        Poured from bottle on 2019-01-30 at 14:12:51
      From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/openssl.rb
      ==&gt; Caveats
      A CA file has been bootstrapped using certificates from the SystemRoots
      keychain. To add additional certificates (e.g. the certificates added in
      the System keychain), place .pem files in
        /usr/local/etc/openssl/certs
  
      and run
        /usr/local/opt/openssl/bin/c_rehash
  
      openssl is keg-only, which means it was not symlinked into /usr/local,
      because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.
  
      If you need to have openssl first in your PATH run:
        echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' &gt;&gt; ~/.bash_profile
  
      For compilers to find openssl you may need to set:
        export LDFLAGS="-L/usr/local/opt/openssl/lib"
        export CPPFLAGS="-I/usr/local/opt/openssl/include"
  
      For pkg-config to find openssl you may need to set:
        export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
  
      ==&gt; Analytics
      install: 465,985 (30 days), 1,553,385 (90 days), 6,076,848 (365 days)
      install_on_request: 59,235 (30 days), 217,436 (90 days), 854,397 (365 days)
      build_error: 0 (30 days)
  
  </code></pre>
  
  <p>Kindly advise how to get past this obstacle? Thanks.</p>