Sinatra + Passenger + RVM on DreamHost fail to start

I'm having trouble running sinatra server.

I installed RVM and wrote a simple sinatra app, sources below. I created public + tmp + tmp/restart.txt folders as well. I followed some answers here/articles on how to set the GEM_PATH/GEM_HOME.

The site is defined with "Passenger (Ruby/Python apps only)" option.

If I run the standalone passenger, with the command line in SSH, it works fine on port 3000 (with public URL, eg http://domain.com:3000). So it means the site is fine, gems are available, it's just the connection to Passenger that fails.

I can't even see the logs from apache to see what's wrong. The /home/user/domain.com/http/error.log is empty, and the access.log is filled with 500s. The error in the browser is 500, Internal Server Error, without any clue.

The user I installed RVM to is a full admin on this account.

What am I missing?

# 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

I'm sorry to hear you are having troubles installing RVM onto our servers. This can get kind of tricky sometimes, and know you're not alone! We actually have a whole article on our wiki page dedicated to installing RVM on our servers.

http://wiki.dreamhost.com/Rvm

This should offer some insight on the problem you're experiencing. If you are unable to resolve it, you can also send a ticket over to our technical suport. https://panel.dreamhost.com/index.cgi?tree=support.msg& I hope this all helps!

Regards, Justin H DreamHost Staff

链接地址: http://www.djcxy.com/p/32532.html

上一篇: RoR应用程序和带有Passenger的nginx在Ubuntu上运行

下一篇: DreamHost上的Sinatra + Passenger + RVM无法启动