Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9017079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:10:22+00:00 2026-06-16T04:10:22+00:00

I am new to ruby and having a hard time setting up my gems.

  • 0

I am new to ruby and having a hard time setting up my gems. Could someone please help me understand how this path works in environment.rb

Some Background Info:

I have my rails app installed on hostmonster and I am trying to run SASS using SHELL. I have no local copy of my app. When I run the SASS command I get -bash: sass: command not found. Which leads me to believe my gem path is wrong. The problem though is that i don’t really understand how the path works.

I am confused about this line in particular…

home = File.expand_path("/home/#{ENV['USER']}")    
ENV['GEM_PATH'] = "#{home}/ruby/gems:/usr/lib64/ruby/gems/1.8"

NOTE: This is the default path which was set when I installed my Rails app from the Cpanel.

Some things I don’t understand…

  1. What is the purpose of the semicolon?
  2. For #{home} , am I suppose to replace that with my
    home directory?
  3. Where would usr/lib64 come from? I don’t see that directory. I am
    assuming I have to create it.

ALSO:
This is what hostmonster tells me to do (which I have done already)…

Using File Manager in your cPanel make a copy of the .bashrc file in
your root directory, name it .bashrc.bak. Now edit the .bashrc file
and add the following to the end of the file:

  • export GEM_HOME=$HOME/ruby/gems
  • export GEM_PATH=$GEM_HOME:/usr/lib/ruby/gems/1.8
  • export GEM_CACHE=$GEM_HOME/cache
  • export PATH=$PATH:$HOME/ruby/gems/bin

When using a rails application, make sure you add the following to your ./config/environment.rb:
ENV[‘GEM_PATH’]’/path/to/your/home/ruby/gems:/usr/lib/ruby/gems/1.8′

I apologize if this is a “noobish” questions, I have never used Ruby so I am still learning how it all works. I have ruby, rails, and sass all installed. I can run my project in the browser. i just can’t get my gems to work. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:10:23+00:00Added an answer on June 16, 2026 at 4:10 am

    Well apparently the gems I was trying to use were not installed on my server. I thought I had installed them myself when I ran gem install sass. However this didn’t work properly because Hostmonster had to give me permission to install gems.

    I found that out here…

    https://my.hostmonster.com/cgi/help/221

    As for the path I had to do the following..

    home = File.expand_path("/home/#{ENV['MYCPANELUSERNAME']}")
    ENV['GEM_PATH'] = "#{home}/ruby/gems:/usr/lib64/ruby/gems/1.8"
    

    So basically for the path all I had to do was change ‘USER’ to my cpanel username.

    Also note this only works if my .htaccess is set to “production” instead of “development“.

    Thread on production vs development

    And in addition to this I also had a problem with my .htaccess file.

    So I had to edit my .htacess file using vi editor. (might be different for other people)

    Make sure .htaccess had this content in it

    • Options -MultiViews
    • PassengerResolveSymlinksInDocumentRoot on
    • RailsEnv production RackBaseURI / SetEnv GEM_HOME
    • /home1/examplec/ruby/gems
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im new to ruby, wrote this code and works but i know is not
I having a hard time to consume this webservice https://www.arello.com/webservice/verify.cfc?wsdl in my rails application.
I'm having hard time debugging the flow of the code on Ruby on Rails.
I am new to Scala and I am having hard-time with defining, or more
I'm new to Ruby, so I'm having some trouble understanding this weird exception problem
I'm brand new to ruby and rails and I'm having trouble creating a sign-out
I'm new to Ruby, and I'm having a strange problem with the inject method.
This is probably very simple, but I'm quite new to ruby and active record.
I'm (extremely) new to Ruby, having started today. I just moved from my system's
I am new to Ruby, and I am having some problems with hashes. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.