-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Having trouble getting up and running #444
Comments
Ok, I was able to get past the initial connection with this patch to Jennifer::Adapter::Base#connection_string: module Jennifer
module Adapter
abstract class Base
def connection_string(type : ConnectionType)
URI.new(
self.class.protocol,
config.host,
config.port.try(&.>(0)) ? config.port : nil,
type.db? ? config.db : "",
connection_query,
- config.user,
+ config.user.blank? ? nil : config.user,
config.password && !config.password.empty? ? config.password : nil
).to_s
end
end
end
end I seem to have run into another issue with creating the migration metadata table:
Both of those queries execute fine in a local postgres shell. No results are returned. Since the message is "Channel is closed" I don't think I believe that it's a query problem anyway. |
I spent some time collaborating with @crimson-knight on this, and he suggested just bypassing the migrations and creating the tables manually for now, which got me up and running. Having done that, I'm able to run a full CRUD on my tables. I don't know what the problem is with the receive channel, but I'm able to move forward without issue by just managing the schema myself. |
I'm having the same issue where trying to run databases without specifying a user and a password in the config doesn't work. It would be nice if I could just use whoami and omit the password like Rob suggested |
the fix was merged into the master branch (but hasn't been release yet). Please take a look did it address your use case |
It finds my
When I try to enter an empty password I get a |
I'm tinkering with Jennifer, and you've got a lot here! It looks like a great project and I'm excited to get started.
However, I'm having a bit of trouble getting the database connected. It's printing a stack trace which seems to indicate that it's having trouble getting connected, but I'm not sure why because there's no actual error message. I've configured the logging to
debug
level and still no error messages.I attempted to use a database.yml file as I'm used to using in Rails, where the default user is
whoami
and the password is unnecessary because I'm locally authenticated:That didn't work:
That's ok, so I created the database manually:
createdb beetle_development
And then I switched to using a database uri:
Which left me with less information about why it's failing:
I have to be done for the day but I wonder if I'm still tripping on something by using implicit user and password in the connection string. I modified my jennifer.cr to emit the connection string like this:
And now I'm able to prove that the url itself works, like this:
Is there a way to turn on error messages, so I can have a better idea what's happening?
The text was updated successfully, but these errors were encountered: