I am new to Rails & Ruby and have been following the http://ruby.railstutorial.org/ruby-on-rails-tutorial-book and amy trying to deploy the demo app to my Dreamhost passenger enabled host and when I try to run the app if fails with:
Ruby (Rack) application could not be started
and the following backtrace (formatting the best I can):
# File Line Location
0 /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb 10 in `exit'
1 /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb 10
2 /usr/lib/ruby/1.8/rubygems/custom_require.rb 36 in `gem_original_require'
3 /usr/lib/ruby/1.8/rubygems/custom_require.rb 36 in `require'
4 /home/oilfieldx/oilfieldexchange.com/releases/20120108233024/config/boot.rb 6
5 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
6 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `require'
7 /home/oilfieldx/oilfieldexchange.com/releases/20120108233024/config/application.rb 1
8 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
9 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `require'
10 /home/oilfieldx/oilfieldexchange.com/releases/20120108233024/config/environment.rb 2
11 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
12 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `require'
13 config.ru 3
14 /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb 46 in `instance_eval'
15 /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb 46 in `initialize'
16 config.ru 1 in `new'
17 config.ru 1
My environment.rb file has:
# Load the rails application
<br>require File.expand_path('../application', __FILE__)
# Initialize the rails application
<br>DemoApp::Application.initialize!
My app runs fine on my local machine but just craters once I deploy it. I am guessing I am missing a line in a config file or something to do with my gems from what I gather researching this.
My answer ended up being Heroku :^)
来源:https://stackoverflow.com/questions/8784150/rack-passenger-fails-on-dreamhost