2

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.

Dan Tappin
  • 2,692
  • 3
  • 37
  • 77
  • having the same issue. any luck? – Marc Jan 09 '12 at 09:11
  • What Rails version does your app use? – Christopher Manning Jan 09 '12 at 10:45
  • 3.0.3 if I recall correctly. I have 3.1.x on my dev machine. Is that the issue? I tried re-installing the 3.0.x version but `rails -v` still reports v3.1.x. What is the trick to downgrade? – Dan Tappin Jan 09 '12 at 15:09
  • I have Rails 3.1.3 on my dev system and DH has 3.0.3. Do they have to be the same?? – Dan Tappin Jan 10 '12 at 06:01
  • It need up being the gem versions being mis matched. I had to basicly downgrade on my local machine to get it to work. I then tried spree on Dreamhost which was a nightmare. I switched to Heroku. Bit of a learning curve but WAY easier and built for rails. – Dan Tappin Mar 06 '12 at 06:12

1 Answers1

1

My answer ended up being Heroku :^)

Dan Tappin
  • 2,692
  • 3
  • 37
  • 77