-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
We were trying to deploy an application built with Rails 2.3.18, which does not use bundler, and uses rvm in the server and we came across an issue related with the brightbox gem, namely with this line: https://github.com/brightbox/brightbox-deployment/blob/master/lib/brightbox/recipes/gems.rb#L33
def install_gem(gem, version, options = nil)
source_arg = options && options[:source] ? "--source #{options[:source]}" : ""
run %Q{sh -c "
gem spec #{gem} --version '#{version}' 2>/dev/null|egrep -q '^name:' ||
sudo -p '#{sudo_prompt}' gem install --no-ri --no-rdoc --version '#{version}' #{source_arg} #{gem}"
}
end
Here gems are installed using sudo regardless of the settings that we define in our deploy.rb file.
I would propose changing it to:
def install_gem(gem, version, options = nil)
source_arg = options && options[:source] ? "--source #{options[:source]}" : ""
run %Q{sh -c "
gem spec #{gem} --version '#{version}' 2>/dev/null|egrep -q '^name:' ||
#{if use_sudo then "sudo -p '#{sudo_prompt}'" end} gem install --no-ri --no-rdoc --version '#{version}' #{source_arg} #{gem}"
}
end
Or something along those lines.
Cheers and good work with the Brightbox gem. :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels