On 29/10/16 08:50, Doug Scoular wrote: > Hi All, > I'm afraid I'm a newbie to foreman, puppet and ruby but I have been > tasked with getting up to speed with writing foreman plugins. > > I followed the foreman-vagrant guide > at: https://github.com/garystafford/foreman-vagrant which gave me 3 VMs: > > theforeman.example.com > agent01.example.com > agent02.example.com > > All are managed by foreman version 1.9.3 and running under CentOS > 7.0.1406 with puppet version 3.8.7.
Foreman 1.9.3 is very old. The current stable version is 1.13.1, and the development series is 1.14. This repo isn't part of our documentation, I would recommend using a development installation by following https://theforeman.org/contribute.html > All seems to work well however when I cloned the foreman_plugin_template > from: > > https://github.com/theforeman/foreman_plugin_template Please note that plugins should only be installed on _development_ copies of Foreman. If Foreman is installed through packages, it isn't suitable for developing on. > And tried to follow the instructions... I was stymied when I went to use > bundle to install my plugin: > > [vagrant@theforeman foreman_my_plugin]$ *bundle install* > Fetching gem metadata from https://rubygems.org/............ > Fetching additional metadata from https://rubygems.org/.. > Resolving dependencies... > Installing rake 11.3.0 > Installing concurrent-ruby 1.0.2 > Installing i18n 0.7.0 > Installing minitest 5.9.1 > Installing thread_safe 0.3.5 > Installing tzinfo 1.2.2 > > > Gem::InstallError: activesupport requires Ruby version >= 2.2.2. > An error occurred while installing activesupport (5.0.0.1), and > Bundler cannot continue. > Make sure that `gem install activesupport -v '5.0.0.1'` succeeds > before bundling. Run `bundle install` in your Foreman directory after adding the plugin to bundler.d/Gemfile.local.rb, not in the plugin. Again, this will only work properly on a git checkout of Foreman, it shouldn't be attempted on a package installation. -- Dominic Cleal [email protected] -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
