问题
First I do not know much about Ruby, but, the Openshit command line uses the 'rhc' to manage my apps on cloud. Nice!...but the 'rhc' program its based on Ruby, Rubygems....something.
Ok, i'm installed theses programs with apt-get on Linux Mint (Ubuntu based):
sudo apt-get install ruby1.8
sudo apt-get install gem
sudo apt-get install rubygems
gem install json_pure
gem install rake
gem install rhc
Nice!..rhc its visible in my console, but when i try execute any rhc command, the console returns for me this:
rhc-create-domain -n carlosjr -l carlosjrcabello@gmail.com
/usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find rhc (>= 0) amongst [json-1.6.6, json_pure-1.6.6, mime-types-1.18, parseconfig-0.5.2, rest-client-1.6.7] (Gem::LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
from /usr/local/lib/site_ruby/1.8/rubygems.rb:1231:in `gem'
from /usr/local/bin/rhc-create-domain:18
Remembering, i do not know if I have to update something in ruby or RubyGem.
No more for now. Thanks.
回答1:
I solved the problem. The Linux Mint 12 (Lisa) with KDE contains the basic Ruby packages installed, so I purged all ruby packages before installing all required RHC apps. Here is my solution (in command line):
sudo apt-get purge ruby* (caution with grub packages)
sudo reboot
sudo apt-get install ruby1.8
sudo apt-get install gem
sudo apt-get install rubygems
gem install json_pure
gem install rake
gem install rhc
All rhc functionalities should now be working.
PS: I think that Openshift can be explain more the install process of Ruby apps..using my case for example, I dont have anything knowledge of Ruby :/
回答2:
I had the same error message on Ubuntu 12.04. In my case the problem was /var/lib/gems/ was not world readable.
来源:https://stackoverflow.com/questions/10260053/error-with-rhc-create-domain-on-command-line-openshitft