bluehostforum.com  

Go Back   bluehostforum.com > BlueHost Related Help > Advanced Scripting, and Coding help!

Reply
 
Thread Tools Display Modes
  #1  
Old 06-20-2006, 06:37 AM
JoeP JoeP is offline
Senior Member
 
Join Date: Feb 2006
Posts: 161
Default Installing ruby gems?

Is it possible for us to install our own ruby gems? If so, how is it done?
Thanks,
Joe
Reply With Quote
  #2  
Old 06-22-2006, 03:22 AM
eddye eddye is offline
Junior Member
 
Join Date: Jun 2006
Posts: 2
Default

I am curious too about that
Reply With Quote
  #3  
Old 06-26-2006, 08:28 PM
mansfiem mansfiem is offline
Junior Member
 
Join Date: Jun 2006
Posts: 5
Default Gem Install

If you are using SSH, I believe you have to request BH to install the desired gem. That's what I have found. A week or two ago I requested them install a flickr gem. They did it within a couple of hours.
Reply With Quote
  #4  
Old 05-01-2007, 06:38 PM
15king 15king is offline
Junior Member
 
Join Date: May 2007
Posts: 2
Default create your own local gem store

http://helpdesk.bluehost.com/kb/inde...od_id=2&id=418
Reply With Quote
  #5  
Old 07-10-2007, 06:00 PM
chrsysco chrsysco is offline
Junior Member
 
Join Date: Mar 2007
Posts: 7
Default couldn't get this to work

Quote:
Originally Posted by 15king View Post
I made the changes to the .bachrc file but when I try to

% gem install sources-0.0.1.gem

I get an error
"ERROR: Error installing gem sources-0.0.1.gem[.gem]: You don't have write permissions into the /usr/lib/ruby/gems/1.8 directory."

any ideas?
Reply With Quote
  #6  
Old 07-11-2007, 01:33 AM
charlesgan's Avatar
charlesgan charlesgan is offline
Senior Member
 
Join Date: Mar 2007
Location: http://www.bluehostreview.org
Posts: 1,097
Default

Quote:
Originally Posted by chrsysco View Post
I made the changes to the .bachrc file but when I try to

% gem install sources-0.0.1.gem

I get an error
"ERROR: Error installing gem sources-0.0.1.gem[.gem]: You don't have write permissions into the /usr/lib/ruby/gems/1.8 directory."

any ideas?
hi, refer to this tutorial.
http://wiki.netbeans.org/wiki/view/RubyInstallation
seem like you can install to home directory. but i havent try this. just search around and learning
__________________
Charles Gan
Bluehost Reviews : Bluehost reviews hosted at bluehost
Bluehost Speed Test : bluehost hosting speed Test!
Bluehost Uptime : Bluehost uptime monthly reports
Reply With Quote
  #7  
Old 08-06-2007, 07:13 PM
mitchm mitchm is offline
Junior Member
 
Join Date: Aug 2007
Posts: 1
Default

Quote:
Originally Posted by chrsysco View Post
I made the changes to the .bachrc file but when I try to

% gem install sources-0.0.1.gem

I get an error
"ERROR: Error installing gem sources-0.0.1.gem[.gem]: You don't have write permissions into the /usr/lib/ruby/gems/1.8 directory."

any ideas?
This methods worked for me. If you modified your .bashrc file from the shell, you will have to do "source ~/.bashrc" to load the new environment. After that it works fine.
Reply With Quote
  #8  
Old 08-15-2007, 11:33 PM
hosam119's Avatar
hosam119 hosam119 is offline
Junior Member
 
Join Date: Jun 2006
Posts: 23
Default

What is Gems


صور حب
Reply With Quote
  #9  
Old 09-14-2007, 04:49 AM
bambino_tostare bambino_tostare is offline
Junior Member
 
Join Date: Aug 2007
Posts: 12
Default

Quote:
Originally Posted by mitchm View Post
This methods worked for me. If you modified your .bashrc file from the shell, you will have to do "source ~/.bashrc" to load the new environment. After that it works fine.
I was having the same issue with permission stopping me from installing gems. I did "source ~/.bashrc" (after modifying the bashrc file according to the tutorial), and now i can install gems. However, my app still can't seem to use the gems. For example, i'm trying to use hpricot. I installed it ok on the server (well, it installed anyway, perhaps not in the right place), and i added

require 'hpricot'

to my environment.rb. But the app crashes because it can't find the gem - commenting out the require makes it work again.

In the tutorial, it says you should add the following line to your environment.rb:

ENV['GEM_PATH'] = '/path/to/your/home/.gems:/usr/lib/ruby/gems/1.8'

now, path/to/your/home looks like it's meant to be replaced with, well, the path to my home. But what does it mean by home? Is it the root folder that has the file .gems? When i change it to


ENV['GEM_PATH'] = '~/.gems:/usr/lib/ruby/gems/1.8'
or
ENV['GEM_PATH'] = '~/../../../.gems:/usr/lib/ruby/gems/1.8'

or similar variations, it doesn't seem to make any difference.

Has anyone else had a similar experience, or know how to fix this? thanks
Reply With Quote
  #10  
Old 05-13-2008, 09:56 PM
rogerdpack rogerdpack is offline
Junior Member
 
Join Date: May 2007
Posts: 13
Default

/path/to/home is something like /home/username [replace username with yours]
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:08 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.