I am trying to install foreman in ubuntu 12.04, After adding apt source and executing foreman-installer command giving me the below error.
/usr/lib/ruby/vendor_ruby/kafo/puppet_module_parser.rb:21:in `initialize': uninitialized constant Puppet::Parser::Parser (NameError)
Couldn't find much in google....
How to solve it??
I followed this tutorial for installing puppet master and puppet agent
https://coderwall.com/p/w6oxug/puppet-installation-on-ubuntu-12-04lts
Everything was working fine until I uninstall ruby, rvm, gem, bundler etc and made a fresh install of rvm, ruby update to 2.3.0.
I updated ruby to 2.3.0, updated gem, bundlet... But If I type puppet -V, I am getting the below error
sudo service puppet start
- Starting puppet agent /usr/bin/puppet:3:in `require': no such file to load -- puppet/util/command_line (LoadError) from /usr/bin/puppet:3
Gem Environment:
RubyGems Environment:
- RUBYGEMS VERSION: 2.5.1
- RUBY VERSION: 2.3.0 (2015-12-25 patchlevel 0) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/share/rvm/gems/ruby-2.3.0
- USER INSTALLATION DIRECTORY: /home/user/.gem/ruby/2.3.0
- RUBY EXECUTABLE: /usr/share/rvm/rubies/ruby-2.3.0/bin/ruby
- EXECUTABLE DIRECTORY: /usr/share/rvm/gems/ruby-2.3.0/bin
- SPEC CACHE DIRECTORY: /home/user/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/share/rvm/gems/ruby-2.3.0
- /usr/share/rvm/gems/ruby-2.3.0@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/share/rvm/gems/ruby-2.3.0/bin
- /usr/share/rvm/gems/ruby-2.3.0@global/bin
- /usr/share/rvm/rubies/ruby-2.3.0/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/games
- /usr/lib/jvm/jdk1.7/bin
- /home/glassfish/bin
- /usr/share/rvm/bin
- /home/user/.rvm/bin
- /home/user/.rvm/bin
UPDATE 2:
rvm -v rvm 1.27.0 (latest) by Wayne E. Seguin , Michal Papis [https://rvm.io/]
ruby -v ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
rails -v Rails 5.0.0.1
gem -v 2.6.6
which ruby
/home/user/.rvm/rubies/ruby-2.3.0/bin/ruby
which rails
/home/user/.rvm/gems/ruby-2.3.0/bin/rails
which gem
/home/user/.rvm/rubies/ruby-2.3.0/bin/gem
UPDATE 3:
foreman-installer
File /var/log/foreman-installer/foreman-installer.log not writeable, won't log anything to file! /home/user/.rvm/gems/ruby-2.3.0/gems/kafo-0.9.4/lib/kafo/puppet_module.rb:69:in `parse': No Puppet module parser is installed and no cache of the file /usr/share/foreman-installer/modules/foreman/manifests/init.pp is available. Please check debug logs and install optional dependencies for the parser. (Kafo::ParserError)
UPDATE 4:
Almost close to finishing installation:
I was using puppet 4 gem and that was causing UPDATE 3 errors. I downgraded puppet to version 3.7 and reinstalled highline and kafo gems
gem install puppet -v 3.7
gem install highline
gem install kafo
Then tried
foreman-installer
Preparing installation Done
Something went wrong! Check the log for ERROR-level output The full log is at /var/log/foreman-installer/foreman-installer.log
In log, I can see these errors,
[ERROR 2016-08-30T08:13:17 main] Errors encountered during run:
[ERROR 2016-08-30T08:13:17 main] Could not autoload puppet/parser/functions/add_progress: cannot load such file -- kafo/modules/kafo_configure/lib/kafo/puppet/report$
[ERROR 2016-08-30T08:13:17 main] Could not autoload puppet/parser/functions/add_progress: cannot load such file -- kafo/modules/kafo_configure/lib/kafo/puppet/report$
[ERROR 2016-08-30T08:13:17 main] Could not autoload puppet/parser/functions/add_progress: cannot load such file -- kafo/modules/kafo_configure/lib/kafo/puppet/report$
Could not autoload puppet/parser/functions/add_progress: cannot load such file -- kafo/modules/kafo_configure/lib/kafo/puppet/report_wrapper
Current System Config
rails -v
Rails 4.2.2
ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux]
gem -v
2.4.8
bundler -v
Bundler version 1.12.5
puppet -V
3.7.0
The above errors are for foreman-installer 1.4 and 1.7,
when I try 1.3 installer,
'uninitialized constant Kafo::KafoConfigure (NameError) '
UPDATE 5: I can conclude one thing now....
It's all about finding the
right puppet version,
right kafo version,
right foreman-installer,
right ruby version and
right gem version for ubuntu 12.04
IF anyone succeeded in installing foreman-installer 1.4 in ubuntu 12.04, please give me the version no for all above mentioned
This guide assumes that you have a newly installed operating system, on which the installer will setup Foreman, a Puppet master, and the Smart Proxy by default.
Do you have puppet installed? – Anwar Aug 29 '16 at 6:31to_specs': Could not find 'puppet' (>= 0) among 53 total gem(s) (Gem::LoadError) Checked in 'GEM_PATH=/usr/share/rvm/gems/ruby-2.3.0:/usr/share/rvm/gems/ruby-2.3.0@global', execute
gem env` for more information from /usr/share/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/dependency.rb:328:into_spec' from /usr/share/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in
gem' – Kenshin Aug 29 '16 at 8:39