faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
_whitelogger has joined #amber
<FromGitter> <damianham> @anamba I forked your liquid shard into ambercommunity, it would be great if you could keep that fork up to date with any future changes you make. Many thanks
<FromGitter> <0x2C6> how can I change encoding? I know crystal uses utf8 by default but when I try to render a letter as a json it returns weird characters on the browser(Safari) How can I change this encoding?
feepbot has quit [Ping timeout: 258 seconds]
feepbot has joined #amber
<FromGitter> <anamba> @damianham Okay. I was going to do that, but wanted to wait a bit since I'm making a lot of changes right now. Tons of changes. Trying to build it up to be Jekyll compatible (with a few Crystal-flavored extras)
<FromGitter> <nsuchy> What text editors are you using?
<FromGitter> <nsuchy> Currently I use TextMate but the Crystal bundle is lacking and ECR isn’t syntax highlighted at all
<FromGitter> <nsuchy> I prefer something that is not Electron based
<FromGitter> <Blacksmoke16> sublime?
<FromGitter> <nsuchy> I thought sublime was also electron
<FromGitter> <nsuchy> It’s not?
<FromGitter> <Blacksmoke16> python c++ afaik
<FromGitter> <nsuchy> Oh
<FromGitter> <nsuchy> I’ll give it a try
<FromGitter> <Blacksmoke16> https://github.com/crystal-lang-tools/sublime-crystal will also want that
<FromGitter> <nsuchy> Thanks
<FromGitter> <Blacksmoke16> can we do another amber-router release https://github.com/amberframework/amber-router/pull/15 fixes some issue with `0.28.0` with latest version
<FromGitter> <Blacksmoke16> due to it defining a `<=?`
<FromGitter> <nsuchy> @Blacksmoke16 that's nice but there's no syntax highlighting for .ecr files
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
<FromGitter> <nsuchy> any advise here?
<FromGitter> <Blacksmoke16> change syntax to html
<FromGitter> <Blacksmoke16> `view => syntax => html`
<FromGitter> <Blacksmoke16> @nsuchy
<FromGitter> <Blacksmoke16> actuall
<FromGitter> <Blacksmoke16> `view => syntax => rails => html (rails)`
<FromGitter> <Blacksmoke16> ecr is pretty much crystal version of erb so should work pretty good
<FromGitter> <nsuchy> how do I make it persistent?
<FromGitter> <nsuchy> So I don't have to reselect html each time
<FromGitter> <Blacksmoke16> at very top
<FromGitter> <Blacksmoke16> `open all with this extension as`
<FromGitter> <Blacksmoke16> under syntax
<FromGitter> <nsuchy> thanks
<FromGitter> <Blacksmoke16> np
<FromGitter> <mixflame> we will run into a probably somewhere where the ERB highlighting doesn't match the Crystal language, such as when declaring a variable as a type
<FromGitter> <mixflame> with ```as```
<FromGitter> <mixflame> 99% of the time it works though, so use that for now until someone makes an ECR template
<FromGitter> <nsuchy> request.client_ip and client_ip are not working properly
<FromGitter> <nsuchy> How do I fetch the client's IP address of a request in a controller
<FromGitter> <nsuchy> ```code paste, see link```
<FromGitter> <mixflame> this is how I'm doing it, seems to work might be wrong tho. The header must be provided by a front-end proxy or NGINX
<FromGitter> <mixflame> ```ip = request.headers["X-Forwarded-For"].to_s rescue ""```
<FromGitter> <mixflame> this is a known crystal bug
<FromGitter> <mixflame> or isse
<FromGitter> <Blacksmoke16> https://github.com/crystal-lang/crystal/pull/7610 was released
<FromGitter> <mixflame> yeah looks good @Blacksmoke16 I will update my code, or maybe not, since I am using a reverse proxy and the header seems to be provided
<FromGitter> <mixflame> in theory I want crystal running on the very frontend but my current setup isn't doing that (free setup)
<FromGitter> <mixflame> i'd like to make a docker image that can run on heroku out of it, i think that would boost deployment
<FromGitter> <mixflame> in that setup there might not be a proxy or nginx in front