Rails failing on Tomcat with JRuby 9.1.12

I am having problems getting JRuby 9.1.12 to run my Rails project. I was previously on 9.1.2, and that works fine. All I have done is updated JRuby, and now it fails.

To investigate, I created a test project, first using JRuby 9.1.2:

rails new testy --database postgresql
cd testy
rails g scaffold Location name:string

``

Location is a table in an existing database, so quicker for testing. I deleted the migration, copied across database.yml from my project, and edited secret.yml so it uses the same key as the tests. Then:

rake test
warble

``

Then I put the .war into Tomcat and it works fine. So then JRuby 9.1.12:

gem uninstall -v 9.1.2 jruby-jars
gem install -v 9.1.12 jruby-jars
warble

``

I stop Tomcat, delete the old files, and put this new war in. Now I see this when going to a page in testy:

org.jruby.rack.RackInitializationException: java.lang.NullPointerException
at org.jruby.rack.RackInitializationException.wrap(RackInitializationException.java:31)
at org.jruby.rack.RackApplicationFactoryDecorator.init(RackApplicationFactoryDecorator.java:104)
at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:50)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1853)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at java.lang.String.getBytes(Unknown Source)
at org.jruby.ast.SymbolNode.(SymbolNode.java:54)
at org.jruby.parser.ParserSupport.asSymbol(ParserSupport.java:975)
at org.jruby.parser.RubyParser$379.execute(RubyParser.java:4286)
at org.jruby.parser.RubyParser.yyparse(RubyParser.java:1677)
at org.jruby.parser.RubyParser.yyparse(RubyParser.java:1568)
at org.jruby.parser.RubyParser.parse(RubyParser.java:5365)
at org.jruby.parser.Parser.parse(Parser.java:128)
at org.jruby.parser.Parser.parse(Parser.java:77)
at org.jruby.Ruby.parseEval(Ruby.java:2722)
at org.jruby.ir.interpreter.Interpreter.prepareIC(Interpreter.java:211)
at org.jruby.ir.interpreter.Interpreter.evalCommon(Interpreter.java:167)
at org.jruby.ir.interpreter.Interpreter.evalWithBinding(Interpreter.java:200)
at org.jruby.RubyKernel.evalCommon(RubyKernel.java:1033)
at org.jruby.RubyKernel.eval19(RubyKernel.java:1000)
at org.jruby.RubyKernel$INVOKER$s$0$3$eval19.call(RubyKernel$INVOKER$s$0$3$eval19.gen)

``

I have Googled the error, but found nothing, so I am a bit stuck! I am using Java 1.8.0.131 (32 bit), Tomcat 8.0.45 (32 bit), Warbler 2.0.4 on Windows 7 Pro.

Any help or suggestions appreciated.

Here are the gems from gemfile.lock:

GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.9)
actionpack (= 4.2.9)
actionview (= 4.2.9)
activejob (= 4.2.9)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.9)
actionview (= 4.2.9)
activesupport (= 4.2.9)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.9)
activesupport (= 4.2.9)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (4.2.9)
activesupport (= 4.2.9)
globalid (>= 0.3.0)
activemodel (4.2.9)
activesupport (= 4.2.9)
builder (~> 3.1)
activerecord (4.2.9)
activemodel (= 4.2.9)
activesupport (= 4.2.9)
arel (~> 6.0)
activerecord-jdbc-adapter (1.3.23)
activerecord (>= 2.2, < 5.0)
activerecord-jdbcpostgresql-adapter (1.3.23)
activerecord-jdbc-adapter (~> 1.3.23)
jdbc-postgres (>= 9.1)
activesupport (4.2.9)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.4)
builder (3.2.3)
coffee-rails (4.1.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.1.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5-java)
erubis (2.7.0)
execjs (2.7.0)
ffi (1.9.18-java)
globalid (0.4.0)
activesupport (>= 4.2.0)
i18n (0.8.6)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
jdbc-postgres (9.4.1206)
jquery-rails (4.3.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.6-java)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.6)
mime-types (>= 1.16, < 4)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
minitest (5.10.2)
multi_json (1.12.1)
nokogiri (1.8.0-java)
rack (1.6.8)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.9)
actionmailer (= 4.2.9)
actionpack (= 4.2.9)
actionview (= 4.2.9)
activejob (= 4.2.9)
activemodel (= 4.2.9)
activerecord (= 4.2.9)
activesupport (= 4.2.9)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.9)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.8)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (4.2.9)
actionpack (= 4.2.9)
activesupport (= 4.2.9)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.0.0)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rdoc (4.3.0)
sass (3.5.1)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sdoc (0.4.2)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
therubyrhino (2.0.4)
therubyrhino_jar (>= 1.7.3)
therubyrhino_jar (1.7.6)
thor (0.19.4)
thread_safe (0.3.6-java)
tilt (2.0.7)
turbolinks (5.0.1)
turbolinks-source (~> 5)
turbolinks-source (5.0.3)
tzinfo (1.2.3)
thread_safe (~> 0.1)
tzinfo-data (1.2017.2)
tzinfo (>= 1.0.0)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)

PLATFORMS
java

DEPENDENCIES
activerecord-jdbcpostgresql-adapter
coffee-rails (~> 4.1.0)
jbuilder (~> 2.0)
jquery-rails
rails (= 4.2.9)
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
therubyrhino
turbolinks
tzinfo-data
uglifier (>= 1.3.0)

BUNDLED WITH
1.15.1

``