Shared Hosting - Not able to added local gem path to rails

Hi,

I am using shared hosting.
Local Gem ‘googlepagerank’ is there but rails is not able load the GEM.

no such file to load – googlepagerank

I have updated boot.rb with $:.push("/home/seotoolb/ruby/gems") and
restarted the server too.

Please help!

Thanks

Nirbhab Barat wrote:

Hi,

I am using shared hosting.
Local Gem ‘googlepagerank’ is there but rails is not able load the GEM.

no such file to load – googlepagerank

I have updated boot.rb with $:.push("/home/seotoolb/ruby/gems") and
restarted the server too.

Please help!

Thanks

Try to play with $HOME environment variable.

For example:

  • I use shared hosting
  • I use fastcgi
  • I haven’t access to apache users’s home and global gem repository
  • I can install gem into my home directory
  • check gem path
    $ gem env path
    /home/avsej/.gem/ruby/1.8:/opt/ruby/lib/ruby/gems/1.8
  • add to dispath.fcgi something like:
    ENV[‘HOME’] = ‘/home/avsej’
  • now when apache starts fastcgi dispatcher process it use my home
    instead of its