加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 如何使用rvm在dreamhost共享服务器上安装ruby

发布时间:2020-12-17 02:20:57 所属栏目:百科 来源:网络整理
导读:我一直在这里关注指南: http://spontaneousderivation.com/2012/09/30/rails-3-2-on-a-shared-dreamhost-server/ 让dream 3.2和ruby 1.9.3在dreamhost共享服务器上运行,但是我遇到了一个他们没有提到的错误.在安装rvm时,它无法安装没有root访问权限的要求,
我一直在这里关注指南:
http://spontaneousderivation.com/2012/09/30/rails-3-2-on-a-shared-dreamhost-server/
让dream 3.2和ruby 1.9.3在dreamhost共享服务器上运行,但是我遇到了一个他们没有提到的错误.在安装rvm时,它无法安装没有root访问权限的要求,这是我没有的.它列出了以下要求:

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....

解决方法

你应该用二进制文件安装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的Passenger以及ruby-1.8.7以外的任何东西.请参阅此文章以设置FastCGI:http://wiki.dreamhost.com/Rails_3#Using_FastCGI

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读