{"action":"closed","issue":{"url":"https://api.github.com/repos/headius/jruby-pg/issues/31","labels_url":"https://api.github.com/repos/headius/jruby-pg/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/headius/jruby-pg/issues/31/comments","events_url":"https://api.github.com/repos/headius/jruby-pg/issues/31/events","html_url":"https://github.com/headius/jruby-pg/issues/31","id":129491265,"number":31,"title":"Rails migration failure - Java::JavaLang::NoSuchMethodError: org.jruby.RubyEncoding.newEncoding","user":{"login":"cavneb","id":12481,"avatar_url":"https://avatars.githubusercontent.com/u/12481?v=3","gravatar_id":"","url":"https://api.github.com/users/cavneb","html_url":"https://github.com/cavneb","followers_url":"https://api.github.com/users/cavneb/followers","following_url":"https://api.github.com/users/cavneb/following{/other_user}","gists_url":"https://api.github.com/users/cavneb/gists{/gist_id}","starred_url":"https://api.github.com/users/cavneb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cavneb/subscriptions","organizations_url":"https://api.github.com/users/cavneb/orgs","repos_url":"https://api.github.com/users/cavneb/repos","events_url":"https://api.github.com/users/cavneb/events{/privacy}","received_events_url":"https://api.github.com/users/cavneb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-28T15:57:49Z","updated_at":"2016-01-28T16:47:45Z","closed_at":"2016-01-28T16:47:45Z","body":"I have a Rails app that we converted to use jRuby, along with this gem.\r\n\r\nI have a simple migration:\r\n\r\n```class AddSummarizedOnWithOffsetToTwitterEngagements < ActiveRecord::Migration\r\n  def change\r\n    add_column :twitter_post_engagements, :summarized_on_with_offset, :date, null: false\r\n    add_column :twitter_daily_post_engagements, :summarized_on_with_offset, :date, null: false\r\n  end\r\nend```\r\n\r\nWhen running the migration, I get the following convoluted error:\r\n\r\n```== 20160128152848 AddSummarizedOnWithOffsetToTwitterEngagements: migrating ====\r\n-- add_column(:twitter_post_engagements, :summarized_on_with_offset, :date, {:null=>false})\r\n/Users/eric.berry/.rbenv/versions/jruby-9.0.4.0/lib/ruby/gems/shared/gems/rake-10.5.0/lib/rake/task.rb:189: warning: singleton on non-persistent Java type Java::JavaLang::NoSuchMethodError (http://wiki.jruby.org/Persistence)\r\nrake aborted!\r\nJava::JavaLang::NoSuchMethodError: org.jruby.RubyEncoding.newEncoding(Lorg/jruby/Ruby;Lorg/jcodings/Encoding;)Lorg/jruby/RubyEncoding;\r\norg.jruby.pg.Connection.newPgErrorCommon(Connection.java:1434)\r\norg.jruby.pg.Connection.newPgError(Connection.java:1450)\r\norg.jruby.pg.Result.check(Result.java:107)\r\norg.jruby.pg.Connection.exec(Connection.java:549)\r\norg.jruby.pg.Connection$INVOKER$i$0$2$exec_DBG.call(Connection$INVOKER$i$0$2$exec_DBG.gen)\r\norg.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:201)\r\norg.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:197)\r\norg.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)\r\norg.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:161)\r\norg.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:290)\r\norg.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:77)\r\norg.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:122)\r\norg.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)\r\norg.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:67)\r\norg.jruby.runtime.Block.yieldSpecific(Block.java:116)\r\norg.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:457)\r\norg.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:72)\r\norg.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:191)\r\norg.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:115)\r\norg.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:122)\r\norg.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)\r\norg.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:152)\r\norg.jruby.runtime.BlockBody.yield(BlockBody.java:78)\r\norg.jruby.runtime.Block.yield(Block.java:147)\r\n...```\r\n\r\nI am currently running postgres 9.5 on my local machine, however this error also happens on our prod server, which is running 9.4.\r\n\r\nThank you for your help!\r\n"}}