[Archivesspace_Users_Group] Plugin gems

Flanagan, Patrick PJFlanagan at ship.edu
Mon Mar 14 15:16:20 EDT 2016


Thank you, Dave and Chris!

I have a problem with bundler / initialize_plugins.sh. I wanted 'truncate_html' to do short summaries of certain fields in the public display. The script worked and installed it (or so it claims) by reading the Gemfile in my plugin. When I go to start aspace after that, it crashes due to not being able to find truncate_html java to install. If I remove the gemfile, it works again, but require 'truncate_html' fails, as though it had never been installed.

It's a gem that is pure Ruby, so I'm surprised this happens. My plugin also fails if I just require 'nokogiri' and that's weird because I'm positive aspace has that already.

The plugin's path for those require statements is
"public/views/search/_result_summary_resource.html.erb"

~Patrick

From: archivesspace_users_group-bounces at lyralists.lyrasis.org [mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org] On Behalf Of Chris Fitzpatrick
Sent: Monday, March 14, 2016 12:53 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] Plugin gems






Hi,







If you just want to develop against a packaged version of ArchivesSpace, you can just use the scripts/initialize_plugins.sh <plugin name> script and it will install your gems.



Also, FYI and loop-back to something I talked with some folks at C4L, I just updated the initialize_plugins.sh script<https://github.com/archivesspace/archivesspace/commit/11a55481a970d02f9ba5691577848550538ebbb6> to unset the GEM_HOME and GEM_PATH variables, which was causing problems with the Redis demo plugin I did ( a problem if you're using something like RVM or Chruby ).

I think that should fix it...no need to do a new update, you can just add those two UNSET lines to an existing script.



b,chris.








Chris Fitzpatrick | Developer, ArchivesSpace
Skype: chrisfitzpat  | Phone: 918.236.6048
http://archivesspace.org/

________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> <archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org>> on behalf of Mayo, Dave <dave_mayo at harvard.edu<mailto:dave_mayo at harvard.edu>>
Sent: Monday, March 14, 2016 5:04 PM
To: Archivesspace Users Group
Subject: Re: [Archivesspace_Users_Group] Plugin gems

ArchivesSpace manages gems using bundler - and kind of a complicated bundler setup.

The best solution is, as far as I understand it, to put the gemfiles in the appropriate place in the plugin, and then run bundler against the relevant gemfile/gemfiles.

There's a build/run task called bundler, which would be run something like this:

./build/run bundler -Dgemfile=backend/Gemfile

- Dave

From:  <Flanagan>, Patrick <PJFlanagan at ship.edu<mailto:PJFlanagan at ship.edu>>
Reply-To:  Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Date:  Monday, March 14, 2016 at 10:09 AM
To:  "archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>" <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Subject:  [Archivesspace_Users_Group] Plugin gems


Good morning,
I'm not exceedingly familiar with rails development. I'm making what should be a simple plugin, but I need a gem installed for it to work.
gem install works on the OS side, but when ArchivesSpace gets to my plugin, it doesn't find the gem with
require. What is the process of making ArchivesSpace aware of new gems for plugins? (Or rather, what is the correct way to do it?) This is for version 1.4.2.
Thank you for your time,
~Patrick Flanagan
KLN Applications Administrator
Keystone Library Network Hub
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20160314/4120bcb3/attachment.html>


More information about the Archivesspace_Users_Group mailing list