Skip to content

Fix ruby instructions and dependencies

Georgi N. Georgiev requested to merge fix-ruby-instructions into master

What does this MR do?

Adds missing instructions and dependencies in order to have a proper ruby setup. Otherwise, specs couldn't be ran with error:

     On host `10.221.188.128'
     Failure/Error: it { should be_file }
     NotImplementedError:
       unsupported key type `ssh-ed25519'
       net-ssh requires the following gems for ed25519 support:
        * ed25519 (>= 1.2, < 2.0)
        * bcrypt_pbkdf (>= 1.0, < 2.0)
       See https://github.com/net-ssh/net-ssh/issues/565 for more information
       Gem::LoadError : "ed25519 is not part of the bundle. Add it to your Gemfile."

Furthermore your local installation of ruby might or might not have been able to build the native extensions for bcrypt_pbkdf:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.6.0/gems/bcrypt_pbkdf-1.1.0/ext/mri
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20210526-45056-7083ly.rb extconf.rb
creating Makefile

current directory: /Library/Ruby/Gems/2.6.0/gems/bcrypt_pbkdf-1.1.0/ext/mri
make "DESTDIR=" clean

current directory: /Library/Ruby/Gems/2.6.0/gems/bcrypt_pbkdf-1.1.0/ext/mri
make "DESTDIR="
make: *** No rule to make target
`/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h',
needed by `bcrypt_pbkdf.o'.  Stop.

Why was this MR needed?

What's the best way to test this MR?

Follow the instructions in the readme and try running some specs with:

bundle exec rspec spec/os_prepare/main_spec.rb

Make sure to follow the instructions in the README to setup the proper env variables

What are the relevant issue numbers?

Edited by Georgi N. Georgiev

Merge request reports