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

标签 ruby-on-rails rvm dreamhost

我一直在关注这里的指南:
http://spontaneousderivation.com/2012/09/30/rails-3-2-on-a-shared-dreamhost-server/
让 rails 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

当然,除了 ruby​​-1.8.7 之外,您不能将乘客与 RVM 一起使用。请参阅这篇文章来设置 FastCGI:http://wiki.dreamhost.com/Rails_3#Using_FastCGI

关于ruby-on-rails - 如何使用rvm在dreamhost共享服务器上安装ruby?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15798461/

相关文章:

macos - 无法让 Compass 在 OS X Apache 上与 RVM 和 Symfony 一起工作

mysql - ssh MySQL下载用户表多表批处理脚本-dreamhost

jquery - rails : slideUp() is working but with no transition

ruby - Emacs shell 找不到 ruby​​ gems——例如,找不到 RubyGem haml (>= 0) (Gem::LoadError)

ruby-on-rails - 还原 rails 控制台更改

ruby :RVM 安装错误 "Could not source..."

http - 你如何实现简单的网站重定向?

google-app-engine - 将 Google App Engine 与我的 Dreamhost 注册域一起使用

ruby-on-rails - 在 rails5 中使用 rails_admin 时出错

css - Heroku 找不到带有 stylesheet_tag 命令的 css(在本地工作)