Guest User

Untitled

a guest
Mar 8th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. #!/usr/bin/env jruby
  2. require "java"
  3. require "rubygems"
  4. gem "ActiveRecord-JDBC"
  5. gem "activerecord"
  6. require "active_record"
  7.  
  8. java.lang.System.setProperty("javax.net.ssl.keyStore","/Users/kyle/Projects/casttv/trunk/keystore")
  9. java.lang.System.setProperty("javax.net.ssl.keyStorePassword","123456")
  10. java.lang.System.setProperty("javax.net.ssl.trustStore","/Users/kyle/Projects/casttv/trunk/truststore")
  11. java.lang.System.setProperty("javax.net.ssl.trustStorePassword","123456")
  12. java.lang.System.setProperty("javax.net.debug","all")
  13.  
  14. ActiveRecord::Base.establish_connection({
  15. "adapter" => "jdbc",
  16. "driver" => "com.mysql.jdbc.Driver",
  17. "url" => "jdbc:mysql://************/dbname?useSSL=true&requireSSL=true",
  18. "username" => "********",
  19. "password" => "****************"
  20. })
  21.  
  22. class Video < ActiveRecord::Base;end
  23. Video.find :first
Add Comment
Please, Sign In to add comment