10 Replies

Just to confirm, this is a Spiceworks related question, not just a general Ruby one?

And if so, not quite sure what are you trying to achieve. Generally in order to "require" a gem you need to have it installed, and because (as I understand) you are trying to run a ruby script off the back of the Spiceworks install then if a gem "require" fails than that means it's not shipped with current Spiceworks RoR bundle.

So you would need to run 'gem install %gem_name%' command in order to get it.

basically i want to be able to feed an sql statement into spiceworks and for it to email an exported pdf (produced by prawn) it is so i can get some more informative reports out of spiceworks on a regular basis (rather than the one-table ungrouped output that spiceworks currently produces)

James, I think you are trying to re-invent the wheel here somewhat. So let me just confirm - what you are trying to achieve is to run a complex SQL query and email its output automatically on a regular basis, is that right?

If that is correct, then you can do this in a far easier way - SW can run complex SQL statements out of the box, you just need to switch to SQL view by ticking the "Build this report using SQL" tickbox in the report create/edit mode, and you'll be able to paste your complex SQL query directly rather than use the SW simplied drop-down boxes interface. You can then get outputs from these reports emailed over to you automatically by following through this how-to:

It's following on from that. I would like to expand on that solution by creating a rubyscript that produces a more tailored single document report. I want to squeeze multiple reports into one document.

0

This discussion has been inactive for over a year.

You may get a better answer to your question by starting a new discussion.