运行 rails 使用 jruby 命令时出现 TypeError

TypeError when running rails commands with jruby

我从 MRI 切换到 JRuby,现在在 rails+puma 启动时遇到错误:

$ jruby -S rails s puma
TypeError: no implicit conversion of Regexp into String
   join at org/jruby/RubyArray.java:1760
  <top> at /Users/z/bin/spring:11
   load at org/jruby/RubyKernel.java:955
  <top> at /Users/z/bin/rails:3

rake 命令 运行 很好。

这是我的环境:

$ rvm list

rvm rubies

=* jruby-9.1.12.0 [ x86_64 ]
   ruby-2.3.3 [ x86_64 ]


# => - current
# =* - current && default
#  * - default

$ jruby -v
jruby 9.1.12.0 (2.3.3) 2017-06-15 33c6439 Java HotSpot(TM) 64-Bit Server VM 25.141-b15 on 1.8.0_141-b15 +jit [darwin-x86_64]

$ gem -v
2.6.11

$ java -version
java version "1.8.0_141"
Java(TM) SE Runtime Environment (build 1.8.0_141-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.141-b15, mixed mode)

$ head Gemfile
source 'https://rubygems.org'
ruby '2.3.3', engine: 'jruby', engine_version: '9.1.12.0'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
gem 'active_model_serializers'
# Use Postgres as database
# gem 'pg'
# gem 'pg', '0.17.1', :platform => :jruby, :git => 'git://github.com/headius/jruby-pg.git', :branch => :master
gem 'activerecord-jdbcmysql-adapter', '~> 5.0.pre1'
gem 'puma'

想知道社区是否见过类似的东西。我也尝试使用 bundle exec rails s puma - 同样的问题。

中提到的 RubyGems 修复没有帮助。

不确定 spring 应该在 JRuby 上做什么 - 可能不起作用,不要使用它

gem 'activerecord-jdbcpostgresql-adapter' 不(还)支持 AR 5.x