- cannot load such file -- openssl
- cannot load such file -- zlib
You missed configure make to compile with those 2 libraries. Follow these steps to fix this issue.
- Remove the installed Ruby with make clean
- Install libssl-dev with your OS's package manager of choice. E.g. apt-get install libssl-dev
- Install zlib1g-dev with your OS's package manager of choice. E.g. apt-get install zlib1g-dev
- Config make file to include openssl by go to
ext/openssl and run ruby extconf.rb - Config make file to include zlib by go to
ext/zlib and run ruby extconf.rb - Go back to ruby source code directory run make && make install
- You should be able to successfully run gem install bundler
You can also do the same thing for readline. Install libreadline-dev and run extconf.rb in ext/readline
Tested with ruby 2.0.0p247
Credit: