Ruby v.2.1.0 install but gem update/install fails

I was able to compile and “install” ruby 2.1.0 but am unable to
update/install any gems (error below).

  1. Did I compile this correctly?
  2. I don’t have/use rvm, due to not working with ksh at all. lots of
    other errors.
  3. default shell is kornshell

print $KSH_VERSION
Version AJM 93u+ 2012-08-01

compiled doing: (I attempted to "configure

–with-openssl-dir=/usr/local/bin/openssl", but that did not work either

​> ​
./configure --with-opt-dir=/usr/local/ssl/ --with-gcc=clang
–enable-shared
–enable-pthread CFLAGS=-D_XOPEN_SOURCE=1

make
sudo make install

which openssl
/usr/local/bin/openssl

openssl version
OpenSSL 1.0.1e 11 Feb 2013

echo $PATH
/usr/local/bin:/Users/epeterson/bin:/usr/local/ActivePerl-5.16/bin:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/ssl/bin:.:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Applications/oracle/product/instantclient_64/11.2.0.3.0/bin:/usr/local/mysql//bin

ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin11.0]

gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 2.2.0
  • RUBY VERSION: 2.1.0 (2013-12-25 patchlevel 0) [x86_64-darwin11.0]
  • INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.1.0
  • RUBY EXECUTABLE: /usr/local/bin/ruby
  • EXECUTABLE DIRECTORY: /usr/local/bin
  • SPEC CACHE DIRECTORY: /Users/epeterson/.gem/specs
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86_64-darwin-11
  • GEM PATHS:
    • /usr/local/lib/ruby/gems/2.1.0
    • /Users/epeterson/.gem/ruby/2.1.0
  • GEM CONFIGURATION:
  • REMOTE SOURCES:
  • SHELL PATH:
    • /usr/local/bin
    • /Users/epeterson/bin
    • /usr/local/ActivePerl-5.16/bin
    • /usr/bin
    • /usr/local/bin
    • /usr/local/mysql/bin
    • /opt/local/bin
    • /opt/local/sbin
    • /Applications/Xcode.app/Contents/Developer/usr/bin
    • /usr/local/ssl/bin
    • .
    • /usr/bin
    • /bin
    • /usr/sbin
    • /sbin
    • /usr/local/bin
    • /usr/X11/bin
    • /Applications/oracle/product/instantclient_64/11.2.0.3.0/bin
    • /usr/local/mysql//bin

gem update --verbose
Updating installed gems
GET http://gems.rubyforge.org/specs.4.8.gz
301 Moved Permanently
ERROR: While executing gem … (Gem::Exception)
Unable to require openssl, install OpenSSL and rebuild ruby
(preferred)
or use non-HTTPS sources
/usr/local/lib/ruby/2.1.0/rubygems/request.rb:66:in rescue in configure_connection_for_https' /usr/local/lib/ruby/2.1.0/rubygems/request.rb:39:inconfigure_connection_for_https’
/usr/local/lib/ruby/2.1.0/rubygems/request.rb:94:in connection_for' /usr/local/lib/ruby/2.1.0/rubygems/request.rb:122:infetch’
/usr/local/lib/ruby/2.1.0/rubygems/remote_fetcher.rb:329:in request' /usr/local/lib/ruby/2.1.0/rubygems/remote_fetcher.rb:223:infetch_http’
/usr/local/lib/ruby/2.1.0/rubygems/remote_fetcher.rb:238:in
fetch_http' /usr/local/lib/ruby/2.1.0/rubygems/remote_fetcher.rb:258:infetch_path’
/usr/local/lib/ruby/2.1.0/rubygems/remote_fetcher.rb:291:in
cache_update_path' /usr/local/lib/ruby/2.1.0/rubygems/source.rb:177:inload_specs’
/usr/local/lib/ruby/2.1.0/rubygems/spec_fetcher.rb:266:in tuples_for' /usr/local/lib/ruby/2.1.0/rubygems/spec_fetcher.rb:228:inblock in
available_specs’
/usr/local/lib/ruby/2.1.0/rubygems/source_list.rb:97:in each' /usr/local/lib/ruby/2.1.0/rubygems/source_list.rb:97:ineach_source’
/usr/local/lib/ruby/2.1.0/rubygems/spec_fetcher.rb:222:in
available_specs' /usr/local/lib/ruby/2.1.0/rubygems/spec_fetcher.rb:102:insearch_for_dependency’
/usr/local/lib/ruby/2.1.0/rubygems/commands/update_command.rb:113:in
fetch_remote_gems' /usr/local/lib/ruby/2.1.0/rubygems/commands/update_command.rb:135:inhighest_remote_version’
/usr/local/lib/ruby/2.1.0/rubygems/commands/update_command.rb:264:in
block in which_to_update' /usr/local/lib/ruby/2.1.0/rubygems/commands/update_command.rb:260:ineach’
/usr/local/lib/ruby/2.1.0/rubygems/commands/update_command.rb:260:in
which_to_update' /usr/local/lib/ruby/2.1.0/rubygems/commands/update_command.rb:96:inexecute’
/usr/local/lib/ruby/2.1.0/rubygems/command.rb:305:in
invoke_with_build_args' /usr/local/lib/ruby/2.1.0/rubygems/command_manager.rb:167:inprocess_args’
/usr/local/lib/ruby/2.1.0/rubygems/command_manager.rb:137:in run' /usr/local/lib/ruby/2.1.0/rubygems/gem_runner.rb:54:inrun’
/usr/local/bin/gem:21:in `’

Subject: ruby v.2.1.0 install but gem update/install fails
Date: mar 07 gen 14 02:29:28 -0800

Quoting Eric P. ([email protected]):

I was able to compile and “install” ruby 2.1.0 but am unable to
update/install any gems (error below).

  1. Did I compile this correctly?

Since you have the openssl command in /usr/local/bin,
you have compiled openssl yourself.

Openssl per default installs its development files under
/usr/local/ssl. If you want to keep it this way you must make sure
that pkg-config finds the relative .pc file. This means that you must
include /usr/local/ssl/lib/pkgconfig/ in the PKG_CONFIG_PATH shell
variable. Read the manpage of pkg-config (which is used by Ruby to
know where external libraries can be found).

This is true for Linux. It may also be true for Darwin, but I have no
way to check.

Alternatively, you may want to install openssl under /usr/local, so
that its files may be in more customary locations. Carefully read the
INSTALL file in the openssl directory. It tells you how to do that.

Carlo

Well, that put me farther along the path to using v.2.1

in .profile I added

PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig/
PATH=/usr/local/ssl/bin <- defined before /usr/local/bin

Downloaded latest openssl (1.0.0l 6 Jan 2014)

./Configure darwin64-x86_64-cc
make
make test
sudo make install

Download latest ruby v.2.1.0

./configure --with-opt-dir=/usr/local/ssl/ --with-gcc=clang
–enable-shared
–enable-pthread CFLAGS=-D_XOPEN_SOURCE=1
make
make test
sudo make install

All is mostly good. Some gems I am able to install, others I get an
error.
I.e.

sudo gem install --verbose sys-filesystem
HEAD http://gems.rubyforge.org/latest_specs.4.8.gz
301 Moved Permanently
HEAD https://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
HEAD
https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
304 Not Modified
HEAD http://api.rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
HEAD http://production.s3.rubygems.org/latest_specs.4.8.gz
304 Not Modified
GET
http://gems.rubyforge.org/quick/Marshal.4.8/sys-filesystem-1.1.1.gemspec.rz
301 Moved Permanently
GET
https://rubygems.org/quick/Marshal.4.8/sys-filesystem-1.1.1.gemspec.rz
302 Moved Temporarily
GET
https://s3.amazonaws.com/production.s3.rubygems.org/quick/Marshal.4.8/sys-filesystem-1.1.1.gemspec.rz
200 OK

LOTS more of this 302/304/302/301/200 HTTP codes

ERROR: While executing gem … (Gem::RemoteFetcher::UnknownHostError)
no such name (
http://api.rubygems.org/quick/Marshal.4.8/ffi-1.0.4-x86-mingw32.gemspec.rz)
/usr/local/lib/ruby/2.1.0/rubygems/remote_fetcher.rb:275:in rescue in fetch_path' /usr/local/lib/ruby/2.1.0/rubygems/remote_fetcher.rb:250:infetch_path’
/usr/local/lib/ruby/2.1.0/rubygems/source.rb:140:in fetch_spec' /usr/local/lib/ruby/2.1.0/rubygems/resolver/index_specification.rb:64:inspec’
/usr/local/lib/ruby/2.1.0/rubygems/resolver/specification.rb:85:in
installable_platform?' /usr/local/lib/ruby/2.1.0/rubygems/platform.rb:34:ininstallable?’
/usr/local/lib/ruby/2.1.0/rubygems/resolver.rb:434:in block in select_local_platforms' /usr/local/lib/ruby/2.1.0/rubygems/resolver.rb:433:inselect’
/usr/local/lib/ruby/2.1.0/rubygems/resolver.rb:433:in
select_local_platforms' /usr/local/lib/ruby/2.1.0/rubygems/resolver.rb:208:infind_possible’
/usr/local/lib/ruby/2.1.0/rubygems/resolver.rb:335:in resolve_for' /usr/local/lib/ruby/2.1.0/rubygems/resolver.rb:173:inresolve’
/usr/local/lib/ruby/2.1.0/rubygems/request_set.rb:246:in resolve' /usr/local/lib/ruby/2.1.0/rubygems/dependency_installer.rb:435:inresolve_dependencies’
/usr/local/lib/ruby/2.1.0/rubygems/dependency_installer.rb:371:in
install' /usr/local/lib/ruby/2.1.0/rubygems/commands/install_command.rb:219:ininstall_gem’
/usr/local/lib/ruby/2.1.0/rubygems/commands/install_command.rb:259:in
block in install_gems' /usr/local/lib/ruby/2.1.0/rubygems/commands/install_command.rb:255:ineach’
/usr/local/lib/ruby/2.1.0/rubygems/commands/install_command.rb:255:in
install_gems' /usr/local/lib/ruby/2.1.0/rubygems/commands/install_command.rb:171:inexecute’
/usr/local/lib/ruby/2.1.0/rubygems/command.rb:305:in
invoke_with_build_args' /usr/local/lib/ruby/2.1.0/rubygems/command_manager.rb:167:inprocess_args’
/usr/local/lib/ruby/2.1.0/rubygems/command_manager.rb:137:in run' /usr/local/lib/ruby/2.1.0/rubygems/gem_runner.rb:54:inrun’
/usr/local/bin/gem:21:in `’

On Tue, Jan 7, 2014 at 10:30 PM, Carlo E. Prelz [email protected]
wrote:

Since you have the openssl command in /usr/local/bin,
way to check.

  •           di parlare tanto di amore e di rettitudine? (Chuang-Tzu)
    

*Eric D Peterson | DBA | *Rhapsody International Inc.

1420 - 5th Avenue* | Suite 1500 | Seattle | WA | *98101

Email: mailto:[email protected] [email protected] * |
*Office: (206)
747-eric

All the music you want. 10 bucks a month.

Listen to over 20 million songs on your PC, iphone®, ipod Touch® or
Android™.
More at www.rhapsody.com

On Jan 10, 2014, at 13:35, Ryan D. [email protected] wrote:

The latest version for mingw32 is 1.9.3, so I’m guessing you’re trying to
install something (directly or indirectly) that is very old and/or unmaintained.

FWIW, this installs fine for me:

10004 % gem i -i xxx !$
gem i -i xxx sys-filesystem
Fetching: ffi-1.9.3.gem (100%)
Building native extensions. This could take a while…
Successfully installed ffi-1.9.3
Fetching: sys-filesystem-1.1.1.gem (100%)
Successfully installed sys-filesystem-1.1.1
Parsing documentation for ffi-1.9.3
Installing ri documentation for ffi-1.9.3
Parsing documentation for sys-filesystem-1.1.1
Installing ri documentation for sys-filesystem-1.1.1
Done installing documentation for ffi, sys-filesystem after 135 seconds
2 gems installed

On Jan 8, 2014, at 16:19, Eric P. [email protected] wrote:

In your debugging output it says:

  • x86_64-darwin-11

but here you’re trying to install:

no such name
(http://api.rubygems.org/quick/Marshal.4.8/ffi-1.0.4-x86-mingw32.gemspec.rz)

which, in and of itself, doesn’t make sense. But if you look at what’s
available (gem list -d -r ffi):

ffi (1.9.3, 0.6.3)
Platforms:
0.6.3: x86-mswin32
1.9.3: java, ruby, x64-mingw32, x86-mingw32
Author: Wayne M.
Homepage: http://wiki.github.com/ffi/ffi

Ruby FFI

The latest version for mingw32 is 1.9.3, so I’m guessing you’re trying
to install something (directly or indirectly) that is very old and/or
unmaintained.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs