How to use rvm to install ruby ​​on a shared dreamhost server?

I followed the guide here: http://spontaneousderivation.com/2012/09/30/rails-3-2-on-a-shared-dreamhost-server/ to get rails 3.2 and ruby ​​1.9.3 on a shared server dreamhost, but I ran into an error that they don’t mention. When installing rvm, it cannot set requirements without root access, which I don’t have. It lists the following requirements:

libreadline6-dev, libyaml-dev, automake, libtool, libffi-dev 

If I install autolibs to ignore this by installing the following

 rvm autolibs 1 

and run:

 rvm install ruby-1.9.3 

then it reaches the compilation stage and gives this error:

 Error running 'make -j8', please read /home/USER/.rvm/log/ruby-1.9.3-p392/make.log There has been an error while running make. Halting the installation. 

Does anyone know how I can get around this? I have been trying for several days.

This is the contents of make.log:

  CC = gcc LD = ld LDSHARED = gcc -shared CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration -fPIC XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT CPPFLAGS = -I. -I.ext/include/x86_64-linux -I./include -I. DLDFLAGS = -Wl,-soname,libruby.so.1.9 SOLIBS = -lpthread -lrt -ldl -lcrypt -lm compiling main.c compiling dmydln.c compiling dmyencoding.c compiling version.c compiling array.c compiling miniprelude.c compiling bignum.c compiling class.c compiling compar.c compiling complex.c compiling dir.c compiling dln_find.c compiling enum.c compiling enumerator.c make: *** [enumerator.o] Killed make: *** Waiting for unfinished jobs.... 
+4
source share
2 answers

You must install ruby ​​using binaries (no compilation errors). Like this:

 $ rvm list remote # Rubies available for 'debian/6/x86_64': ruby-1.9.3-p194 ruby-1.9.3-p286 ruby-1.9.3-p327 ruby-1.9.3-p362 ruby-1.9.3-p374 * ruby-1.9.3-p392 ruby-1.9.3-p429 ruby-1.9.3-p448 ruby-2.0.0-p0 ruby-2.0.0-p195 * ruby-2.0.0-p247 # * - installed already 

so you install the binary as follows:

 $ rvm mount -r https://rvm.io/binaries/{YOUR_SERVER_ENV}/{RUBY_VERSION}.tar.bz2 --verify-downloads 1 

or

 $ rvm mount -r https://rvm.io/binaries/debian/6.0.4/x86_64/ruby-1.9.3-p448.tar.bz2 --verify-downloads 1 

Of course, you cannot use Passenger with RVM and nothing but ruby-1.8.7. See this article to configure FastCGI: http://wiki.dreamhost.com/Rails_3#Using_FastCGI

+3
source

Not sure if this wiki article was around, but Dreamhost is now alone . Taken directly from it and assuming that you have access to SSH,

Check if rvm is installed correctly:

 rvm --version rvm 1.26.11 (latest) by Wayne E. Seguin < wayneeseguin@gmail.com >, Michal Papis < mpapis@gmail.com > [https://rvm.io/] 

Get a list of available versions:

 rvm list known 

Install the correct version

 rvm install 2.2.2 

Tell the system the standard ruby ​​version

 rvm use 2.2.2 --default 

Make sure the correct ruby ​​version is installed.

 ruby -v ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux] 

If this does not work, I installed rvm again following the instructions from the tutorial

  • Install RVM Public Keys

     gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 
  • Install the latest stable version of RVM and it will

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

    create a new folder under your user name /.rvm
    Add this line to your .bash_profile

     [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* 

    Add this line to your .bashrc file:

     export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting 
  • Run this to disable GEM_HOME

     unset GEM_HOME 
  • Run this to install the new RVM installation:

     source ~/.rvm/scripts/rvm 
  • Add this to your .bashrc file

     source .bash_profile 
  • Run this command to update your .bash_profile:

     . ~/.bash_profile 
  • Now check if RVM is installed and working:

     rvm --version rvm 1.26.11 (latest) by Wayne E. Seguin < wayneeseguin@gmail.com >, Michal Papis < mpapis@gmail.com > [https://rvm.io/] 
0
source

All Articles