Ruby of Rails shell 环境变量错误
Ruby of Rails shell environment variables error
当我在 .bash_profile
文件中设置环境变量并重新启动 shell
时,出现以下错误:
Last login: Sat Aug 15 20:16:25 on ttys000
-bash: /Users/xxxxxxxxx/.bash_profile: line 7: unexpected EOF while looking for matching `"'
-bash: /Users/xxxxxxxx/.bash_profile: line 10: syntax error: unexpected end of file
我的 .bash_profile
文件如下所示:
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export GMAIL_USERNAME=“xxxxx@gmail.com”
export GMAIL_PASSWORD=“xxxxxx”
export MAILCHIMP_API_KEY=“xxxxxxxxxxxxxxxxxxxxxx”
export MAILCHIMP_LIST_ID=“xxxxxxxxxx”
export OWNER_EMAIL=“xxxxxx@gmail.com”
您似乎需要将 ”
替换为 "
,如下所示:
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export GMAIL_USERNAME="xxxxx@gmail.com"
export GMAIL_PASSWORD=“xxxxxx”
export MAILCHIMP_API_KEY="xxxxxxxxxxxxxxxxxxxxxx"
export MAILCHIMP_LIST_ID="xxxxxxxxxx"
export OWNER_EMAIL="xxxxxx@gmail.com"
当我在 .bash_profile
文件中设置环境变量并重新启动 shell
时,出现以下错误:
Last login: Sat Aug 15 20:16:25 on ttys000
-bash: /Users/xxxxxxxxx/.bash_profile: line 7: unexpected EOF while looking for matching `"'
-bash: /Users/xxxxxxxx/.bash_profile: line 10: syntax error: unexpected end of file
我的 .bash_profile
文件如下所示:
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export GMAIL_USERNAME=“xxxxx@gmail.com”
export GMAIL_PASSWORD=“xxxxxx”
export MAILCHIMP_API_KEY=“xxxxxxxxxxxxxxxxxxxxxx”
export MAILCHIMP_LIST_ID=“xxxxxxxxxx”
export OWNER_EMAIL=“xxxxxx@gmail.com”
您似乎需要将 ”
替换为 "
,如下所示:
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export GMAIL_USERNAME="xxxxx@gmail.com"
export GMAIL_PASSWORD=“xxxxxx”
export MAILCHIMP_API_KEY="xxxxxxxxxxxxxxxxxxxxxx"
export MAILCHIMP_LIST_ID="xxxxxxxxxx"
export OWNER_EMAIL="xxxxxx@gmail.com"