This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Description
I actually pushed environment variables to ~/.env, and saw recap generate the .recap-env-export properly.
but when running 'cap whatever bootstrap', then ' cap whatever deploy:setup', then 'cap whatever deploy' my environment variables are not seen by db:migrate.
I actually had to override the migrate, and precompile tasks in Capfile like so for it to function:
namespace :rails do
namespace :assets do
namespace :precompile do
task :default do
as_app ". #{application_home}/.recap-env-export && RAILS_ENV=#{rails_env} bundle exec rake RAILS_GROUPS=assets assets:precompile"
end
end
end
namespace :db do
task :migrate do
if (deployed_file_exists?("db/schema.rb") || deployed_file_exists?("db/structure.sql")) && trigger_update?("db/")
as_app_once ". #{application_home}/.recap-env-export && RAILS_ENV=#{rails_env} bundle exec rake db:migrate"
end
end
end
end
Any ideas about this?