On 20 Sep 2015, at 18:00, Martin Alfke <tux...@gmail.com> wrote: > > On 19 Sep 2015, at 21:14, rhpuppetu...@gmail.com wrote: > >> Thanks Martin for replying. By the way, i'm following your seminars on >> youtube and they are very helpful. The error still persists. >> >> I've tried this earlier but command failed with the following error. >> # puppetserver gem install pg --no-ri --no-rdoc >> Building native extensions. This could take a while... >> ERROR: Error installing pg: >> ERROR: Failed to build gem native extension. >> >> java -jar /usr/share/puppetserver/puppet-server-release.jar -r >> ./siteconf20150919-17955-hjabmk.rb extconf.rb >> >> Error(s) occured while parsing command-line arguments: Unknown option: "-r" >> >> <--- some options ----> >> >> extconf failed, uncaught signal 1 >> >> <--- some output 2 lines —> > > Seems to be a bug. > I can reproduce this error on Debian 7 with puppetserver 2.1.1 > > I have opened a ticket at PuppetLabs: > https://tickets.puppetlabs.com/browse/SERVER-905
I love PuppetLabs guys for their fast feedback and detailed descriptions: Quoting Chris: "I think this is probably expected behavior; Puppet Server runs JRuby, and JRuby doesn't support gems with native extensions. For most of the common gems that fall into this category, there is a suitable alternative that does work with JRuby. You can find general docs on this subject on the JRuby wiki, here: https://github.com/jruby/jruby/wiki/C-Extension-Alternatives It looks like, for pg, they're recommending the activerecord-jdbcpostgresql-adapter instead. Maybe that will be sufficient for your use case?" In your case: puppetserver works as expected. I will close the ticket with PL. > >> >> ============================= >> >> >> On Friday, September 18, 2015 at 1:51:44 AM UTC-5, Martin Alfke wrote: >> >> On 18 Sep 2015, at 04:08, rhpupp...@gmail.com wrote: >> >>> Our puppet master used to run using apache passenger stack. We've recently >>> migrated from passenger to puppetserver. When i run puppet agent -vt on my >>> client, its showing the following error. >>> >>> Error 400 on server : could not autoload >>> puppet/parser/functions/get_location: no such file to load -- pg on node >>> puppetmaster1 >>> >>> puppet master --version : 3.7.5 >>> ruby --version : 1.8.7 patch level 374-2 >>> --------------------- >>> #cat puppet/parser/functions/get_location.rb >>> require 'rubygems' >>> require 'pg' >>> require ‘resolv' >> >> It seems as if you are missing the pg ruby gem within puppet server: >> sudo puppetserver gem install pg --no-ri --no-rdoc >> see: >> https://github.com/puppetlabs/puppet-server/blob/master/documentation/gems.markdown >> >> >> Best, >> Martin >> >>> >>> module Puppet::Parser::Funtions >>> >>> xxxxxx >>> --------------------- >>> >>> I would appreciate if someone help me fixing this issue. >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Puppet Users" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to puppet-users...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/puppet-users/e86265cf-cf4b-4b92-9657-64d5137adf59%40googlegroups.com. >>> >>> For more options, visit https://groups.google.com/d/optout. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to puppet-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/puppet-users/bba04c2b-a309-4219-8a40-d381a7554be7%40googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5B0F9E3D-E75B-42D2-9963-C8D9F2A59EB9%40gmail.com. For more options, visit https://groups.google.com/d/optout.