0

I'm trying to install Ruby 2.6.3 from source for ruby on rails on WSL. Here are the steps I'm taking: First I check the location of openssl using

type -a openssl

and I get

openssl is /usr/bin/openssl

so in the ruby src directory I run ./configure --with-openssl-dir=/usr/bin Then I run make But I get this message somewhere during the make process:

openssl:
        Could not be configured. It will not be installed.
        /mnt/c/Users/MyUserName/Desktop/ruby-2.6.3/ext/openssl/extconf.rb:97: OpenSSL library could not be found. You might want to use --with-openssl-dir=<dir> option to specify the prefix where OpenSSL is installed.
        Check ext/openssl/mkmf.log for more details.

Regardless of this warning, I run in the rails src directory the following:

gem install rails

and get the error:

`require': cannot load such file -- openssl (LoadError)
zengod
  • 1,114
  • 13
  • 26
  • 1
    Possible duplicate of [bundle install fails with SSL certificate verification error](https://stackoverflow.com/questions/10246023/bundle-install-fails-with-ssl-certificate-verification-error) – lacostenycoder Jun 16 '19 at 09:50
  • Try this: `ls -ld /usr/include/openssl/` If it doesn't find, you have to install some more components (platform-dependent, typically `libssl-dev`). The you can re-try configure: `--with-openssl-dir=/usr` – Lorinczy Zsigmond Jun 16 '19 at 10:40
  • @LorinczyZsigmond, upon following your steps, I don't get the openssl error during make. But I still get the error during sudo make install. – zengod Jun 16 '19 at 11:29
  • You might want to quote the error message. – Lorinczy Zsigmond Jun 17 '19 at 03:19
  • It's the same error. `require': cannot load such file -- openssl (LoadError) – zengod Jun 17 '19 at 06:49

1 Answers1

0

I was having the same issue. It's not enough to run configure with the correct directory and make again, you have to delete the files that have already been built. I just deleted the build directory and re-extracted from the tar, make clean probably would have worked too.

nloveladyallen
  • 184
  • 1
  • 10