Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 24 02:30

    drujensen on dj-upgrade-micrate

    (compare)

  • Nov 24 02:29

    drujensen on master

    Upgrade to latest micrate (#124… (compare)

  • Nov 24 02:29
    drujensen closed #1241
  • Nov 22 22:22
  • Nov 22 11:24
  • Nov 22 04:02
    drujensen synchronize #1241
  • Nov 22 04:02

    drujensen on dj-upgrade-micrate

    upgrade node (compare)

  • Nov 22 03:48
    drujensen synchronize #1241
  • Nov 22 03:48

    drujensen on dj-upgrade-micrate

    upgrade docker version (compare)

  • Nov 21 17:28
    drujensen opened #1241
  • Nov 21 17:27

    drujensen on dj-upgrade-micrate

    Upgrade to latest micrate This… (compare)

  • Nov 17 15:42

    drujensen on master

    Unify AbstractStore#update API … (compare)

  • Nov 17 15:42
    drujensen closed #1240
  • Nov 17 15:42
    drujensen closed #1239
  • Nov 17 14:46
    bcardiff opened #1240
  • Nov 16 00:54
  • Nov 14 22:48
    drujensen commented #1239
  • Nov 13 20:02
    bcardiff opened #1239
  • Nov 13 15:48
    bcardiff opened #434
  • Nov 12 13:52
    Blacksmoke16 labeled #433
Damian Hamill
@damianham
BTW I always use docker and docker-compose so once you have configured the docker-compose.yml file it is a breeze to run your app along with the database container
Kirill Kulikov
@ikaru5

Hi there! Using granite I have a lot of Selects firing to DB if I do

List.all.each do |list|
  list.items.each do |item|
    puts item.name
    #...

Can I make just one call to DB like includes in Rails?

George Dietrich
@Blacksmoke16
idt
could do like Items.all then build out a map of list.id => items, and do same idea with items, select them all, map id to name, then use that hash
Massimiliano Bertinetti
@maxbertinetti
Elias Perez
@eliasjpr
@maxbertinetti how does Crystalline compares to Scry?
Massimiliano Bertinetti
@maxbertinetti
@eliasjpr it works
Elias Perez
@eliasjpr
haha
ok
Elias Perez
@eliasjpr
@maxbertinetti I got the following error trying to install it
~/workspaces/crystalline master
❯ crystal build ./src/crystalline.cr  -o ./bin/crystalline --release --no-debug --progress  -Dpreview_mt
/usr/bin/ld: /usr/share/crystal/src/llvm/ext/llvm_ext.o: in function `llvm::MetadataTracking::track(llvm::Metadata*&)':
llvm_ext.cc:(.text._ZN4llvm16MetadataTracking5trackERPNS_8MetadataE[_ZN4llvm16MetadataTracking5trackERPNS_8MetadataE]+0x42): undefined reference to `llvm::MetadataTracking::track(void*, llvm::Metadata&, llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*>)'
collect2: error: ld returned 1 exit status
Error: execution of command failed with code: 1: `cc "${@}" -o /home/eperez/workspaces/crystalline/bin/crystalline  -rdynamic -L/usr/bin/../lib/crystal/lib -lyaml -lz `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'` `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcrypto'` /usr/share/crystal/src/llvm/ext/llvm_ext.o `"/usr/bin/llvm-config-10" --libs --system-libs --ldflags 2> /dev/null` -lstdc++ -lpcre -lm -lgc -lpthread /usr/share/crystal/src/ext/libcrystal.a -levent_pthreads -levent -levent -lrt -ldl`
Massimiliano Bertinetti
@maxbertinetti
The linker doesn't find some library.
Which OS are you in?
BTW follow the advices here
Elias Perez
@eliasjpr
Im using POP OS
Massimiliano Bertinetti
@maxbertinetti
Try using llvm 8 or use llvm 10 with the symlink as advised on the forum post
Elias Perez
@eliasjpr
Got it
Thanks!
Massimiliano Bertinetti
@maxbertinetti

Thanks!

You are welcome!

Massimiliano Bertinetti
@maxbertinetti
@eliasjpr for Cristalline now is possible to download the binary
Elias Perez
@eliasjpr
Sweet!
Elias Perez
@eliasjpr
Got Crystalline up and running
1 reply
Ivan
@VanyaNeytrino
Hello. For some reason, migrations do not work for me. Has anyone faced such a problem?
From IRC (bridge bot)
@FromIRC
<DTZUZU> Anyone know if there's a sublime text syntax highlighting for .slang files ?
Dru Jensen
@drujensen
@VanyaNeytrino did I break something? What version of micrate do you have? Should be 0.8.0.
Ivan
@VanyaNeytrino
@drujensen yes, micrate 0.8.0
hmm, there is a table with users in the database, amber gives an error: relation "users" does not exist
Dru Jensen
@drujensen
Check permissions and owner
Make sure everything matches
Ivan
@VanyaNeytrino
Hm… Database creation and deletion commands work fine
it should be enough right
Aravinda Vishwanathapura
@aravindavk
@VanyaNeytrino I had similar silent failure when there was an syntax error in index creation(in migration file). I ran the SQL statements in psql shell directly to understand if any issues.
Ivan
@VanyaNeytrino
CREATE TABLE users ( id BIGSERIAL PRIMARY KEY, email VARCHAR, hashed_password VARCHAR, created_at TIMESTAMP, updated_at TIMESTAMP ); SQL code valid @aravindavk
Andree Wille
@AndreeWille
Hi! I am currently struggling with controller specs testing authenticated routes. Does amber have a test helper function to sign users in?
Ivan
@VanyaNeytrino
Hello. How can Amber use parameters to update the model?
puts "AAAAAA!!! #{params.to_h}”
result: AAAAAA!!! {}
params | _method: patch 12:58:21 params params | _csrf: KGpsXb-brlWFAAAGKahIOZ08yf59aABmR1J_6Zhy5GMljdCbwaq-wgp0gYSVT2B_a_-we_qBqMdBgJHzIFA5bQ== 12:58:21 params params | name: Абутилон 2 12:58:21 params params | usage: ytb
Aravinda Vishwanathapura
@aravindavk
@VanyaNeytrino params.to_h will be available only for the validated params using validation api. To access the params without validation use params.to_unsafe_h or access induvidual fields like params[“name”]
Anmol B.
@ceezuns
hey folks, first time crystal and amber user here!
im trying to use the auth system and i keep getting the error that the table users does not exist, but i've ran the amber db create command and the migrate command
and i don't recieve any errors, does anyone have any ideas on how to resolve this other than manually performing the migration.
Aravinda Vishwanathapura
@aravindavk
@ceezuns after amber db create migrate tables created in database?
Anmol B.
@ceezuns
@aravindavk no, the tables are not created and no migration is applied i believe @VanyaNeytrino was having the same issue above.
Aravinda Vishwanathapura
@aravindavk
@ceezuns then try to execute the SQL statements directly on psql shell to identify the SQL syntax issues.
Dmitry Bachinin
@dbachinin_gitlab
Hi everyone Please tell me how to make Jennifer be the default database connector?
I try deploy to dokku and see it error:
!     Release command declared: 'bin/amber db migrate'
remote: execution of 'bin/amber db migrate' failed!
       No migrations to run in ./db/migrations.
To myapp.com:amber-app
 ! [remote rejected] main -> master (pre-receive hook declined)
Jared Smith
@jrods
Hello amber community, I'm currently stuck with having a Time column in my model, I keep getting the error Paid_on Expected paid_on to be (Time | Nil) but got (Int64 | String). when my controller is doing Salary.new salary_params.validate!.
Here's an example with my model, but I dont see how I can normalize the value to what I need, is there something I'm missing that I need to do? I wasn't able to find anything reading through the amber or granite docs.
class Salary < Granite::Base
  connection pg
  table salaries

  column id : Int64, primary: true
  column paid_on : Time
  column income : Int32?
  timestamps
end
George Dietrich
@Blacksmoke16
@dbachinin_gitlab it looks like its failing on running migrations, since you dont have any
that is a separate thing than your default db shard
Dmitry Bachinin
@dbachinin_gitlab
@Blacksmoke16 Thanks! I'm added crystal src/sam.cr db:migrate to Procfile and generating empty Granite migration.
George Dietrich
@Blacksmoke16
:thumbsup: