ZSH cloudapp command not working - ruby

I've installed cloudapp_api multiple times with:
sudo gem install cloudapp_api
I just get this tho when running cloudapp wat.jpeg
"You need to install cloudapp_api: gem install cloudapp_api"
I really have no idea what to do.
Not sure if this helps, but i'm running ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]

You need to run gem install cloudapp_api

Related

Can't find ruby or gem commands after doing ruby-install in Ubuntu

I have installed ruby 1.9.3 in my Ubuntu 12.04 machine following the instructions in https://github.com/postmodern/ruby-install and executing the following command:
sudo ruby-install ruby 1.9.3
I was assuming this would link from my /usr/bin or somewhere else visible from my path ruby or gem, but it doesn't. When I try for example: gem install bundler, I get:
sudo: gem: command not found
It also can't find ruby when I try ruby -v.
If I install with sudo apt-get install ruby1.9.3, I'm able to execute both ruby and gem:
$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
$ gem -v
1.8.11
I was expecting from ruby-install the same output I got from apt-get. Am I looking in the wrong place? How do I run ruby and gem after installing with ruby-install?
I know there are other installers for ruby like rvm and rbenv, but I'm following some installations instructions and they clearly instruct to use ruby-install.
Thanks in advance!
OK, found the answer.
After running
sudo ruby-install ruby 1.9.3
the last line from the log is:
>>> Successfully installed ruby 1.9.3-p547 into /opt/rubies/ruby-1.9.3-p547
Which I have no excuse for not paying attention to since it's in bold colourfull letters.
Erm, anyway, adding /opt/rubies/ruby-1.9.3-p547 to the PATH makes ruby and gem work.
export PATH=$PATH:/opt/rubies/ruby-1.9.3-p547/bin

github-pages gem failing even though I have Ruby version 2.1.2

I'm trying to install github pages gem on my Mac OS X (yosemite).
I get following error:
Gem::InstallError: github-pages requires Ruby version ~> 2.0.0.
An error occurred while installing github-pages (4), and Bundler cannot continue.
Make sure that `gem install github-pages -v '4'` succeeds before bundling.
I checked my Ruby version by running following command -
ruby --version
And it says
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
So I definitely have Ruby version ~> 2.0.0
Any assistance on this issue would be greatly appreciated!
There is a possible lack of important information here. Looking at your Ruby version, are you using rbenv or rvm?
I could imagine this happening if you use rbenv or rvm and then su or sudo to gem install github-pages. rbenv and rvm are specific to your user account and your shell environment. If you su or sudo to root, rbenv and rvm are no longer active.
The other possibility is that you are running it inside of a Bundler managed app that specifies another Ruby version in the Gemfile using the ruby x.x.x syntax.
If neither of these is the case, try running gem env to see what exactly rubygems thinks the story is. Also post the exact commands you are using to get this error.

Ruby 1.9.1 installed, however Ruby --version shows different version

I installed ruby via
apt-get install ruby1.9.1 rubygems
However, when I run ruby --version I see
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
Have I missed something? When I try to run a gem which requires 1.9+ it fails and asks me to upgrade.
The package ruby1.9.1 will give you an executable called ruby1.9.1, which you should use instead of ruby.
You can set ruby1.9.1 as default ruby version using following command
update-alternatives --set ruby /usr/bin/ruby1.9.1
You may find out about available alternatives using following
update-alternatives --query ruby
In this way you can set the default ruby version
$ rvm --default use 1.9.2
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]

installing compass on mac issue

I am installing compass on mac. when I run gem install compass command on terminal I got following output
I already have ruby ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0] installed. I got this output after issuing ruby -v command on terminal.
How can fix above problems or how can I install compass successfully?
As far as I know you should be a root to install gems when using ruby from system.
It is a very good idea to run ruby with rvm or similar tools instead of running
system.

how to install rubygems-1.4.2 to ruby 1.8.7 using rvm?

When I do ruby -v, I get
ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-linux]
I want to install rubygems-1.4.2 to it, but the command:
rvm rubygems 1.4.2
fails, it does not even fetch the rubygems as it fails in curl. So I downloaded the file from http://rubyforge.org/frs/?group_id=126, (http://rubyforge.org/frs/download.php/73882/rubygems-1.4.2.tgz), extracted it, and put it at ~/.rvm/src/, and then ran again:
rvm rubygems 1.4.2
but it failed again. how can i install rubygems 1.4.2 to ruby-1.8.7#p330?
First switch to the correct ruby with rvm use 1.8.7#p330, then
gem install rubygems --version=1.4.2

Resources