0

我正在尝试在 VPS 服务器中托管 Rails 应用程序。服务器已经安装了 Apache,所以我尝试先安装乘客,然后安装乘客 apache 模块。

我以用户身份安装了 RVM,并安装了 ruby​​ 1.9.3 并将其设置为默认 ruby​​。然后,我安装了 3.0.17 版的乘客 gem,因为我们正在迁移 rails 应用程序,旧服务器中的乘客版本是 3.0.17。我能够使用命令安装乘客 gem gem install passenger -v 3.0.17

安装乘客后,我继续尝试passenger-apache-module使用passenger-install-apache2-module命令进行安装。我得到这个输出:

Checking for required software...

 * GNU C++ compiler... not found
 * Curl development headers with SSL support... not found
 * OpenSSL development headers... not found
 * Zlib development headers... not found
 * Ruby development headers... found
 * OpenSSL support for Ruby... found
 * RubyGems... found
 * Rake... found at /home/federaltitle/.rvm/wrappers/ruby-1.9.3-p448/rake
 * rack... found
 * Apache 2... found at /usr/local/apache/bin/httpd
 * Apache 2 development headers... found at /usr/bin/apxs
 * Apache Portable Runtime (APR) development headers... found at /usr/local/apache/bin/apr-1-config
 * Apache Portable Runtime Utility (APU) development headers... found at /usr/local/apache/bin/apu-1-config

Some required software is not installed.
But don't worry, this installer will tell you how to install them.

Press Enter to continue, or Ctrl-C to abort.

当我按 Enter 时,我得到以下输出:

Installation instructions for required software

 * To install GNU C++ compiler:
   Please run yum install gcc-c++ as root.

 * To install Curl development headers with SSL support:
   Please run yum install curl-devel as root.

 * To install OpenSSL development headers:
   Please run yum install openssl-devel as root.

 * To install Zlib development headers:
   Please run yum install zlib-devel as root.

If the aforementioned instructions didn't solve your problem, then please take
a look at the Users Guide:

  /home/federaltitle/.rvm/gems/ruby-1.9.3-p448/gems/passenger-3.0.17/doc/Users guide Apache.html

但是,当我尝试以 root 用户身份安装消息 ( yum install gcc-c++, yum install curl-devel, yum install openssl-devel, yum install zlib-devel) 中提到的库时,它表示所有库都已安装并且是最新的。

服务器详情

操作系统 - CENTOS 6.4 x86_64

4

1 回答 1

0

我能够以 root 身份安装 rvm、ruby 和乘客,并且问题已得到解决。当以用户身份完成时,与权限有关。但是我必须为 ruby​​ 部分上的用户相关活动做一些变通方法,例如bundle installrake assets:precompile(必须以 root 身份执行此操作,因此授予本地用户执行这些操作的 sudo 权限)。

于 2013-12-10T07:03:10.010 回答