Skip to content

Commit

Permalink
Run bundle as the config user instead of hardcoding to 'deploy'
Browse files Browse the repository at this point in the history
  • Loading branch information
urajat authored and jbraeuer committed Jan 14, 2014
1 parent 150f109 commit 9bfdec9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rails/libraries/rails_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def self.determine_database_adapter(app_name, app_config, app_root_path, options
def self.bundle(app_name, app_config, app_root_path)
if File.exists?("#{app_root_path}/Gemfile")
Chef::Log.info("Gemfile detected. Running bundle install.")
Chef::Log.info("sudo su deploy -c 'cd #{app_root_path} && /usr/local/bin/bundle install --path #{app_config[:home]}/.bundler/#{app_name} --without=#{app_config[:ignore_bundler_groups].join(' ')}'")
Chef::Log.info(`sudo su deploy -c 'cd #{app_root_path} && /usr/local/bin/bundle install --path #{app_config[:home]}/.bundler/#{app_name} --without=#{app_config[:ignore_bundler_groups].join(' ')} 2>&1'`)
Chef::Log.info("sudo su #{app_config[:user]} -c 'cd #{app_root_path} && /usr/local/bin/bundle install --path #{app_config[:home]}/.bundler/#{app_name} --without=#{app_config[:ignore_bundler_groups].join(' ')}'")
Chef::Log.info(`sudo su #{app_config[:user]} -c 'cd #{app_root_path} && /usr/local/bin/bundle install --path #{app_config[:home]}/.bundler/#{app_name} --without=#{app_config[:ignore_bundler_groups].join(' ')} 2>&1'`)
end
end
end
Expand Down

0 comments on commit 9bfdec9

Please sign in to comment.