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
vivus has quit [Remote host closed the connection]
robacarp has quit [Ping timeout: 240 seconds]
robacarp has joined #amber
feepbot has quit [Ping timeout: 264 seconds]
feepbot has joined #amber
feepbot has quit [Ping timeout: 246 seconds]
feepbot has joined #amber
<FromGitter> <zaidakram> Hey guys, Need some help with deployment of amber application.
<FromGitter> <eliasjpr> Hey
<FromGitter> <eliasjpr> How can we be helpful?
<FromGitter> <zaidakram> I'm trying to run the final binary, but it keeps running in development mode.
<FromGitter> <zaidakram> I compiled it using `shards build <your-app> --release`
<FromGitter> <eliasjpr> you need to specify the AMBER_ENV=production
<FromGitter> <eliasjpr> AMBER_ENV=production ./bin/yourapp
<FromGitter> <zaidakram> I did specify that as well.
<FromGitter> <zaidakram> But its not working
<FromGitter> <eliasjpr> are you able to run in production locally?
<FromGitter> <zaidakram> Haven't tested that on locally. Let me see.
<FromGitter> <eliasjpr> k
<FromGitter> <zaidakram> Thank you in advance for quick help.
<FromGitter> <eliasjpr> My pleasure :)
<FromGitter> <eliasjpr> Anything that we can do to get you up and running
<FromGitter> <zaidakram> Nop. Its still running in development mode from the bin, locally.
<FromGitter> <eliasjpr> can you run `AMBER_ENV=production amber w`
<FromGitter> <zaidakram> I'm using `cr-dotenv` shard for maintain my ENV vars in a `.env` file. Could that be a problem?
<FromGitter> <eliasjpr> mmm
<FromGitter> <eliasjpr> not sure how cr-dotenv works
<FromGitter> <eliasjpr> mmm
<FromGitter> <eliasjpr> How are you loading the Dotenv?
<FromGitter> <eliasjpr> in which file are you calling it from?
<FromGitter> <zaidakram> In an initializer I'm doing `require "dotenv"; Dotenv.load`
<FromGitter> <zaidakram> Thats it
<FromGitter> <eliasjpr> Ahh!
<FromGitter> <eliasjpr> `Dotenv.load Amber.env`
<FromGitter> <eliasjpr> I believe you have to pass it the environment no?
<FromGitter> <eliasjpr> and in your `.env` file you should have `AMBER_ENV=production`
<FromGitter> <zaidakram> Yes
<FromGitter> <zaidakram> > `Dotenv.load Amber.env` ⏎ This could be it. Let me try...
<FromGitter> <eliasjpr> well that will load and `.production` env file
<FromGitter> <zaidakram> BTW `AMBER_ENV=production amber w` is working fine. It launched app in `production` mode.
<FromGitter> <eliasjpr> So I am guessing that it might have something to do with dotenv
<FromGitter> <eliasjpr> and I am thinking that by the time the Dotenv file loads Amber already has defaulted to development
<FromGitter> <zaidakram> Could be. Yeah. I think then I should move all my env vars to respective env yaml files.
<FromGitter> <zaidakram> Like in development and production.yml, etc..
<FromGitter> <eliasjpr> in your application.cr file can you put that line of code ⏎ ⏎ ```require “dotenv" ⏎ Dotenv.load``` [https://gitter.im/amberframework/amber?at=5bb76a295331811c2e53ba7e]
<FromGitter> <eliasjpr> Lets see if by first loading Dotenv solve the issue
<FromGitter> <zaidakram> Okay
<FromGitter> <eliasjpr> Also if you are using lots of env vars you can just load those on the application.cr settings section
<FromGitter> <zaidakram> Adding those 2 lines in `application.cr` worked. You were right, by the time the Dotenv file loads Amber already has defaulted to development.
<FromGitter> <eliasjpr> you might be able to leave it in the initializer, but require explicitly in `application.cr`
<FromGitter> <eliasjpr> in fact I would move the initializer at the root level of application.cr
<FromGitter> <zaidakram> Yeah, doing that now. Thanks for your help. Really appreciate it.
<FromGitter> <eliasjpr> and require it as the first thing in application.cr
<FromGitter> <zaidakram> > and require it as the first thing in application.cr ⏎ Got it.
<FromGitter> <zaidakram> You guys are doing great job. Keep up the good work!!
<FromGitter> <eliasjpr> Thanks!
<FromGitter> <eliasjpr> :)
<FromGitter> <eliasjpr> I would like to invite you to write a blog post about your experience with amber
<FromGitter> <eliasjpr> That will help us a lot
<FromGitter> <zaidakram> > I would like to invite you to write a blog post about your experience with amber
<FromGitter> <zaidakram> Sure. Sign me up!
<FromGitter> <vusaalab> HI guys do you know how to upload large files with amber
<FromGitter> <eliasjpr> You can, but as in any web app server I would recommend using chunk
<FromGitter> <vusaalab> chunk any sample code or guideline for amber chunk ?
<FromGitter> <vusaalab> Thanks
<FromGitter> <eliasjpr> Im busy at the moment
<FromGitter> <eliasjpr> I would have help you more
<FromGitter> <eliasjpr> but if you search for chunk upload you should find resources
<FromGitter> <vusaalab> @eliasjpr Thank you i gonna build api for video upload for my ruby application
vivus has joined #amber
<FromGitter> <eliasjpr> Sweet!