I'm on Ubuntu 11.04 with ruby 1.9.2p180 installed from source using rvm. When I install a gem that makes a command-line binary, links are not made. For example, when I install the passenger gem, /var/lib/gems/1.9.2/bin/passenger
is installed as expected and works, but a symbolic link is not made from /usr/bin/passenger
as expected.
update
actually I have the same problem with vendor ruby and gem (on a different 11.04 server that has never had rvm).
$ sudo gem install bundler $ bundle bash: bundle: command not found $ type bundle -bash: type: bundle: not found $ ls -lF /var/lib/gems/1.8/bin/bundle -rwxr-xr-x 1 root root 383 2011-08-13 19:49 /var/lib/gems/1.8/bin/bundle*
RVM installation should be self-contained, which means it won't create symlinks out of the RVM directory. That should not be problem, though, as passenger binary should be added to path automatically by RVM.
Basically it should work like this:
$ rvm use ruby-1.9.2-p290
$ which gem
~/.rvm/rubies/ruby-1.9.2-p290/bin/gem
$ gem install passenger
$ which passenger
~/.rvm/gems/ruby-1.9.2-p290/bin/passenger
I would guess that you are using ubuntu's version of gem and ruby. rvm use ruby-1.9.2-p290 --default
should fix that.
If rvm function is not accessible, add this to your .bash_profile:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
See https://rvm.beginrescueend.com/rvm/install/ for details.
I guess this can be your problem: installing rvm gems with sudo
. Given you have the right privileges in your machine, this is not needed. But if you really need this, do rvmsudo gem install bundler
instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With