Kepoor Hampond
Kepoor Hampond

Reputation: 107

Bundler cannot load gem rake

I'm currently SSH'd into a remote server where I am trying bundle install, but here is the message that it spits out when I run it:

Fetching gem metadata from http://rubygems.org/...........
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies...
sudo: effective uid is not 0, is sudo installed setuid root?

Gem::Exception: Cannot load gem at [/usr/lib64/ruby/gems/1.9.3/cache/rake-12.0.0.gem] in /home2/shsprogr/rails/Frothy-Fox
An error occurred while installing rake (12.0.0), and Bundler cannot continue.
Make sure that `gem install rake -v '12.0.0'` succeeds before bundling.

And yet, when I run gem install rake -v '12.0.0':

Successfully installed rake-12.0.0
1 gem installed
Installing ri documentation for rake-12.0.0...
Installing RDoc documentation for rake-12.0.0...

Yet the same thing happens with bundler above. If it helps, I'm on a bluehost server and I am unable to enable sudo access because this guide is out of date.

Upvotes: 1

Views: 3518

Answers (1)

trh
trh

Reputation: 7339

You're likely going to find several things with Bluehost rails a challenging affair. You might consider creating a free developer account on Heroku instead. It will make this process a little easier.

However, you can fix your issue by setting a GEM_HOME in your htaccess file. This is going to make sure that gems are installed in your web directory of the shared bluehost server - so they won't run into the kinds of issues that require sudo. So open your .httacess file in your favorite editor and add this line:

SetEnv GEM_HOME /home2/shsprogr/ruby/gems

Upvotes: 1

Related Questions