Solve rack problem for Dreamhost and Rails 3 rc

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' 

Error deploying Rails 3 application on Dreamhost:

You have already activated rack 1.1.0, but rack 1.2.1 is required for your Gemfile. 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 works.

Reverted to the beta version at the moment. It would be nice to know how to fix this problem for Rails 3. Dreamhost is approved for hosting applications.

+2
source share
1 answer

I had the same problem with my shared Dreamhost account that I was able to do it like this:

On my local machine:

 bundle package 

In Dreamhost:

 bundle install --path vendor/bundle --local 

And it works great.

+5
source

All Articles