Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: can't convert String into Array when GEM_PATH is set #47

Closed
maxcom opened this issue Aug 5, 2013 · 13 comments
Closed

TypeError: can't convert String into Array when GEM_PATH is set #47

maxcom opened this issue Aug 5, 2013 · 13 comments

Comments

@maxcom
Copy link

maxcom commented Aug 5, 2013

[INFO] --- sass-maven-plugin:1.1.1:update-stylesheets (default) @ lor ---
[INFO] Compiling SASS Templates
[INFO] Queing SASS Template for compile: /Users/maxcom/git-checkout/lorsource/src/main/webapp/sass => /Users/maxcom/git-checkout/lorsource/target/lor-1.0-SNAPSHOT
TypeError: can't convert String into Array
       + at org/jruby/RubyArray.java:2963
  (root) at <script>:5
org.jruby.embed.EvalFailedException: (TypeError) can't convert String into Array
    at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:136)
    at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:90)
    at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:153)
    at org.jasig.maven.plugin.sass.AbstractSassMojo.executeSassScript(AbstractSassMojo.java:191)
    at org.jasig.maven.plugin.sass.UpdateStylesheetsMojo.execute(UpdateStylesheetsMojo.java:43)

Here is the beginning of that script:

[ERROR] require 'rubygems'
[ERROR] env = { 'GEM_PATH' => [
[ERROR] '/Users/maxcom/git-checkout/lorsource/target/rubygems'
[ERROR] ] }
[ERROR] env['GEM_PATH'] += ENV['GEM_PATH'] unless ENV['GEM_PATH'].nil?
[ERROR] Gem.paths = env

Workaround: unset GEM_PATH before running mvn

mprins added a commit to MinELenI/CBSviewer that referenced this issue Sep 23, 2013
try to unset GEM_PATH.

see: Jasig/sass-maven-plugin#47
@mprins
Copy link
Contributor

mprins commented Sep 23, 2013

So if you run into this problem on TravisCI do something like:

language: java
before_install:
  - unset GEM_PATH
before_script: 
  - mvn -e -Popenlayers
script: mvn -e -Pjenkins verify
jdk:
  - openjdk7

eg. https://github.com/MinELenI/CBSviewer/blob/bb308896f823ab6ad9002ad7e8e06ff3f9fd18e1/.travis.yml

RangerRick added a commit to RangerRick/sass-maven-plugin that referenced this issue Oct 18, 2013
@RangerRick
Copy link
Contributor

FYI, I've got a fix for this in pull request #53

@coreagile
Copy link

Until the pull request gets merged in, does anyone have a workaround for Heroku? I'm having trouble figuring out how to get it to unset the GEM_PATH env.

@coreagile
Copy link

The Heroku folks were super helpful, and sent me on a path of building a custom build pack. So here's one people can use:

https://github.com/scstarkey/heroku-buildpack-java.git

apetro added a commit that referenced this issue Feb 3, 2014
Fix for issue #47, ENV["GEM_PATH"] is not an array when set.
@rdanilin
Copy link

When do you plan to make a release for 1.1.2 ?

HoloRin pushed a commit to cloudfoundry-attic/login-server that referenced this issue Apr 21, 2014
@HoloRin
Copy link

HoloRin commented Apr 29, 2014

+1. We'd also like to see a release since we currently are making do with unset GEM_PATH.

@MozartLino
Copy link

+1 When do you plan to make a release for 1.1.2 ?

@danielfariati
Copy link

+1 When do you plan to make a release for 1.1.2?

2 similar comments
@dhoer
Copy link

dhoer commented Nov 12, 2014

+1 When do you plan to make a release for 1.1.2?

@keesvandieren
Copy link

+1 When do you plan to make a release for 1.1.2?

@dcmoore
Copy link

dcmoore commented Jan 21, 2015

+1. Looking forward to 1.1.2 as I am running into this issue.

@yegor256
Copy link

use this plugin and you'll be fine:

<plugin>
  <groupId>nl.geodienstencentrum.maven</groupId>
  <artifactId>sass-maven-plugin</artifactId>
  <version>2.5</version>
</plugin>

see http://www.geodienstencentrum.nl/sass-maven-plugin/update-stylesheets-mojo.html

@ChristianMurphy
Copy link
Member

This version is no longer maintained. Refer to more recent forks at https://github.com/Jasig/sass-maven-plugin/network for more up to date versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests