harvard-library/aspace-import-excel

please help with install issue

gdfarr opened this issue · 20 comments

Hi Bobbi,

I attempted to install your aspace-import-excel plugin on a windows platform, using version 2.1.1 ... I am operating with 2.5 version of ASpace. Unfortunately, after what I thought was a success in running the initialize-plugin.bat script and getting confirmation that 4 gems were installed, there still seems to be an obstacle in getting ASpace back online. The server message I received was:

Bundler could not find compatible versions for gem "bundler": In Gemfile: rails (= 5.0.1) java was resolved to 5.0.1, which depends on bundler (< 2.0, >= 1.3.0) java Current Bundler version: bundler (2.0.1) This Gemfile requires a different version of Bundler. Perhaps you need to update Bundler by running gem install bundler? Could not find gem 'bundler (< 2.0, >= 1.3.0)', which is required by gem 'rails (= 5.0.1)', in any of the sources. from C:/archivesspace/plugins/aspace-import-excel/gems/gems/bundler-2.0.1/lib/bundler/resolver.rb:56:in start' from C:/archivesspace/plugins/aspace-import-excel/gems/gems/bundler-2.0.1/lib/bundler/resolver.rb:22:in resolve' from C:/archivesspace/plugins/aspace-import-excel/gems/gems/bundler-2.0.1/lib/bundler/definition.rb:258:in resolve' from C:/archivesspace/plugins/aspace-import-excel/gems/gems/bundler-2.0.1/lib/bundler/definition.rb:170:in specs' from C:/archivesspace/plugins/aspace-import-excel/gems/gems/bundler-2.0.1/lib/bundler/definition.rb:237:in specs_for' from C:/archivesspace/plugins/aspace-import-excel/gems/gems/bundler-2.0.1/lib/bundler/definition.rb:226:in requested_specs' from C:/archivesspace/plugins/aspace-import-excel/gems/gems/bundler-2.0.1/lib/bundler/runtime.rb:108:in block in requested_specs' from C:/archivesspace/plugins/aspace-import-excel/gems/gems/bundler-2.0.1/lib/bundler/runtime.rb:20:in setup' from C:/archivesspace/plugins/aspace-import-excel/gems/gems/bundler-2.0.1/lib/bundler.rb:107:in setup' from C:/archivesspace/plugins/aspace-import-excel/gems/gems/bundler-2.0.1/lib/bundler/setup.rb:20:in

' from org/jruby/RubyKernel.java:961:in require' from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1:in (root)' from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:133:in <main>' from org/jruby/RubyKernel.java:961:in require' from C:/archivesspace/data/tmp/jetty-0.0.0.0-8080-frontend.war-_-any-/webapp/WEB-INF/config/boot.rb:10:in (root)' from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1:in (root)' from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55:in require' from uri:classloader:/jruby/rack/rails/environment3.rb:23:in ' from C:\archivesspace\launcher\launcher.rb:92:in start_server' from C:\archivesspace\launcher\launcher.rb:168:in main' from C:\archivesspace\launcher\launcher.rb:261:in `'

You're seeing this error because you use JRuby::Rack::ErrorApp::ShowStatus

Could you possibly help me get this issue resolved?

Many thanks in advance,
Greg

Gregory D. Farr

Archivist

Episcopal Church in Connecticut

The Commons

290 Pratt Street | Box 52 | Meriden CT 06450
p 203-639-3501 x135

f 203-235-1008
gfarr@episcopalct.org

Hi, Greg,

I'm a little hampered by the fact that I don't have a Windows version of Aspace to experiment with.

We're looking into the possibility that the fact that the Bundler team has released a new version of Bundler (https://bundler.io/blog/2019/01/03/announcing-bundler-2.html) may be causing a problem, and we're trying to figure out a way to resolve this.

Stay tuned! I'm sorry about the delay.

Hi Greg,

Would you try installing this version of the plugin: https://github.com/harvard-library/aspace-import-excel/archive/issue_46.zip

And letting me know if you have the same problem?

Hi, Greg,

Would you attach the Gemfile.lock file that should be directly under the \aspace-import-excel\ folder?
Thanks

Hi, Greg,

I looked at the Gemfile.lock file you sent me, and it doesn't look like the one we expected to see. Please confirm that you performed (or re-perform) the following steps:

  1. Delete the plugins\aspace-import-excel folder
  2. Download the zip file at https://github.com/harvard-library/aspace-import-excel/archive/issue_46.zip
  3. Extract the zip file into \plugins, then rename the folder from aspace-import-excel-issue_46 to aspace-import-excel
  4. run the initialize-plugins script.

After that, we would expect the Gemfile.lock to look exactly like https://github.com/harvard-library/aspace-import-excel/blob/issue_46/Gemfile.lock , which isn't what you sent me.

I'm going to be off-line for a few hours, but my colleague @pobocks will be monitoring the situation.

Sorry this is such a hassle.

Hi, Greg,

You'll have to email it to my address, since it seems attachments don't come through when you send email through GitHub. Or go to this issue in GitHub, and attach or copy/paste there.

Hey, could you try deleting the plugin entirely and using the one from the zip-file, one more time, verifying:

  • that the directory includes a Gemfile.lock BEFORE you run the install
  • that that file looks like:
GEM
  remote: http://rubygems.org/
  specs:
    mini_portile2 (2.4.0)
    nokogiri (1.10.0)
      mini_portile2 (~> 2.4.0)
    rubyXL (3.3.29)
      nokogiri (>= 1.4.4)
      rubyzip (>= 1.1.6)
    rubyzip (1.2.2)

PLATFORMS
  ruby

DEPENDENCIES
  rubyXL (= 3.3.29)

BUNDLED WITH
   1.17.1

Yes please.

Hi,

If you're on the archivesspace-users mailing list, you will already have seen that we don't know (yet) how to fix this problem; I'm sorry for the delay. It seems that the new Bundler release isn't Playing Well With Others, despite their original assurances. We're in touch with lyrasis about this, as a fix may need to "come from the top" (we suspect that initializing any plugin with a Gemfile will have this problem! :-(

See also #47

Hi, Greg,

I may have a solution to installing aspace-import-excel on Windows. Would you be willing to spend a little experimenting with me?

If so, I have a script to confirm what your bundler version (in the core ArchivesSpace), then, if it looks good, a modified initialize-plugin script, which I, at least, have been able to use to successfully install it on my local Windows repo.

I'm emailing the two scripts to you.

Ok,
We solved Greg's problem by a combination of the issue_46 branch, which will be incorporated into a new release, and by using a modified \scripts\initialize-plugin.bat that replicates the bundler version detection that is found in scripts/initialize-plugin.sh

I had Greg delete the aspace-import-excel folder, and then unzip the issue_46 branch zip file.

After that, he ran the following script, which he had placed in the scripts folder. @lorawoodford, I'm not sure how to get this into the distribution; I'm thinking that I should add an etc/ directory to my repo with extensive directions on its use until it gets absorbed into the core base.

Here's modified_initialize-plugin.bat

@echo off 

SETLOCAL ENABLEDELAYEDEXPANSION

cd /d %~dp0..\plugins\%1

for /d %%a in (..\..\gems\gems\bundler-*) do set bnm=%%a
for /f "tokens=1* delims=-" %%a in ("%bnm%") do set vers=%%b
echo %vers%

set JRUBY=
FOR /D %%c IN (..\..\gems\gems\jruby-*) DO (
  set JRUBY=!JRUBY!;%%c\lib\*
)

set GEM_HOME=gems
java %JAVA_OPTS% -cp "..\..\lib\*!JRUBY!" org.jruby.Main -S gem install bundler -v "%vers%"
java %JAVA_OPTS% -cp "..\..\lib\*!JRUBY!" org.jruby.Main -S ..\..\gems\bin\bundle install --gemfile=Gemfile

Addressed in Release v2.1.18.

In addition, a Pull Request was made against core ArchivesSpace code to fix the problem at the source.