I am attempting to develop a small Foreman module.
Following this
documentation: How to Create a Plugin - Foreman
So I simply cloned the Git repository, renamed it to foreman_myplugin
(using the rename.rb script) and then added the path to Gemfile.local.rb in
/usr/share/foreman/bundler.d.
But I end up with this error.
Gem loading error: cannot load such file – foreman_myplugin (RuntimeError)
> /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:30:in
> strict_error' > /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:56:in >
rescue in block in system_require'
> /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:37:in
> block in system_require' > /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:in >
each'
> /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:in
> system_require' > /usr/share/foreman/config/application.rb:16:in
<top (required)>'
> /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in
> require' > /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in >
require'
> /usr/share/foreman/config/environment.rb:2:in <top (required)>' > /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in >
require'
> /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in
> require' > config.ru:3:in
block in <main>'
> /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/builder.rb:55:in
> instance_eval' > /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/builder.rb:55:in >
initialize'
> config.ru:1:in new' > config.ru:1:in
<main>'
> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:in
> eval' > /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:in >
preload_app'
> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:150:in
> <module:App>' > /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:29:in >
<module:PhusionPassenger>'
> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:28:in
> `<main>'
Any help would be appreciated. My module is going to be pretty simple.
Figured it out. The above method only works on a source deployment of
Foreman.
···
On Sunday, July 3, 2016 at 1:45:26 PM UTC-7, Matthew Ceroni wrote:
>
> I am attempting to develop a small Foreman module.
>
> Following this documentation:
> http://projects.theforeman.org/projects/foreman/wiki/How_to_Create_a_Plugin
>
> So I simply cloned the Git repository, renamed it to foreman_myplugin
> (using the rename.rb script) and then added the path to Gemfile.local.rb in
> /usr/share/foreman/bundler.d.
>
> But I end up with this error.
>
> Gem loading error: cannot load such file -- foreman_myplugin (RuntimeError)
>> /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:30:in
>> `strict_error'
>> /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:56:in
>> `rescue in block in system_require'
>> /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:37:in
>> `block in system_require'
>> /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:in
>> `each'
>> /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:in
>> `system_require'
>> /usr/share/foreman/config/application.rb:16:in `'
>> /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in
>> `require'
>> /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in
>> `require'
>> /usr/share/foreman/config/environment.rb:2:in `'
>> /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in
>> `require'
>> /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in
>> `require'
>> config.ru:3:in `block in '
>> /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/builder.rb:55:in
>> `instance_eval'
>> /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/builder.rb:55:in
>> `initialize'
>> config.ru:1:in `new'
>> config.ru:1:in `'
>> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:in
>> `eval'
>> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:in
>> `preload_app'
>> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:150:in
>> `'
>> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:29:in
>> `'
>> /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:28:in
>> `'
>
>
> Any help would be appreciated. My module is going to be pretty simple.
>