6

I'm kind of stuck with this problem. I am currently trying to host a Rails3/Ruby1.9.3 App on a shared host(Site5). They only provide 1.8.7 for Ruby. So, I tried installing RVM so I can make use of Ruby 1.9.3. After installing RVM successfully, running 'bundle install', I encountered this error:

ERROR: Gem bundler is not installed, run gem install bundler first.

I have already tried running 'gem install bundler'. It says that it was installed yet when I run the command again, the same error shows. This error also comes out when I use: 'bundle -v'. However, 'which bundle' says:

/home/MYUSER/.rvm/bin/bundle

This is the output of 'rvm info':

ruby-1.9.3-p194:

  rvm:
    version:      "rvm 1.13.4 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "1 hour 23 minutes 15 seconds ago"

  ruby:
    interpreter:  "ruby"
    version:      "1.9.3p194"
    date:         "2012-04-20"
    platform:     "x86_64-linux"
    patchlevel:   "2012-04-20 revision 35410"
    full_version: "ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]"

  homes:
    gem:          "/home/MYUSER/.rvm/gems/ruby-1.9.3-p194"
    ruby:         "/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194"

  binaries:
    ruby:         "/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194/bin/ruby"
    irb:          "/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194/bin/irb"
    gem:          "/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194/bin/gem"
    rake:         "/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194/bin/rake"

  environment:
    PATH:         "/usr/local/jdk/bin:/home/MYUSER/.rvm/gems/ruby-1.9.3-p194/bin:/home/MYUSER/.rvm/gems/ruby-1.9.3-p194@global/bin:/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194/bin:/home/MYUSER/.rvm/bin:/home/MYUSER/perl5/bin:/usr/kerberos/bin:/usr/lib/courier-imap/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/MYUSER/bin"
    GEM_HOME:     "/home/MYUSER/.rvm/gems/ruby-1.9.3-p194"
    GEM_PATH:     "/home/MYUSER/.rvm/gems/ruby-1.9.3-p194:/home/MYUSER/.rvm/gems/ruby-1.9.3-p194@global"
    MY_RUBY_HOME: "/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194"
    IRBRC:        "/home/MYUSER/.rvm/rubies/ruby-1.9.3-p194/.irbrc"
    RUBYOPT:      ""
    gemset:       ""

What I have tried: I tried the suggestions in this link, but it does not work.

Thank you.

Community
  • 1
  • 1
nmenego
  • 846
  • 3
  • 17
  • 36

5 Answers5

9
gem uninstall bundler && rvm @global do gem install bundler && bundle -v

bundler is installed by rvm by default into the @global gemset which gets mixed into default as well. something smells with that install, but that set of commands should fix it if that's all that's bad. your rvm output didn't look crazy.

mpapis
  • 52,729
  • 14
  • 121
  • 158
ddd
  • 1,925
  • 12
  • 19
1

Try:

rvm all do gem install bundler

This will install the bundler gem in the current ruby.

Kevin Bedell
  • 13,254
  • 10
  • 78
  • 114
  • I'm not sure if this is an option, but if I were you I'd set up a low-cost Heroku account and just push it there for testing. It's inexpensive and makes problems like this go away. – Kevin Bedell May 08 '12 at 02:59
  • thanks for the suggestion. but my client wants this type of deployment. I am also deploying it in Phusion Passenger, by the way. – nmenego May 08 '12 at 03:03
  • I'm experiencing exactly the same issue on site5. – alexs333 May 10 '12 at 01:17
0

the bundler executable does not seem to get installed in the ./bin directory if you do a

bundle install --binstubs

This looks like a BUG in bundler!

Tilo
  • 33,354
  • 5
  • 79
  • 106
0

For my setup, adding the user that apache runs as to the rvm group worked

usermod -a -G rvm www-data
coneybeare
  • 33,113
  • 21
  • 131
  • 183
0

This solution works if you are using rbenv too

$ gem uninstall rbenv
    (many dependencies will be unmet. Simply answer 'y')
$ rbenv rehash
$ gem install rbenv
$ rbenv rehash
Hanxue
  • 12,243
  • 18
  • 88
  • 130