RailsCasts Pro episodes are now free!

Learn more or hide this

Mattan Griffel's Profile

GitHub User: mattangriffel

Site: https://onemonth.com

Comments by Mattan Griffel

Avatar

In case anyone else had trouble maintaining the current directory when opening a new tab, I wrote the following plugin:

console
# Tell the terminal about the working directory at each prompt.

update_terminal_cwd() {
    # Identify the directory using a "file:" scheme URL,
    # including the host name to disambiguate local vs.
    # remote connections. Percent-escape spaces.
local SEARCH=' '
local REPLACE='%20'
local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"
printf '\e]7;%s\a' "$PWD_URL"
}

precmd_functions+='update_terminal_cwd'

Then just call the plugin in your .zshrc

Avatar

Wait, if you're gitignoring your application.yml file, how do you get around this in your application.rb?

config = YAML.load(File.read(File.expand_path('../application.yml', __FILE__)))

I'm getting this when I try to run on heroku:

No such file or directory - /app/config/application.yml