views:

469

answers:

3

my environment.rb contains:

ENV['GEM_PATH'] = File.expand_path('~/.gems') + ':/usr/lib/ruby/gems/1.8' 

My gemfile contains:

source 'http://rubygems.org'
source :gemcutter

gem 'rails', '3.0.0.rc'


gem 'mysql'
gem 'haml'
gem 'RedCloth'
gem "friendly_id", "~> 3.0"
gem 'agnostic-will_paginate', "~> 3.0.0"


# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
#gem 'capistrano'


# To use debugger
# gem 'ruby-debug'

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri', '1.4.1'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'

The error after deploying a Rails 3 app on dreamhost is:

You have already activated rack 1.1.0, but your Gemfile requires rack 1.2.1. Consider using bundle exec.

   /home/dreamhostuser/.gems/gems/bundler-1.0.0.rc.1/lib/bundler/runtime.rb     27      in `setup'
1   /home/dreamhostuser/.gems/gems/bundler-1.0.0.rc.1/lib/bundler/spec_set.rb   12  in `each'
2   /home/dreamhostuser/.gems/gems/bundler-1.0.0.rc.1/lib/bundler/spec_set.rb   12  in `each'
3   /home/dreamhostuser/.gems/gems/bundler-1.0.0.rc.1/lib/bundler/runtime.rb    17  in `setup'
4   /home/dreamhostuser/.gems/gems/bundler-1.0.0.rc.1/lib/bundler.rb    97  in `setup'
5   /home/dreamhostuser/domain.net/releases/20100728144817/config/boot.rb   5   
6   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `gem_original_require'
7   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `require'
8   /home/dreamhostuser/domain.net/releases/20100728144817/config/application.rb    1   
9   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `gem_original_require'
10  /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `require'
11  /home/dreamhostuser/domain.net/releases/20100728144817/config/environment.rb    4   
12  /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `gem_original_require'
13  /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `require'
14  config.ru   3   
15  /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/builder.rb  46  in `instance_eval'
16  /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/builder.rb  46  in `initialize'
17  config.ru   1   in `new'
18  config.ru

Other notes: Rails 3 beta 4 is working.

Reverted to beta 4 version for now. Would be good to know how to fix this issue for Rails 3. Dreamhost is ok for staging apps.

A: 

Did you find a solution for this?

Noah Hendrix
i reverted to beta 4 for now. I think this has to do with a railtie. I don't want to mess with that just for staging an app. I hope this is fixed for rc 2 or so.
kgpdeveloper
+2  A: 

I had the same problem on my shared account on Dreamhost, I was able to do it works this way:

On my local machine:

bundle package

On Dreamhost:

bundle install --path vendor/bundle --local

And it looks work perfectly, I hope I was help you ...