" Install From Source " steps are not working!


I am trying to build foreman from the source on RHEL 7 using the info present in Foreman :: Manual .
but not able to install foreman, Please let me know if there is any other source which have more details to install foreman from the source.

Expected outcome:

“npm install” should install foreman .
Foreman and Proxy versions:
foreman - 1.21
Other relevant data:
Getting the below error while running bundle install --without mysql2 pg test --path vendor with Ruby 2.3 and 2.4

An error occurred while installing i18n (1.5.3), and Bundler cannot continue.
Make sure that `gem install i18n -v '1.5.3'` succeeds before bundling.

the above error persists even though gem install i18n -v '1.5.3' succeeds before executing the bundle install command.

When Ruby 2.6 is used, bundle install command is worked but getting below logs while doing “npm install”

/usr/local/lib/ruby/2.6.0/bundler/lockfile_parser.rb:108:in `warn_for_outdated_bundler_version': You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError)
        from /usr/local/lib/ruby/2.6.0/bundler/lockfile_parser.rb:95:in `initialize'

ARCH : x86
Distribution : RHEL 7.5
node -v : v11.9.0
npm -v : node 6.5.0

RPMs available for RHEL but I am interested in building from source and executing the tests manually. Let me know if what is being missed if the steps given in the manual are correct.

Above issue is solved by using Ruby-2.6.1 but now pre compile assets step RAILS_ENV=production bundle exec rake db:migrate is failing with below logs

Error: Command failed: /home/test/theforeman/foreman/script/plugin_webpack_directories.rb
/usr/local/lib/ruby/2.6.0/bundler/lockfile_parser.rb:108:in `warn_for_outdated_bundler_version': You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError)
        from /usr/local/lib/ruby/2.6.0/bundler/lockfile_parser.rb:95:in `initialize'
        from /usr/local/lib/ruby/2.6.0/bundler/definition.rb:83:in `new'
        from /usr/local/lib/ruby/2.6.0/bundler/definition.rb:83:in `initialize'
        from /usr/local/lib/ruby/2.6.0/bundler/dsl.rb:234:in `new'
        from /usr/local/lib/ruby/2.6.0/bundler/dsl.rb:234:in `to_definition'
        from /usr/local/lib/ruby/2.6.0/bundler/dsl.rb:13:in `evaluate'
        from /usr/local/lib/ruby/2.6.0/bundler/definition.rb:34:in `build'
        from /usr/local/lib/ruby/2.6.0/bundler.rb:135:in `definition'
        from /usr/local/lib/ruby/2.6.0/bundler.rb:118:in `load'
        from /home/test/theforeman/foreman/script/plugin_webpack_directories.rb:12:in `<main>'

    at checkExecSyncError (child_process.js:637:11)
    at execSync (child_process.js:674:13)
    at webpackedDirs (/home/test/theforeman/foreman/script/plugin_webpack_directories.js:45:10)
    at getPluginDirs (/home/test/theforeman/foreman/script/plugin_webpack_directories.js:50:62)
    at packageJsonDirs (/home/test/theforeman/foreman/script/plugin_webpack_directories.js:52:60)
    at Object.<anonymous> (/home/test/theforeman/foreman/script/npm_install_plugins.js:4:1)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
    at Module.load (internal/modules/cjs/loader.js:626:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
npm ERR! errno 1
npm ERR! TheForemanDevDeps@1.20.0 postinstall: `node ./script/npm_install_plugins.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the TheForemanDevDeps@1.20.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/test/.npm/_logs/2019-02-04T07_23_47_203Z-debug.log

This sounds like you may have an outdated Gemfile.lock in the foreman directory, likely from when you tried using Ruby 2.3. Try removing the file and running bundle update