【问题标题】:Sinatra + Passenger + RVM on DreamHost fail to startDreamHost 上的 Sinatra + Passenger + RVM 无法启动
【发布时间】:2013-01-23 06:12:00
【问题描述】:

我在运行 sinatra 服务器时遇到问题。

我安装了 RVM 并编写了一个简单的 sinatra 应用程序,来源如下。我也创建了 public + tmp + tmp/restart.txt 文件夹。我在这里关注了一些答案/关于如何设置 GEM_PATH/GEM_HOME 的文章。

该站点是使用“Passenger(仅限 Ruby/Python 应用程序)”选项定义的。

如果我在 SSH 中使用命令行运行独立乘客,它可以在端口 3000 上正常工作(使用公共 URL,例如http://domain.com:3000)。所以这意味着网站很好,宝石可用,只是与Passenger的连接失败了。

我什至看不到来自 apache 的日志来查看问题所在。 /home/user/domain.com/http/error.log 为空,access.log 填满 500s。 浏览器报错500,Internal Server Error,没有任何线索。

我安装 RVM 的用户是此帐户的完全管理员。

我错过了什么?

# config.ru

# I made sure the path is correct and that all the gems I need are installed there
ENV['GEM_PATH'] = '/home/<MY USERNAME>/.rvm/gems/ruby-1.9.3-p362'
# I tried also setting GEM_HOME instead and with GEM_PATH

require 'rubygems'

Gem.clear_paths

require 'sinatra'

require File.expand_path('../server.rb', __FILE__)
run Sinatra::Application

# server.rb

require 'sinatra'
get '/' do
  "Worked on dreamhost"
end

get '/foo/:bar' do
  "You asked for foo/#{params[:bar]}"
end

【问题讨论】:

  • 只是一个小提示。我敢打赌,在 DreamHost 上,某个地方有一个控制面板,您可以在那里找到对错误日志的访问。
  • 唯一提到的日志是我提到的目录,它有一个空的error.log。
  • 有可能的答案:The reason is that Passenger Phusion is tied to the version of Ruby installed in /usr/lib, which you can't change without root access. Even though you can install any version of Ruby with RVM, you won't get Passenger to talk to it and therefore your rails project won't use its gems. 虽然它适用于 BlueHost,但我认为它适用于 DreamHost。 http://stackoverflow.com/questions/12627313/rails-bluehost-error-ruby-rack-application-could-not-be-started

标签: ruby sinatra passenger dreamhost


【解决方案1】:

得知您在将 RVM 安装到我们的服务器上时遇到问题,我们深感遗憾。 这有时会变得有点棘手,并且知道你并不孤单! 实际上,我们的 wiki 页面上有整篇文章专门介绍在我们的服务器上安装 RVM。

http://wiki.dreamhost.com/Rvm

这应该可以让您深入了解您遇到的问题。 如果您无法解决,您也可以向我们的技术支持发送工单。 https://panel.dreamhost.com/index.cgi?tree=support.msg& 我希望这一切都会有所帮助!

问候, 贾斯汀 H DreamHost 员工

【讨论】:

    猜你喜欢
    • 2010-12-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-12
    • 1970-01-01
    • 1970-01-01
    • 2023-03-11
    相关资源
    最近更新 更多