1
votes

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.

1
so I think I installed Gems not on Root, which resulted in the installation directory ending up in var/lib/gems/1.8. Do I need to uninstall and then re-install? Really struggling with this for some dumb reason, so any help would be awesome. Thanks!James
figured it out! Really dumb, i ended giving the user write permission to var/lib/gems/1.8 and then add var/lib/gems/1.8 to the path. It says it REALLY clearly for ubuntu users in the installation I guess i just missed it.James

1 Answers

0
votes

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