gem executables will not run - ruby

Running gem install from shell script giving error even though I ruby version2.3.0 installed on my machine.
I am trying to install a gem from sh file. sh file code is as below:
cat > /tmp/install_bandshell.sh <<EOF
#!/bin/sh -e
cd /tmp
git clone git://github.com/concerto/bandshell.git
cd bandshell
gem build bandshell.gemspec
gem install *.gem
cd /
rm -rf /tmp/bandshell
EOF
chmod +x /tmp/install_bandshell.sh
/tmp/install_bandshell.sh
But when I run this sh file get error WARNING: You don't have /root/.gem/ruby/1.9.1/bin in your PATH, gem executables will not run. ERROR: Error installing bandshell-1.7.2.gem: rack requires Ruby version >= 2.2.2.
Even I install 2.3.0 gem env output
RubyGems Environment:
- RUBYGEMS VERSION: 2.5.1
- RUBY VERSION: 2.3.0 (2015-12-25 patchlevel 0) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.3.0/gems/
- USER INSTALLATION DIRECTORY: /root/.gem/ruby/2.3.0
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/lib/ruby/gems/2.3.0/gems/bin
- SPEC CACHE DIRECTORY: /root/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /usr/local/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/lib/ruby/gems/2.3.0/gems/
- /root/.gem/ruby/2.3.0
- /usr/local/lib/ruby/gems/2.3.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/local/lib/ruby/gems/2.3.0/gems
From terminal, if I install this gem it works but from shell script giving above error. Please help me with this. Platform is Debian Wheezy.

I'm answering your primary question only, regarding the message. (Frankly, I don't know what's going on with your sh file, so I'm not going to address whatever other problems it causes.)
The message is a warning to you that any executables that the gem installs are not in your path. If the gem does not install any executables, then you can safely ignore the message. If it does (or you are simply unsure), then modify the path accordingly. How you do that depends on what shell you happen to be using. Since you have tagged the question with 'linux', I will guess that you are using bash; if so, add to either your ~/.profile or to ~/.bash_profile an entry similar to:
PATH="$PATH:/root/.gem/ruby/1.9.1/bin"
Now, at this point, I have to wonder - are you using ruby-1.9? You know that ruby 1.9 is obsolete, right? Actually, considering that you seem to be using Ruby 2.3.0, that's not likely. What I would suggest is to (at least temporarily) adjust your PATH as above to avoid the warning. I suspect you will still have problems, but then you can ask a new question without the WARNING that you have cited.
One last point, ignore suggestions that you should change your shebang to be other than "#!/bin/sh"; that's very unlikely to help.

Answering the WARNING: You don't have /root/.gem/ruby/1.9.1/bin in your PATH, gem executables will not run. problem...
Try add this line on your ~/.bashrc or ~/.zshrc:
export PATH="/root/.gem/ruby/1.9.1/bin:$PATH"

Related

Is there a way to define an alias that executes a bin from a specific folder in MacOS?

I am currently using a Macbook Pro running MacOS Mojave 10.14.3. I have recently gotten into ruby programming but find their whole gem package management a little confusing. When i gem install a package, it installs it in my /usr/local/lib/ruby/gems/2.6.0/bin folder and if I want to execute a gem or get a gem version, for example the solargraph gem, I must type a command: /usr/local/lib/ruby/gems/2.6.0/bin/solargraph -v. I was wondering if there is way for me to define an alias for the path /usr/local/lib/ruby/gems/2.6.0/bin so that I could type something like gemexec solargraph -v which would achieve the same result as /usr/local/lib/ruby/gems/2.6.0/bin/solargraph -v. Thanks for your help. BTW I am using the ZSH shell.
You can make a function that will do this for you and place it in your .zshrc file.
function gemexec() {
/usr/local/lib/ruby/gems/2.6.0/bin/"$1"
}
You can use the fact that Ruby 'install' the binary to central bin directory located at /usr/local/lib/ruby/gems/RUBY_VERSION/bin.
Use gem environment to determine your path:
gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 2.7.7
- RUBY VERSION: 2.5.3 (2018-10-18 patchlevel 105) [x86_64-darwin18]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.5.0
- USER INSTALLATION DIRECTORY: /Users/alice/.gem/ruby/2.5.0
- RUBY EXECUTABLE: /usr/local/opt/ruby/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/lib/ruby/gems/2.5.0/bin
- SPEC CACHE DIRECTORY: /Users/alice/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /usr/local/Cellar/ruby/2.5.3_1/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-18
- GEM PATHS:
- /usr/local/lib/ruby/gems/2.5.0
- /Users/alice/.gem/ruby/2.5.0
- /usr/local/Cellar/ruby/2.5.3_1/lib/ruby/gems/2.5.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/opt/ruby/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
Then, you can add ruby bin path into your global bin path and to get what you want -
PATH="/usr/local/lib/ruby/gems/2.5.0/bin:$PATH"
solargraph -v
0.31.3
Finally, to make zsh to use this PATH every time you open a shell, add this line into your .zsh_rc file -
echo PATH="/usr/local/lib/ruby/gems/2.5.0/bin:$PATH" >> ~/.zshrc

How to reset anything related to Ruby to factory settings on Mac OS High Sierra

After a number of misadventures involving RVM, Ruby and Rails on my new laptop have left me completely bewildered. I uninstalled RVM but all the paths, versions and permissions are all messed up.
I searched and couldn't find the right fixes. It feels like each solution makes the problem get worse.
I want to start fresh without having to reset my computer to factory settings. How can I reset just the Ruby-related things like Ruby, Rails, etc., without erasing my computer?
I would close & reopen your terminal window before you start all of this to make sure you don't have any old env vars loaded.
General things:
Run env | grep RUBY, env | grep RVM and look for any leftover environment variables that you may have set
Same for env | grep GEM. Sometimes you'll see GEM_PATH, GEM_HOME, etc. but these aren't necessary for system ruby
Peek inside your ~/.bash_profile, ~/.bashrc, and ~/.profile files and see if you've added any rvm stuff
If you're running macOS Mojave (I'm comparing against my system):
which ruby should return /usr/bin/ruby. If it doesn't, you have something else interfering. Post what that is and we can get it fixed.
Running /usr/bin/ruby --version should return ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
Permissions for system ruby:
-r-xr-xr-x 1 root wheel 52016 Nov 30 02:38 /usr/bin/ruby
This should be something like sudo chmod 555 /usr/bin/ruby to fix this if yours is difference. If you have different owners you'll need to sudo chown root:wheel /usr/bin/ruby
You'll also want to check which gem, and see if it reports /usr/bin/gem. Permissions should be the same as /usr/bin/ruby. /usr/bin/gem --version should return 2.5.2.3
Running /usr/bin/gem env should return something similar-ish to below. Replace jay (my computer user) with yours
RubyGems Environment:
- RUBYGEMS VERSION: 2.5.2.3
- RUBY VERSION: 2.3.7 (2018-03-28 patchlevel 456) [universal.x86_64-darwin18]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.3.0
- USER INSTALLATION DIRECTORY: /Users/jay/.gem/ruby/2.3.0 # this doesn't matter much
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- SPEC CACHE DIRECTORY: /Users/jay/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Library/Ruby/Site
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-18
- GEM PATHS:
- /Library/Ruby/Gems/2.3.0
- /Users/jay/.gem/ruby/2.3.0
- /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/gems/2.3.0
- GEM CONFIGURATION:
- :update_sources => false
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["https://rubygems.org/"]
- "benchmark" => true
- "gem" => "--document=yri"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/bin
- /Users/jay/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /opt/X11/bin
From there you've got two directories you probably want to look at:
Run ls -al /Library/Ruby/. You should see this:
drwxr-xr-x 3 root wheel 96 Aug 17 18:59 Gems
drwxr-xr-x 3 root wheel 96 Aug 17 18:59 Site
You may need to chmod/chown each of those directories (with -R for recursive)
When you're done, please note that running /usr/bin/gem install bundler and gem install bundler (assuming you haven't installed a new ruby version manager) should yield an error as below (this means you re-configured the permissions correctly).
Fetching: bundler-1.17.2.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
You'll see some tutorials mention changing those permissions, or running sudo to install gems but I don't recommend that. My favorite ruby version manager is asdf which may be worth a look. You'll install the core, and the ruby plugin.
This should get you a little bit closer. If you see anything else messed up, please post the error.
rm -rf ~/.rvm, then edit ~/.bash_profile to remove source $HOME/.rvm/scripts/rvm.
Then you can restart with RVM from scratch by following the detailed installation instructions at https://rvm.io/rvm/install.

Textmate + RVM + Rake = Rake not using expected gem environment

I am using:
TextMate: version 2.0-alpha.9511
rvm: 1.25.15 (stable)
ruby: version 2.1.0p0
oh-my-zshell: 5.0.2
Mac OS X: 10.9.1 (Mavericks)
I have rvm and textmate set up to use
TM_RUBY=/Users/<myuser>/.rvm/bin/rvm-auto-ruby
The problem:
when I try to run my rake tasks using the rake bundle in textmate, I get some errors about the file not loading: "cannot load such file -- rubocop/rake_task"
The clue:
I changed my rakefile so that it simply reports the "gem env" for the default task.
When I then run the task, I see a completely different gem environment, than I would see if I used rake at the terminal command line.
RakeMate v2.0.0
>>> /Users/Johno/Projects/puzzles/triangle/Rakefile
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.3
- RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [universal.x86_64-darwin13]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.0.0
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-13
- GEM PATHS:
- /Library/Ruby/Gems/2.0.0
- /Users/Johno/.gem/ruby/2.0.0
- /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
Whereas I see this when running
$ gem env
in my terminal, for my project
RubyGems Environment:
- RUBYGEMS VERSION: 2.2.0.rc.1
- RUBY VERSION: 2.1.0 (2013-12-25 patchlevel 0) [x86_64-darwin12.0]
- INSTALLATION DIRECTORY: /Users/Johno/.rvm/gems/ruby-2.1.0#puzzles
- RUBY EXECUTABLE: /Users/Johno/.rvm/rubies/ruby-2.1.0/bin/ruby
- EXECUTABLE DIRECTORY: /Users/Johno/.rvm/gems/ruby-2.1.0#puzzles/bin
- SPEC CACHE DIRECTORY: /Users/Johno/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-12
- GEM PATHS:
- /Users/Johno/.rvm/gems/ruby-2.1.0#puzzles
- /Users/Johno/.rvm/gems/ruby-2.1.0#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/Johno/.rvm/gems/ruby-2.1.0#puzzles/bin
- /Users/Johno/.rvm/gems/ruby-2.1.0#global/bin
- /Users/Johno/.rvm/rubies/ruby-2.1.0/bin
- /Users/Johno/.rvm/bin
- /usr/local/bin
- /Users/Johno/Projects/Scripts/Ruby
- /Users/Johno/Projects/Scripts/bash
- /Users/Johno/Projects/Scripts/perl
- /Users/Johno/Projects/Scripts/Geek Tool
- /usr/bin
- /bin
I suspect that textmate is trying to use the "wrong" rake, or failing to set up the environment properly.
I think the problem may lie in the ruby bundle command from text mate:
#!/usr/bin/env bash
export RUBYLIB="$TM_BUNDLE_SUPPORT/RakeMate${RUBYLIB:+:$RUBYLIB}"
export TM_RAKE=$(which "${TM_RAKE:-rake}")
"/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby" -- "$TM_BUNDLE_SUPPORT/RakeMate/rake_mate.rb"
It appears to be using a specific ruby (1.8) rather than the rvm project specific ruby
Does anyone have a suggestion as to how to resolve this?
Thank you,
John Schank
Followed the advice to set TM_RAKE and it didn't help.
I tried both the suggested setting, and using the results of which rake
/Users/Johno/.rvm/gems/ruby-2.1.0#puzzles/bin/rake
When using my TM_RAKE, is get a different error
RakeMate v2.0.0
>>> /Users/Johno/Projects/puzzles/triangle/Rakefile
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'rake' (>= 0) among 5 total gem(s) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /Users/Johno/.rvm/gems/ruby-2.1.0#puzzles/bin/rake:22:in `<main>'
This happens to be the same error I get when I try to use the rubocop.tmbundle
It still looks to me like the gem environment is not being passed to the child process.
I solved my own problem.
Here are the details for anyone else who has this problem...
First, the answer in this question TextMate, rvm and TM_RUBY
is almost perfect.
I had to create a textmate_ruby, and a textmate_rake script, and reference them in the variables in text mate: TM_RUBY, and TM_RAKE.
Second, since I'm using zsh, I had to change the shebang line in the textmate_xxx scripts to use zsh.
Finally, the key that helped me arrive at the correct solution is that I modified my project rakefile to :
task :default do
system "gem env"
system "ruby --version"
system "pwd"
system "printenv"
end
Then when I ran the rake task in textmate, it would dump the current values of my environment, ruby version, current directory, and gem environment. This really helped to see what was going on.
It seems that TextMate is still using your system rake instead of rvm's.
Try to set TM_RAKE in addition to TM_RUBY:
TM_RAKE=$HOME/.rvm/bin/rake
This also applies to rbenv, where you would set TM_RAKE to $HOME/.rbenv/shims/rake.

having problems installing ruby gem "bluepill" on ubuntu [duplicate]

I recently upgraded to Ubuntu 9.04 and I have issues using gems.
I installed Ruby, Rubygems and Rails using apt-get.
The rails command does work.
I then installed capistrano and other gems, such as heroku.
In order to do that, I used the command:
sudo gem install XXX
When I want to use the cap command it does not work:
bash: cap: command not found
It is the same with the other gem commands.
Do I have something particular to do so that the gem commands work?
Where are my Gems?
You can find where your gems are stored using the gem environment command. For example:
chris#chris-laptop:~$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.2
- RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.8
- /home/chris/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
If you look at the "GEM PATHS:" section you can see that gems can be stored in two places on my laptop: /usr/lib/ruby/gems/1.8 or in the .gem directory in my home dir.
You can also see that executables are stored in EXECUTABLE DIRECTORY which in this case is /usr/bin.
Because /usr/bin is in my path this lets me run cap, merb, rails etc.
Updating your PATH
If for some reason your EXECUTABLE DIRECTORY isn't on your path (for example if it is /var/lib/gems/1.8/bin) then you need to update your PATH variable.
Assuming that you are using the bash shell. You can do this quickly for the current session by typing the following at the shell prompt; let's pretend that you want to add /var/lib/gems/1.8/bin to the path:
export PATH=$PATH:/var/lib/gems/1.8/bin
and press return. That appends the new directory to the end of the current path. Note the colon between $PATH and /var/lib/gems/1.8/bin
To set the value for all sessions you will need to edit either your .profile or .bashrc file and add the same line to the end of the file. I usually edit my .bashrc file for no reason other than that's what I've always done. When finished, save the file and then refresh your environment by typing:
bash
at the shell prompt. That will cause the .bashrc to get reread.
At any point you can check the current value of $PATH by typing
echo $PATH
at the shell prompt.
Here's a sample from one of my own servers, where my username is "chris" and the machine name is "chris-laptop":
chris#chris-laptop:~$
chris#chris-laptop:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
chris#chris-laptop:~$
chris#chris-laptop:~$ export PATH=$PATH:/var/lib/gems/1.8/bin
chris#chris-laptop:~$
chris#chris-laptop:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/var/lib/gems/1.8/bin
chris#chris-laptop:~$
My Gem won't load!
"Ruby gems won't load even though installed" highlights a common problem using multiple different versions of Ruby; Sometimes the Gem environment and Gem path get out of sync:
rb(main):003:0> Gem.path
=> ["/opt/ruby1.9/lib/ruby1.9/gems/1.9.1"]
irb(main):004:0> exit
Any Ruby process here is looking only in one place for its Gems.
:~/$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.9.1 (2009-05-12 patchlevel 129) [x86_64-linux]
- INSTALLATION DIRECTORY: /opt/ruby1.9/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /opt/ruby1.9/bin/ruby1.9
- EXECUTABLE DIRECTORY: /opt/ruby1.9/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /opt/ruby1.9/lib/ruby/gems/1.9.1
- /home/mark/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
Look carefully at the output of gem environment:
- GEM PATHS:
- /opt/ruby1.9/lib/ruby/gems/1.9.1
This isn't the same path as returned by Gem.path:
["/opt/ruby1.9/lib/ruby1.9/gems/1.9.1"]
It's hard to say what exactly caused lib/ruby to change to lib/ruby1.9 but most likely the developer was working with multiple Ruby versions. A quick mv or ln will solve the problem.
If you do need to work with multiple Ruby versions then you really should be using rvm.
As noted by #Chris you need to add the gems environment to your path. You can do this by:
echo 'export PATH=$PATH:/var/lib/gems/1.8/bin' | tee --append ~/.bashrc
The folder in which gems are stored must be on your PATH, for example mine is:
/home/victor/.gem/ruby/1.8/bin
Check your path by typing
echo $PATH
It seens that when installing rubygems, now in ubuntu 9.04, I have this problem. I noticed that in "gem environment" the executable directory is "/var/lib/gems/1.8/bin", instead of "/usr/bin"... This is a problem with rubygems or with ubuntu 9.04??
The solution that I encountered is to add "/var/lib/gems/1.8/bin" to my $PATH doing this:
export PATH=$PATH:/var/lib/gems/1.8/bin
But it don't is saved... how can I save my path?
Thanks...
Resolvi: coloquei o export PATH=$PATH:/var/lib/gems/1.8/bin no ~/.bashrc! =]
mkmf is part of the ruby1.9.1-dev package. This package contains the header files needed for extension libraries for Ruby 1.9.1. You need to install the ruby1.9.1-dev package by doing:
sudo apt-get install ruby1.9.1-dev

How to change the Bundle Installer Executable and Installation directory

I have installed RVM and as noted in the install http://rvm.beginrescueend.com/rvm/install/ I was able to get "rvm is a function."
A lot of what I've read recommends not to use sudo gem install bundler, but it did not work without sudo (the error said I was not able to write to var/lib/gems/1.8 with gem install bundler)
Even after "Successfully Installed bundler" I still get "Bundle command not found" when i try to run either "gem bundle install" or "bundle install" from my App.
I think I need to change the executable but I am lost as to how to do this.
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /var/lib/gems/1.8
- /home/james/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
Really appreciate any help. Thank you.
Ah, I cant remember exactly how I did this. It had to do with installing to the wrong directory. Adding the path on the ~/.bashrc file fixed it I am pretty sure. Try adding the lines below to the bottom of your ~/.bashrc file and see if that works. These are the three bottom lines of my file.
export RUBYOPT="-r rubygems"
export PATH=/var/lib/gems/1.8/bin:$PATH
if [[ -s /home/james/.rvm/scripts/rvm ]] ; then source /home/james/.rvm/scripts/rvm ; fi
The instructions that I used to figure this out are here also it looks like this might be a better way to do it, as it is a system wide installation. I would have done this if I did it over.
Also check these other posts regarding the same issue. I am sure you will be able to figure it out from there.
Good Luck!
post 1
post 2

Resources