Unable to use GEM_HOME in radrails

73 views Asked by At

I have setup Radrails on my linux machine. I dont have root privileges on this machine and I also cant edit the ruby installation folder. I have set GEM_HOME and GEM_PATH to a location where I have privileges. I am running radrails from the terminal where I have set these variables. Does Radrails is recognize the gem location?

Also I am not able to start the Webrick server using Radrails. The server always is in stopped state and the console output is blank. I am not able to fix this since I dont see any errors.

thank you!

1

There are 1 answers

0
Малъ Скрылевъ On

Use or to change ruby and gem space to another one. If you will begin usage of the them do the following:

  1. Install rvm with ruby:

    $ \curl -sSL https://get.rvm.io | bash -s stable --ruby
    

    or install rbenv, and then install ruby, and make it global:

    $ \curl https://raw.githubusercontent.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash
    $ rbenv install 2.1.4
    $ rbenv global 2.1.4
    
  2. Install the without documentation into the general gem space:

    $ gem install rails --no-ri --no-rdoc
    
  3. Enter to the project, create two files .ruby-version with just installed version of ruby (in example 2.1.4), and .ruby-gemset with name of your project:

    $ cd project-folder
    $ echo "2.1.4" > .ruby-version
    $ echo "your-project-name" .ruby-gemset
    
  4. Fix Gemfile with newly intsalled version of ruby adding a line:

    ruby '2.1.4'
    
  5. Reenter to the project folder, and rvm will generate its wrappers:

    $ cd .. ; cd project-folder
    
  6. Issue gem installation:

    $ bundle install