Attempting (and Failing) to Install Foreman Plugin, Fail to locate Gemfile

Folks –

I am currently attempting to install a Foreman plugin using this
documentation
<Foreman :: Plugin Manuals>. I am
running Foreman v. 1.8.2 on a RHEL 6.x server.

Based on my interpretation of the documentation, since the plugin comes in
the form of a Gem that is hosted on GitHum, I am to create the file
'~foreman/bundler.d/Gemfile.local.rb', adding a line giving instruction as
to where the Gem is located, after which I should expect to be able to run
the command 'bundle update hiera-foreman' to install the plugin.

The following are the contents of my '~foreman/bundler.d/Gemfile.local.rb'
file:

root@rhel-vm-test-6a ~foreman # cat ~foreman/bundler.d/Gemfile.local.rb
gem 'hiera-foreman', :git =>
"https://github.com/torrancew/hiera-foreman.git"

When I then proceed to attempt to install the plugin, I receive the
following output, whether I run the 'bundle update' command as 'root' or as
the 'foreman' user:

root@rhel-vm-test-6a ~foreman # sudo su - foreman
-bash-4.1$ bundle update hiera-foreman
Could not locate Gemfile
-bash-4.1$ exit
logout
10 root@rhel-vm-test-6a ~foreman # bundle update hiera-foreman
:frowning:

Could not locate Gemfile

Any input would be greatly appreciated! Thanks in advance,
– Adam

Hello

see comments below in text

> Folks –
>
> I am currently attempting to install a Foreman plugin using this
> documentation
> <Foreman :: Plugin Manuals>. I am
> running Foreman v. 1.8.2 on a RHEL 6.x server.
>
> Based on my interpretation of the documentation, since the plugin comes in
> the form of a Gem that is hosted on GitHum, I am to create the file
> '~foreman/bundler.d/Gemfile.local.rb', adding a line giving instruction as
> to where the Gem is located, after which I should expect to be able to run
> the command 'bundle update hiera-foreman' to install the plugin.

Gemfile.local.rb is loaded from original Gemfile, normally located in
~foreman/ if you install from git. If you install Foreman using rpms the
Gemfile is not there so you can't use bundler. That's why the manual suggests
using gem command to install the gem (gem install --ignore-dependencies hiera-
foreman). Note that you have to be in SCL chroot to install the gem into
correct directories on RHEL 6 (also mentioned in manual - scl enable ruby193
bash). The record in Gemfile.local.rb is just for Foreman to load the gem
after restart.

> The following are the contents of my '~foreman/bundler.d/Gemfile.local.rb'
> file:
>
> root@rhel-vm-test-6a ~foreman # cat ~foreman/bundler.d/Gemfile.local.rb
> gem 'hiera-foreman', :git =>
> "https://github.com/torrancew/hiera-foreman.git"

seems correct

> When I then proceed to attempt to install the plugin, I receive the
> following output, whether I run the 'bundle update' command as 'root' or as
> the 'foreman' user:
>
> root@rhel-vm-test-6a ~foreman # sudo su - foreman
> -bash-4.1$ bundle update hiera-foreman
> Could not locate Gemfile
> -bash-4.1$ exit
> logout
> 10 root@rhel-vm-test-6a ~foreman # bundle update hiera-foreman
>
> :frowning:

>
> Could not locate Gemfile

probably because of packaged based installation

>
>
> Any input would be greatly appreciated! Thanks in advance,
> – Adam

Hope this helps

··· On Wednesday 15 of July 2015 07:17:42 J. Adam Craig wrote:


Marek

> Folks –
>
> I am currently attempting to install a Foreman plugin using this
> documentation
> <Foreman :: Plugin Manuals>. I am
> running Foreman v. 1.8.2 on a RHEL 6.x server.
>
> Based on my interpretation of the documentation, since the plugin comes in
> the form of a Gem that is hosted on GitHum, I am to create the file
> '~foreman/bundler.d/Gemfile.local.rb', adding a line giving instruction as
> to where the Gem is located, after which I should expect to be able to run
> the command 'bundle update hiera-foreman' to install the plugin.
>
> The following are the contents of my '~foreman/bundler.d/Gemfile.local.rb'
> file:
>
> root@rhel-vm-test-6a ~foreman # cat ~foreman/bundler.d/Gemfile.local.rb
> gem 'hiera-foreman', :git =>
> "https://github.com/torrancew/hiera-foreman.git"

As far as I can see, https://github.com/torrancew/hiera-foreman is not a
Foreman plugin, but a Hiera backend. Just installing the gem hiera-foreman
under the Ruby version your Puppet uses should work. Clone the
repository, then run 'gem build' then 'gem install' with your Puppet
Ruby.

··· On 07/15, J. Adam Craig wrote:

When I then proceed to attempt to install the plugin, I receive the
following output, whether I run the ‘bundle update’ command as ‘root’ or as
the ‘foreman’ user:

root@rhel-vm-test-6a ~foreman # sudo su - foreman
-bash-4.1$ bundle update hiera-foreman
Could not locate Gemfile
-bash-4.1$ exit
logout
10 root@rhel-vm-test-6a ~foreman # bundle update hiera-foreman
:frowning:

Could not locate Gemfile

Any input would be greatly appreciated! Thanks in advance,
– Adam


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.
To post to this group, send email to 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.


Daniel Lobato Garcia

@eLobatoss
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
Keybase: https://keybase.io/elobato

Aha! Thanks, folks! I'll give this a try as time allows and report back
if any issues arise. Otherwise, please assume that no news is good news.

Best,
– Adam

··· ______________________ *J. Adam Craig* Linux & Windows Operating Systems Engineer VCU Computer Center 804.828.4886 jacraig@vcu.edu

https://www.ts.vcu.edu/
*Don’t be a phishing victim – VCU and other reputable organizations will
never use email to request that you reply with your password, social
security number or confidential personal information. For more details,
visit http://infosecurity.vcu.edu/phishing.html
http://infosecurity.vcu.edu/phishing.html *

On Mon, Jul 20, 2015 at 9:25 AM, Daniel Lobato Garcia elobatocs@gmail.com wrote:

On 07/15, J. Adam Craig wrote:

Folks –

I am currently attempting to install a Foreman plugin using this
documentation
http://theforeman.org/plugins/#2.3AdvancedInstallationfromGems. I am
running Foreman v. 1.8.2 on a RHEL 6.x server.

Based on my interpretation of the documentation, since the plugin comes
in
the form of a Gem that is hosted on GitHum, I am to create the file
’~foreman/bundler.d/Gemfile.local.rb’, adding a line giving instruction
as
to where the Gem is located, after which I should expect to be able to
run
the command ‘bundle update hiera-foreman’ to install the plugin.

The following are the contents of my
’~foreman/bundler.d/Gemfile.local.rb’
file:

root@rhel-vm-test-6a ~foreman # cat
~foreman/bundler.d/Gemfile.local.rb

gem ‘hiera-foreman’, :git =>
https://github.com/torrancew/hiera-foreman.git

As far as I can see, https://github.com/torrancew/hiera-foreman is not a
Foreman plugin, but a Hiera backend. Just installing the gem hiera-foreman
under the Ruby version your Puppet uses should work. Clone the
repository, then run ‘gem build’ then ‘gem install’ with your Puppet
Ruby.

When I then proceed to attempt to install the plugin, I receive the
following output, whether I run the ‘bundle update’ command as ‘root’ or
as
the ‘foreman’ user:

root@rhel-vm-test-6a ~foreman # sudo su - foreman
-bash-4.1$ bundle update hiera-foreman
Could not locate Gemfile
-bash-4.1$ exit
logout
10 root@rhel-vm-test-6a ~foreman # bundle update hiera-foreman
:frowning:

Could not locate Gemfile

Any input would be greatly appreciated! Thanks in advance,
– Adam


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.
To post to this group, send email to 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.


Daniel Lobato Garcia

@eLobatoss
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
Keybase: https://keybase.io/elobato


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.
To post to this group, send email to 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.