Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:47
    straight-shoota closed #12051
  • 13:47
    straight-shoota closed #12050
  • 12:17
    beta-ziliani edited #7318
  • May 15 08:43
    r00ster91 closed #7318
  • May 15 08:17
    r00ster91 closed #7690
  • May 14 17:01
    Blacksmoke16 labeled #11995
  • May 14 13:03
    webhive closed #12055
  • May 14 10:19
    straight-shoota milestoned #12051
  • May 14 10:00
    I3oris edited #12051
  • May 14 08:45
    oprypin review_requested #11977
  • May 13 23:29
    Blacksmoke16 unlabeled #12061
  • May 13 22:56
    Blacksmoke16 edited #12061
  • May 13 22:56
    Blacksmoke16 edited #12061
  • May 13 22:54
    Blacksmoke16 labeled #12061
  • May 13 22:54
    Blacksmoke16 labeled #12061
  • May 13 22:54
    Blacksmoke16 labeled #12061
  • May 13 22:54
    Blacksmoke16 opened #12061
  • May 13 20:14
    straight-shoota labeled #12060
  • May 13 20:14
    straight-shoota labeled #12060
  • May 13 20:14
    straight-shoota opened #12060
unreadable
@unreadable
does kemal support template engines?
From IRC (bridge bot)
@FromIRC
<watzon> You can also create a custom middleware if you want to use an engine other than ECR http://kemalcr.com/docs/middlewares/
unreadable
@unreadable
thanks, works like a charm!
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&#64;127.0.0.1:3310 over TCP &#40;Socket::Error&#41;
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