title: Ruby: How to import a variable from another file?
body: <p>I'm trying to create a local config file to use with compass so we can cope with differing import paths on developers' machines. So far I've tried to import the file inside an exception block, incase it doesn't exist, then use the variable further down:</p>
  
  <p><strong>local_config.rb</strong></p>
  
  <pre><code>VENV_FOLDER = 'venv'
  </code></pre>
  
  <p><strong>config.rb</strong></p>
  
  <pre><code>VENV_FOLDER = '.'
  begin
    require 'local_config.rb'
  rescue LoadError
  end
  puts VENV_FOLDER
  </code></pre>
  
  <p>Normally I'm a Python developer so I'd expect the import to change the value of <code>VENV_FOLDER</code> to <code>venv</code>, however it's still <code>.</code> afterwards.</p>
  
  <p>Is there a way to import <code>local_config.rb</code> in such a way that it overrides the value of <code>VENV_FOLDER</code>?</p>