Skip to content

Instantly share code, notes, and snippets.

@thsig
Created April 5, 2019 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thsig/8756c871431560e2ce5b415db2050328 to your computer and use it in GitHub Desktop.
Save thsig/8756c871431560e2ce5b415db2050328 to your computer and use it in GitHub Desktop.
Rails example - running rails console inside the container
$ garden run module frontend "rails console"
Running command rails console in module frontend 🏃
✔ frontend → Getting build status... → Done (took 0.4 sec)
Loading development environment (Rails 5.2.2.1)
irb(main):001:0> Vote.where(animal: "cat").count
(0.7ms) SELECT COUNT(*) FROM "votes" WHERE "votes"."animal" = $1 [["animal", "cat"]]
=> 6
irb(main):002:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment