Hi there,

I'm trying to create a Sinatra/JRuby app with a MySQL database using the 
jdbc-mysql gem. I work at New Relic and am trying to troubleshoot a 
customer's problem by replicating their environment, so unfortunately, 
changing my toolset is not an option. I'm getting an error when I try to 
connect to the database (the screenshot of the trace is at the bottom).

This is my Gemfile:
source 'https://rubygems.org'

ruby '2.3.3', engine: 'jruby', engine_version: '9.1.10.0'

gem 'sinatra'
gem 'rack'

gem 'nokogiri', platform: :jruby
gem 'jdbc-mysql', platform: :jruby
gem 'sequel'
gem 'sinatra-sequel'

gem 'pry-nav'

gem 'rack-test'

gem 'newrelic_rpm', :path => "../../ruby_agent"
gem 'agent_snoop', :path => "../../agent_snoop"



This is the file where I set up my database:
require 'sinatra/sequel'
require 'jdbc/mysql'

Sequel.connect(adapter: 'jdbc/mysql', host: 'localhost', user: 'dscheider', 
database: 'pelicans', username: 'root')

migration "create teh pelicans table" do
  database.create_table :pelicans do
    primary_key :id
    text        :name
    integer     :age

    index [:name, :age], :unique => true
  end
end


class Pelican < Sequel::Model
end


And this is my config.ru file:
require './app'
run Sinatra::Application


When I run `bundle exec rackup`, I get the following error:

<https://lh3.googleusercontent.com/-iaYrwQk7J_I/WaCFOx2MBLI/AAAAAAAAAAY/cq04a0xv4YobQTC3LE4wStt6gTt91zduACLcBGAs/s1600/Screen%2BShot%2B2017-08-25%2Bat%2B1.14.26%2BPM.png>




When I run `rackup`, the error is slightly different:

<https://lh3.googleusercontent.com/--H4xpRQYzOg/WaCFGshU3aI/AAAAAAAAAAU/98j0uRPoRZMlFnFhBVAq4_SL-AJOhU3bgCLcBGAs/s1600/Screen%2BShot%2B2017-08-25%2Bat%2B1.13.53%2BPM.png>

I'm running out of ideas and am hoping somebody else will have some.

Thanks!
Dana Scheider

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to