Command Line

The command line opens the door to a whole new world. I just hope I don’t screw up my computer.
This stack is for interacting with this new interface called the command line. How do you navigate? What are the valuable commands you are learning? What do you want to remember about bash profiles? What about IRB and simple prompt? Accessing and using the consoles and editors? What about the terminal, and iTerm2, and Vagrant? How can you customize the experience to fit your tastes?

How to add a new path to my PATH

06/20/18  Public, Command Line

Here was my use case.

My starting PATH

➜  echo $PATH

1 vote - harrylevine

How to edit the /etc/hosts file

05/25/18  Public, Command Line, Online Resources

How to edit the / etc / hosts file:

For example, adding:    operationcode-psql 

to your /etc/hosts file enables you to run Rails app that uses Docker, withou...

1 vote - harrylevine

How to change password manually

02/27/18  Public, Command Line, Shortcuts

rails c in development
heroku run rails console in production

If user exists

var = User.first OR var = User.find(id number)
var.password = "password"
var.password_confirmation = "password"
var.confirmed_at =

If u...

1 vote - nagano564

Rollback or forward just one migration file

01/17/17  Public, Command Line, Rails General

You can rollback, or forward, just one migration file, regardless of where it is in the stack. Thereby putting it in either the down, or up, status.

Here is the syntax:

rake db:migrate:down VERSION=20160506010740
rake db:migrate:up V...

1 vote - harrylevine

Creating a local copy of the routes.rb file to speed up your grepping of the routes

10/08/16  Public, Command Line, Rails General

Grepping your routes.rb file, for decent size projects, can take a long time. One solution to speed up this process is to create a local copy of the current state of your routes.rb ...

1 vote - harrylevine