Skip to content

Instantly share code, notes, and snippets.

# Generating rails app for graphql server
rails new graphql-tutorial --skip-action-mailer --skip-action-mailbox --skip-action-text --skip-active-storage --skip-action-cable --skip-javascript --skip-system-test --skip-webpack-install
# Graphql generate object
rails g graphql:object LinkType id:ID! url:String! description:String!
# Graphql eager loading
1. Install nvm
https://github.com/nvm-sh/nvm
2. Install long term support node
nvm install --lts
3. install yarn with no dependencies
ssh-keygen -t rsa
^ will create a key with final comment as variation of username
cat ~/.ssh/id_rsa.pub
# Setting up and activating a venv
python3 -m venv venv
source venv/bin/activate
deactivate
# Using notebooks (inside the venv)
pip install ipykernel
ipython kernel install --user --name=projectname
@danbeggan
danbeggan / managing_rails.md
Last active November 11, 2017 12:59
Managing ruby & rails versions macOS

1. Ruby version (install rbenv via homebrew)

  • rbenv version # shows current ruby sys version
  • rbenv versions # shows all ruby versions installed
  • rbenv install ruby-version
  • rbenv local ruby-version # use ruby version in current directory
  • rbenv global ruby-version # use ruby version as default

If the latest ruby version doesn't show then update rbenv