I upgrade my ruby from 2.0.0 to 2.4.1,then run gem install 'foreman_chef'
[root@foreman tfm]# gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.6.14
- RUBY VERSION: 2.4.1 (2017-03-22 patchlevel 111) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-2.4.1
- USER INSTALLATION DIRECTORY: /root/.gem/ruby/2.4.0
- RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-2.4.1/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-2.4.1/bin
- SPEC CACHE DIRECTORY: /root/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/rvm/gems/ruby-2.4.1
- /usr/local/rvm/gems/ruby-2.4.1@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/rvm/gems/ruby-2.4.1/bin
- /usr/local/rvm/gems/ruby-2.4.1@global/bin
- /usr/local/rvm/rubies/ruby-2.4.1/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /opt/puppetlabs/bin
- /usr/local/rvm/bin
- /root/bin
[root@foreman tfm]#
[root@foreman tfm]# ll /usr/local/rvm/gems/ruby-2.4.1/gems/foreman
foreman_chef-0.6.0/ foreman-tasks-0.11.0/ foreman-tasks-core-0.2.4/
[root@foreman tfm]# mv /opt/theforeman/tfm/root/usr/share/gems/gems/{foreman_chef-0.5.0,foreman-tasks-0.10.0,foreman-tasks-core-0.2.0} /usr/local/src/backup/
[root@foreman tfm]#cp /usr/local/rvm/gems/ruby-2.4.1/gems/foreman* /opt/theforeman/tfm/root/usr/share/gems/gems/
[root@foreman tfm]#systemctl restart foreman-proxy
when i click "Create host" the error happend:
Oops, we're sorry but something went wrong Missing partial foreman_chef/hosts/_chef_tab with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :rabl]}. Searched in: * "/usr/share/foreman/app/views" * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_chef-0.5.0/app/views" * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.10.0/app/views" * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_setup-5.0.0/app/views" * "/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.4/app/views"
Back
Documentation