sstephenson/rbenv-vars — Issue #2: Use with Chef
Author: bensie
Created: 2011-10-31 22:17:23+00:00
State: open

Hi Sam,

Attempting to use rbenv-vars with Chef, but Chef never seems to see the per project environment variables.

Example that works perfectly and respects the RAILS_ENV defined in .rbenv-vars when run manually:

```
cd /mnt/app/current && /mnt/app/current/bin/rake assets:precompile
```

Chef recipe that does not see any rbenv-vars and fails because that rake task defaults to RAILS_ENV=production:

```ruby
bash "Precompile assets" do
cwd "/mnt/app/releases/xxxx"
user app['owner']
group app['group']
code "mnt/app/releases/xxxx/bin/rake assets:precompile"
end
```

I know I can't assume that you're familiar with Chef, but just wondering if you have any hunches as to what might be wrong or what steps I might take to get it working.

Thanks!