Unable to build Rails App in Jenkins using Maven, unable to package gems into jar

I have been working on a rails app for a few months. The company I am
working uses some internal platform to package the Rails app for
deployment. It uses apache maven to do the packaging, and the building
is done on Jenkins. Each build is to package the app into an rpm (with a
tarball as well). Then the rpm is unpacked and installed on a cloud
instance for deployment.

The platform uses jruby and i used ruby for dev, but my app works on
both which it had been for the past 3 months.

I have been building my applications successfully for a long time, until
last friday.

Originally, I made some code change, I was working on investigating the
easiest way to handle background process, i came across using the spawn
plugin (i know it is old) to start a new thread. I tried it on my local
machine, did a mvn install locally, unpack the tar ball, to run locally
and it worked.

However, when I did a git push and perform a build on Jenkins, it failed
with the error:
Gem repo jar was not properly constructed. Please check the output for
errors. Try running bundle install manually to verify the contents of
the Gemfile.
(ArgumentError) marshal data too short -> [Help 1]

Normally, during the build, the platform will bundle all the gems into a
jar file and I have never seen such errors before.I spent sometime in
figuring out what could be wrong but I could not.

So the simplest thing for me to do is to discard my changes by doing a
git reset --hard to the last version that gives a successful build, then
i did a git push -f. To my amazement, the same error popped up.I
reverted it one more and still the same error came up.

I could not figure out how to solve this, can some please help?

I am using Ruby on Rails 3.2.6

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs