Project

General

Profile

Bug #20434

Can not install Foreman to CentOS7 (probably due to missing rubygem-sqlite3)

Added by Petr Ruzicka over 3 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
Packaging
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Hello.

I'm trying to install Foreman 1.15.2 to CentOS 7 by simply running "foreman-installer".

Here are the packages versions:

  1. rpm -qa|grep -E '(foreman|sqlite)'
    foreman-postgresql-1.15.2-1.el7.noarch
    foreman-installer-1.15.2-1.el7.noarch
    sqlite-3.7.17-8.el7.x86_64
    foreman-release-1.15.2-1.el7.noarch
    foreman-selinux-1.15.2-1.el7.noarch
    foreman-release-scl-3-1.el7.noarch
    foreman-1.15.2-1.el7.noarch
    foreman-proxy-1.15.2-1.el7.noarch
    foreman-cli-1.15.2-1.el7.noarch
    tfm-rubygem-foreman_setup-5.0.0-1.fm1_13.el7.noarch
    tfm-rubygem-hammer_cli_foreman-0.10.2-1.el7.noarch
    foreman-debug-1.15.2-1.el7.noarch

In the logs I can see:

  • /var/log/foreman-installer/foreman.log
    INFO 2017-07-28 07:01:42 main] Puppet has finished, bye!
    [ INFO 2017-07-28 07:01:42 main] Executing hooks in group post
    [DEBUG 2017-07-28 07:01:42 main] Hook /usr/share/foreman-installer/hooks/post/10-post_install_message.rb returned nil
    [ INFO 2017-07-28 07:01:42 main] All hooks in group post finished
    [DEBUG 2017-07-28 07:01:42 main] Exit with status code: 4 (signal was 4)
    [ERROR 2017-07-28 07:01:42 main] Errors encountered during run:
    [ERROR 2017-07-28 07:01:42 main] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[hostname.domain.com]: Could not evaluate: Exception 503 "Service Unavailable" in get request to: https://hostname.domain.com/api/v2/smart_proxies?search=name=%22hostname.domain.com%22
  • /var/log/foreman/apipie_cache.log
    rake aborted!
    Gem::LoadError: Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/connection_specification.rb:177:in `rescue in spec'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/connection_specification.rb:174:in `spec'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_handling.rb:50:in `establish_connection'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/railtie.rb:120:in `block (2 levels) in <class:Railtie>'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:27:in `each'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/railtie.rb:116:in `block in <class:Railtie>'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/initializable.rb:30:in `instance_exec'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/initializable.rb:30:in `run'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/initializable.rb:55:in `block in run_initializers'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/initializable.rb:54:in `run_initializers'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/application.rb:352:in `initialize!'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/railtie.rb:194:in `public_send'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/railtie.rb:194:in `method_missing'
    /usr/share/foreman/config/environment.rb:5:in `<top (required)>'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `block in require'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/application.rb:328:in `require_environment!'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
    /usr/share/foreman/lib/tasks/apipie.rake:6:in `block (2 levels) in <top (required)>'
    Gem::LoadError: Could not find 'sqlite3' (~> 1.3.6) among 93 total gem(s)
    Checked in 'GEM_PATH=/opt/theforeman/tfm/root/usr/share/gems:/opt/rh/sclo-ror42/root/usr/share/gems:/usr/share/foreman/.gem/ruby:/opt/rh/rh-ruby22/root/usr/share/gems:/opt/rh/rh-ruby22/root/usr/local/share/gems/opt/rh/sclo-ror42/root/usr/share/gems:/opt/rh/rh-ruby22/root/usr/local/share/gems', execute `gem env` for
    more information

Looks like installed didn't install "rubygem-sqlite3"...

Please let me know if I'm doing something wrong or if it's a bug.

Thank you

PetrR

History

#1 Updated by Daniel Lobato Garcia over 3 years ago

  • Legacy Backlogs Release (now unused) changed from 276 to 287

#2 Updated by Petr Ruzicka over 3 years ago

  • Status changed from New to Resolved

Hello.

I tried to install Foreman again and it seems to be working fine now. The error mentioned in "/var/log/foreman-installer/foreman.log" disappear and the one in "/var/log/foreman/apipie_cache.log" is still there.

Anyway the installation completed successfully.

I'm going to close this ticket, because it's no longer an issue.

Thank you

PetrR

Petr Ruzicka wrote:

Hello.

I'm trying to install Foreman 1.15.2 to CentOS 7 by simply running "foreman-installer".

Here are the packages versions:

  1. rpm -qa|grep -E '(foreman|sqlite)'
    foreman-postgresql-1.15.2-1.el7.noarch
    foreman-installer-1.15.2-1.el7.noarch
    sqlite-3.7.17-8.el7.x86_64
    foreman-release-1.15.2-1.el7.noarch
    foreman-selinux-1.15.2-1.el7.noarch
    foreman-release-scl-3-1.el7.noarch
    foreman-1.15.2-1.el7.noarch
    foreman-proxy-1.15.2-1.el7.noarch
    foreman-cli-1.15.2-1.el7.noarch
    tfm-rubygem-foreman_setup-5.0.0-1.fm1_13.el7.noarch
    tfm-rubygem-hammer_cli_foreman-0.10.2-1.el7.noarch
    foreman-debug-1.15.2-1.el7.noarch

In the logs I can see:

  • /var/log/foreman-installer/foreman.log
    INFO 2017-07-28 07:01:42 main] Puppet has finished, bye!
    [ INFO 2017-07-28 07:01:42 main] Executing hooks in group post
    [DEBUG 2017-07-28 07:01:42 main] Hook /usr/share/foreman-installer/hooks/post/10-post_install_message.rb returned nil
    [ INFO 2017-07-28 07:01:42 main] All hooks in group post finished
    [DEBUG 2017-07-28 07:01:42 main] Exit with status code: 4 (signal was 4)
    [ERROR 2017-07-28 07:01:42 main] Errors encountered during run:
    [ERROR 2017-07-28 07:01:42 main] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[hostname.domain.com]: Could not evaluate: Exception 503 "Service Unavailable" in get request to: https://hostname.domain.com/api/v2/smart_proxies?search=name=%22hostname.domain.com%22
  • /var/log/foreman/apipie_cache.log
    rake aborted!
    Gem::LoadError: Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/connection_specification.rb:177:in `rescue in spec'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/connection_specification.rb:174:in `spec'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_handling.rb:50:in `establish_connection'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/railtie.rb:120:in `block (2 levels) in <class:Railtie>'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:27:in `each'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/railtie.rb:116:in `block in <class:Railtie>'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/initializable.rb:30:in `instance_exec'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/initializable.rb:30:in `run'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/initializable.rb:55:in `block in run_initializers'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/initializable.rb:54:in `run_initializers'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/application.rb:352:in `initialize!'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/railtie.rb:194:in `public_send'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/railtie.rb:194:in `method_missing'
    /usr/share/foreman/config/environment.rb:5:in `<top (required)>'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `block in require'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/application.rb:328:in `require_environment!'
    /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
    /usr/share/foreman/lib/tasks/apipie.rake:6:in `block (2 levels) in <top (required)>'
    Gem::LoadError: Could not find 'sqlite3' (~> 1.3.6) among 93 total gem(s)
    Checked in 'GEM_PATH=/opt/theforeman/tfm/root/usr/share/gems:/opt/rh/sclo-ror42/root/usr/share/gems:/usr/share/foreman/.gem/ruby:/opt/rh/rh-ruby22/root/usr/share/gems:/opt/rh/rh-ruby22/root/usr/local/share/gems/opt/rh/sclo-ror42/root/usr/share/gems:/opt/rh/rh-ruby22/root/usr/local/share/gems', execute `gem env` for
    more information

Looks like installed didn't install "rubygem-sqlite3"...

Please let me know if I'm doing something wrong or if it's a bug.

Thank you

PetrR

#3 Updated by Tomer Brisker about 2 years ago

  • Category changed from 21 to Packaging

Also available in: Atom PDF