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
fyber has joined #amber
t1|Mike has quit [Quit: ZNC 1.7.1 - https://znc.in]
t1|Mike has joined #amber
t1|Mike has quit [Changing host]
t1|Mike has joined #amber
<FromGitter> <charleystran> I am having an issue with a query which is really annoying me because it seems so simple. my query is this ```horses = HshHorse.where(raceunique: params[:id]).select``` but it throws this error ```Error: no overload matches 'Granite::Query::Assembler::Pg(HshHorse)#add_aggregate_field' with type Nil``` Does anyone have any idea what I am doing wrong?
<FromGitter> <Blacksmoke16> hmm
<FromGitter> <Blacksmoke16> @charleystran do you have a minimal example i can run that reproduces the issue?
<FromGitter> <drujensen> @charleystran Crystal forces you to handle the `Nil` case at compile time. In ruby, you would have been able to pass Nil and you wouldn't know until runtime that something went wrong. ⏎ It's recommended that you always handle the `Nil` case. In your situation, the `params[:id]` could be Nil. the way to fix this is to assign it to a local variable and handle the else case when `Nil`: ⏎ ⏎ ``````
<FromGitter> <Blacksmoke16> i dont think thats the issue @drujensen, you should be able to pass `nil` there since it would just make the query like `WHERE raceunique IS NULL`
<FromGitter> <Blacksmoke16> which would result in the wrong data being returned, but shouldnt result in a compile error
<FromGitter> <charleystran> I actually think I may have found the issue. Its a legacy database with no id column or primary key. So the default order logic is where its failing
<FromGitter> <Blacksmoke16> 👍
<FromGitter> <drujensen> 👍
<FromGitter> <charleystran> yes, that was it. Thank you both for the responses!
<FromGitter> <Blacksmoke16> np
<FromGitter> <faustinoaq> Hi @/all amber community long time no see. My computer was stolen and I lost access to a lot of things. I managed to update https://aur.archlinux.org/packages/amber/ to v0.30.1 ⏎ ⏎ ((https://i.imgur.com/IoE7yJR.png))
<FromGitter> <Blacksmoke16> oh noes
<FromGitter> <Blacksmoke16> welcome back?
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
<FromGitter> <nsuchy> ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5d894da55d24375b3e0b23a2]
<FromGitter> <nsuchy> weird error I get
<FromGitter> <nsuchy> after running shards install
<FromGitter> <nsuchy> @Blacksmoke16 maybe this is a granite bug
<FromGitter> <Blacksmoke16> try running `shards update`
<FromGitter> <nsuchy> same error
<FromGitter> <nsuchy> ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5d894e56ab4244767bf318e4]
<FromGitter> <Blacksmoke16> uhh
<FromGitter> <Blacksmoke16> what does `ulyer/CrystalProxmox` depend on
<FromGitter> <nsuchy> idk it hasn't been updated in ages
<FromGitter> <Blacksmoke16> basic one of your deps depends on 0.6.0 of `crystal-db`
<FromGitter> <Blacksmoke16> while granite/db drivers here depend on `0.7.0`
<FromGitter> <nsuchy> it has
<FromGitter> <nsuchy> no dependeices
<FromGitter> <nsuchy> pure
<FromGitter> <nsuchy> crystal
<FromGitter> <nsuchy> :D
<FromGitter> <Blacksmoke16> whats your shard.lock
<FromGitter> <Blacksmoke16> its prob some dep of another dep
<FromGitter> <nsuchy> ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5d894f56c7ec2e2208ddcc8a]
<FromGitter> <Blacksmoke16> thats your problem
<FromGitter> <nsuchy> what do I change in my shard.yml file
<FromGitter> <Blacksmoke16> you'll have to wait for that to be merged
<FromGitter> <nsuchy> so like
<FromGitter> <nsuchy> all sites were affected overnight or what happened exactly?
<FromGitter> <nsuchy> can I revert to an older amber version
<FromGitter> <Blacksmoke16> new crystal version got released
<FromGitter> <Blacksmoke16> which apparently broke your shards due to prob using master on everything
<FromGitter> <Blacksmoke16> got into a situation where some are using new compatible code, and others require not yet updated code
<FromGitter> <nsuchy> can confirm production got updated automatically
<FromGitter> <nsuchy> to new crystal release
<FromGitter> <nsuchy> root@panel:~/ulayerpanel# snap revert crystal ⏎ crystal reverted to 0.30.1
<FromGitter> <nsuchy> lets see
<FromGitter> <Blacksmoke16> rip
<FromGitter> <Blacksmoke16> prob not the best idea to use snap in prod as your dep manager...
<FromGitter> <Blacksmoke16> for this very reason
<FromGitter> <nsuchy> lol
<FromGitter> <nsuchy> yeah
<FromGitter> <nsuchy> so at this point
<FromGitter> <nsuchy> readding in those version strings
<FromGitter> <nsuchy> but even then
<FromGitter> <nsuchy> it's pulling newer than needed code
<FromGitter> <nsuchy> I deleted shard.yml and lib folder
<FromGitter> <nsuchy> but now it's not recreating them
<FromGitter> <nsuchy> i mean shard.lock
<FromGitter> <Blacksmoke16> https://snapcraft.io/docs/system-options or at least use the timer one
<FromGitter> <Blacksmoke16> well you have `master` as the branch for like all your shards
<FromGitter> <nsuchy> site back up now so production is fixed with a simple revert
<FromGitter> <nsuchy> trying to fix my dev env now
<FromGitter> <Blacksmoke16> step 1, dont use `master` branch
<FromGitter> <nsuchy> ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5d89544da38dae3a63a79b45]
<FromGitter> <nsuchy> this is my new shards.yml file
<FromGitter> <Blacksmoke16> use specific commit hashes if you need stuff from master that isnt released yet
<FromGitter> <nsuchy> it's not creating a new shard.lock file
<FromGitter> <Blacksmoke16> is there an error?
<FromGitter> <nsuchy> i just restored previous from trash
<FromGitter> <nsuchy> but I want to reinstall all deps from scratch
<FromGitter> <nsuchy> my restored shard.lock file doesn't change when running shards update
<FromGitter> <nsuchy> so it's further ahead that what I'm pulling
<FromGitter> <Blacksmoke16> prob accurate
<FromGitter> <Blacksmoke16> you'd want to set the version of your shards to the last release
<FromGitter> <Blacksmoke16> for those that are using crystal-db
<FromGitter> <Blacksmoke16> as if you use the current release it would require you have the new version of it
<FromGitter> <nsuchy> ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5d89567fa38dae3a63a7a810]
<FromGitter> <nsuchy> this works for now
<FromGitter> <nsuchy> ;)
<FromGitter> <Blacksmoke16> 👍
<FromGitter> <nsuchy> has amber started investigaitng this yet?
<FromGitter> <nsuchy> and whether it could speed up apps
<FromGitter> <Blacksmoke16> idk, prob a bit