After installing plugin i get error then i start foreman web page

Hi all,
So installed my plugin into Foreman after running "bundle install" i get:

Gem loading error: cannot load such file – foreman_new (RuntimeError)
/opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:30:in strict_error' /opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:56:inrescue in block in system_require'
/opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:37:in block in system_require' /opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:ineach'
/opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:in system_require&#39; /usr/share/foreman/config/application.rb:13:in<top (required)>'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in require&#39; /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:inrequire'
/usr/share/foreman/config/environment.rb:2:in &lt;top (required)&gt;&#39; /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:inrequire'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in require&#39; config.ru:3:inblock in <main>'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:51:in instance_eval&#39; /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:51:ininitialize'
config.ru:1:in new&#39; config.ru:1:in<main>'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:in eval&#39; /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:inpreload_app'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:150:in &lt;module:App&gt;&#39; /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>'

But if i try to install plugin template from here: "h**ttp://projects.theforeman.org/projects/foreman/wiki/How_to_Create_a_Plugin" i get same error :

*Gem loading error: cannot load such file – my_plugin (RuntimeError)
/opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:30:in strict_error&#39; /opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:56:inrescue in block in system_require'
/opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:37:in block in system_require&#39; /opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:ineach'
/opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:in system_require&#39; /usr/share/foreman/config/application.rb:13:in<top (required)>'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in require&#39; /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:inrequire'
/usr/share/foreman/config/environment.rb:2:in &lt;top (required)&gt;&#39; /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:inrequire'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in require&#39; config.ru:3:inblock in <main>'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:51:in instance_eval&#39; /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:51:ininitialize'
config.ru:1:in new&#39; config.ru:1:in<main>'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:in eval&#39; /usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:inpreload_app'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:150:in &lt;module:App&gt;&#39; /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 *

I'am willing that some one can help me with this problem.

Thanks.

If you've used a ":path" setting in the Gemfile to add your plugin, you
should be aware that this only works on source or Debian installations.
Our production RPM installations work a bit differently and can't load
plugins from local directories.

They need to be fully installed as gems on an RPM installation. You can
build a .gem file from the plugin dir:

gem build foreman_new.gemspec

And then install it on your Foreman server:

scl enable ruby193 'gem install --ignore-dependencies /tmp/foreman_new.gem'

Though it may be best to have a development installation if you're
actively changing it, it works better than a production install.

··· -- Dominic Cleal Red Hat Engineering

On 17/03/15 13:54, Osvaldas Šlapikas wrote:

Hi all,
So installed my plugin into Foreman after running “bundle install” i get:

/Gem loading error: cannot load such file – foreman_new (RuntimeError)
/opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:30:in strict_error' /opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:56:inrescue in block in system_require’
/opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:37:in block in system_require' /opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:ineach’
/opt/rh/ruby193/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:13:in<top (required)>’
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in require' /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:inrequire’
/usr/share/foreman/config/environment.rb:2:in <top (required)>' /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:inrequire’
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in require' config.ru:3:inblock in ‘
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:51:in instance_eval' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:51:ininitialize’
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:inpreload_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:inmodule:PhusionPassenger
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:28:in `’/

But if i try to install plugin template from here: “h**ttp://projects.theforeman.org/projects/foreman/wiki/How_to_Create_a_Plugin” i get same error :

/Gem loading error: cannot load such file – my_plugin (RuntimeError)
/opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:30:in strict_error' /opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:56:inrescue in block in system_require’
/opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:37:in block in system_require' /opt/rh/ruby193/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:ineach’
/opt/rh/ruby193/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:13:in<top (required)>’
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in require' /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:inrequire’
/usr/share/foreman/config/environment.rb:2:in <top (required)>' /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:inrequire’
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in require' config.ru:3:inblock in ‘
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:51:in instance_eval' /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:51:ininitialize’
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:inpreload_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:inmodule:PhusionPassenger
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:28:in /

/
/

I’am willing that some one can help me with this problem.

Thanks.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com
mailto:foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com
mailto:foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.