如何在我的Openshift应用程序中获得root权限?我需要在我的Openshift虚拟机上安装额外的宝石,没有超级用户权限就不可能这样做。
登录时,我正在使用SSH: ssh generated-hash@myapp-myns.rhcloud.com
我已经将我的id_key.pub输入到Openshift网络界面,我正在使用SSH而没有密码。
答案 0 :(得分:0)
要在openshift中安装其他宝石,请参阅this论坛,复制自ramr answer:
所以你需要做的是添加一个Gemfile + Gemfile.lock到你的 应用然后做一个git推 - 看 https://github.com/openshift/rails-example举个例子 的Gemfile + Gemfile.lock的。
执行此操作的步骤:1。创建适当的Gemfile - 可能 类似的东西:
source 'http://rubygems.org'
gem 'whois'
gem "minitest"
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
instance_eval File.read(local_gemfile)
end
在您的工作站上执行捆绑包安装捆绑安装(您可以 在使用bundler之前需要gem install bundler)。那应该 创建一个Gemfile.lock - 添加它和Gemfile并提交git add Gemfile Gemfile.lock,git commit Gemfile Gemfile.lock -m'添加了deps' 将更改推送到OpenShift App git push HTH