Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 04:44
    acodervic edited #12157
  • 04:39
    acodervic edited #12157
  • 04:35
    acodervic labeled #12157
  • 04:35
    acodervic opened #12157
  • Jun 24 20:09
    straight-shoota labeled #12156
  • Jun 24 20:09
    straight-shoota opened #12156
  • Jun 24 20:09
    straight-shoota edited #12155
  • Jun 24 20:05
    straight-shoota edited #12155
  • Jun 24 19:31
    straight-shoota opened #12155
  • Jun 24 19:31
    straight-shoota labeled #12155
  • Jun 24 19:31
    straight-shoota assigned #12155
  • Jun 24 18:54
    straight-shoota labeled #12154
  • Jun 24 18:54
    straight-shoota unlabeled #12154
  • Jun 24 18:26
    beta-ziliani milestoned #12141
  • Jun 24 18:08
    beta-ziliani synchronize #12146
  • Jun 24 14:18
    Blacksmoke16 labeled #12154
  • Jun 24 14:13
    DougEverly opened #12154
  • Jun 24 14:13
    DougEverly labeled #12154
  • Jun 24 14:06
    Blacksmoke16 closed #12153
  • Jun 24 14:06
    Blacksmoke16 labeled #12153
Claudio Holanda
@kazzkiq
How the heck am I suppose to connect to MySQL with password?
Nick Franken
@fridgerator
mysql://user:password@host:port/database_name
Claudio Holanda
@kazzkiq
tried that. failed miserably
Nick Franken
@fridgerator
well thats how you do it
does your password have special characters?
Claudio Holanda
@kazzkiq
module DBConfig
  USERNAME   = "samplename"
  PASSWORD   = "sample123password"
  ADDRESS    = "127.0.0.1"
  PORT       = "3306"
  DBNAME     = "my-db"
  CONNECTION = "mysql://#{USERNAME}:#{PASSWORD}@#{ADDRESS}:#{PORT}/#{DBNAME}"
end
Gives me the error:
No address found for sample123password@127.0.0.1:3310 over TCP (Socket::Error)
Before using password, it worked like a charm.
From IRC (bridge bot)
@FromIRC
<watzon> Looks like the @ is being escaped
<Papierkorb> not to mention the missing colon
<watzon> That too
Claudio Holanda
@kazzkiq
Colon?
From IRC (bridge bot)
@FromIRC
<watzon> Between the username and password
Nick Franken
@fridgerator
its in the CONNECTION variable, but not in the error
From IRC (bridge bot)
@FromIRC
<watzon> Weird
<watzon> Upload your code as a gist or something
Jeremy Woertink
@jwoertink
Anyone here using micrate?
I just tried installing from using brew tap and brew install and I get the dyld: Library not loaded: /usr/local/opt/libevent/lib/libevent-2.0.5.dylib error when running
Claudio Holanda
@kazzkiq
Found the error, my password had an "at" (@), which was conflicting with the syntax from the connection. Even by trying to escape the "@" in the password, the error was still happening.
Jeremy Woertink
@jwoertink
using the latest crystal
Claudio Holanda
@kazzkiq
Removing this character solved the problem.
unreadable
@unreadable
  crystal run src/app.cr
Error in src/app.cr:3: while requiring "kemal-session-redis": can't find file 'kemal-session-redis' relative to '/home/alex/Projects/Crystal/app/src'

require "kemal-session-redis"
I've installed the dependency
Nick Franken
@fridgerator
@jwoertink yes I usually end up having to symlink different libevent in its place
Jeremy Woertink
@jwoertink
I was hoping to just hop in and start cranking stuff out.
Nick Franken
@fridgerator
ln -s /usr/local/opt/libevent/lib/libevent-2.1.6.dylib /usr/local/opt/libevent/lib/libevent-2.0.5.dylib
works for me
Jeremy Woertink
@jwoertink
Thanks. I ended up just making a bin/micrate with the API and using it that way. Seems to be working
unreadable
@unreadable
How can I parse a form with Kemal?
John Jansen
@johnjansen
unreadable
@unreadable
I've read that, thanks. I was actually wondering to do it the kemal way
John Jansen
@johnjansen
kemal is built on top of the stdlib http stuff .. and provides a dsl for routing etc … ill look at the kemal code, but im sure @sdogruyol will defer things like this to the stdlib
unreadable
@unreadable
nice
John Jansen
@johnjansen
wait, it looks like kemal handles this
@krypton97
unreadable
@unreadable
hm, I was trying this
params = ctx.request.body
ctx.response.print params["email"]
and got #
I mean params only
not params["email"]
John Jansen
@johnjansen
was it a application/x-www-form-urlencoded
unreadable
@unreadable
    <form action="/users/signup" method="post">
        <div class="form-group">
            <label>Username</label>
            <input type="text" class="form-control" name="username">
        </div>
        <div class="form-group">
            <label>Email</label>
            <input type="text" class="form-control" name="email">
        </div>
        <div class="form-group">
            <label>Password</label>
            <input type="password" class="form-control" name="password">
        </div>
        <div class="form-group">
            <label>Confirm Password</label>
            <input type="password" class="form-control" name="confirm">
        </div>
        <button type="submit" class="btn btn-warning btn-lg">Signup</button>
    </form>
Just a simple form
From IRC (bridge bot)
@FromIRC
<Papierkorb> ... I got the compiler to compile args = [ ] and then throw an runtime exception
<Papierkorb> That's a new creative one
unreadable
@unreadable
It has to be args = [] of type
From IRC (bridge bot)
@FromIRC
<Papierkorb> Sure. The point is that that shouldn't even compile in the first place.
unreadable
@unreadable
Still beta..
unreadable
@unreadable
Huston, we have a problem..
From IRC (bridge bot)
@FromIRC
<Papierkorb> struct Foo; YAML.mapping(bar: String?); end; Foo.from_yaml(%<bar: "# I'm not a comment">) Kaboom.