2013-04-03 105 views
4

我一直在这里遵循指导: http://spontaneousderivation.com/2012/09/30/rails-3-2-on-a-shared-dreamhost-server/ 得到rails 3.2和ruby 1.9.3运行在Dreamhost共享服务器上,但我遇到了一个他们没有提到的错误。在安装rvm时,它无法安装没有root访问权限的需求,这是我没有的。它列出了以下要求:如何使用rvm在Dreamhost共享服务器上安装ruby?

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

如果我设置autolibs通过设置以下

rvm autolibs 1 

无视这一点,并运行:

rvm install ruby-1.9.3 

后到达编译步骤,并且给出了这样的错误:

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. 

有没有人知道我可以绕过这个方法吗?我一直在尝试几天。

这是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.... 
+0

包括提到的日志,并以'RVM autolibs 4' – mpapis 2013-04-03 21:42:07

+0

感谢mpapis,即没有工作,虽然尝试。它仍然需要sudo密码。 – Stuart 2013-04-03 21:48:52

+0

需要'sudo'来更新您的系统并安装所需的依赖项,您不想使用安全性较低的库版本? – mpapis 2013-04-03 21:56:51

回答

3

你应该用二进制文件(无编译错误)安装Ruby。就像这样:

$ 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 

,那么你安装这样的二进制:

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

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

当然,你不能使用与客运RVM和红宝石比任何其他-1.8.7。看到这篇文章设置FastCGI:http://wiki.dreamhost.com/Rails_3#Using_FastCGI

0

不知道这篇wiki文章是在附近,但Dreamhost有one现在。从中&取直假设你有SSH访问,

检查,以确保RVM安装正确:

rvm --version 
rvm 1.26.11 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] 

获取可用版本的列表:

rvm list known 

安装你需要

版本
rvm install 2.2.2 

告诉系统默认的ruby版本

rvm use 2.2.2 --default 

检查,以确保正确的Ruby版本安装

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

如果不工作 - 我会安装RVM后再次从教程中的步骤

  1. 安装RVM的公共钥匙

    gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 
    
  2. 安装RVM的最新的稳定版本,这将

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

    您的用户名为/.rvm
    下创建一个新的文件夹此行添加到你的.bash_profile

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

    此行添加到你的.bashrc文件:

    export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting 
    
  3. 运行这个来取消您的GEM_HOME

    unset GEM_HOME 
    
  4. 运行这源新RVM安装:

    source ~/.rvm/scripts/rvm 
    
  5. 添加到您的.bashrc文件

    source .bash_profile 
    
  6. 运行这个命令来更新你的.bash_profile:

    . ~/.bash_profile 
    
  7. 现在,检查是否安装了RVM和运作:

    rvm --version 
    rvm 1.26.11 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]