Make Environmental Variable Available #191

Open
Undistraction opened this Issue Aug 29, 2013 · 3 comments

4 participants

@Undistraction

I'm getting problems when running RSpec specs on a Rails app due to a missing Environmental Variable that is defined in my .bash_profile

# Postgres
export PGHOST=localhost

Without this env set, Rails can't connect to the Postgres database. How can I make this env available to Ruby Test when it runs the specs?

Obviously if I launch Sublime Text from the command line these envs are available and everything works great.

@gs
Collaborator
gs commented Oct 7, 2013

don't have proper solution yet, but its good that at least it works from command line :)

please try to edit RubyTest.sublime-settings and add you PGHOST=localhost before

"run_ruby_unit_command": "PGHOST=localhost ruby -Itest {relative_path}",

maybe it will work....

@JamieRuderman

I would like to do the same thing. With export RUBYOPT=-Ku. Unfortunately the suggested solution does not work. I hope a workaround can be found. Thanks!

@bingxie

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment