views:

56

answers:

1

I am trying to deploy an app on Heroku, however the app crashes and I get this when I run heroku logs (full trace below; Gemfile content below).

You have already activated rack 1.2.1, but your Gemfile requires rack 1.0.1

I am using bundler (1.0.0.rc.6) for the gem management.

I also have a Scrapi problem, it requires a Mac lib even though Heroku runs in a Linux env:

Scraper::Reader::HTMLParseError: Unable to load /disk1/home/slugs/254653_91616fb_8a40/mnt/.bundle/gems/ruby/1.8/gems/scrapi-1.2.0/lib/scraper/../tidy/libtidy.dylib

Trace:

/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:27:in `setup': You have already activated rack 1.2.1, but your Gemfile requires rack 1.0.1. Consider using bundle exec. (Gem::LoadError)
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/spec_set.rb:12:in `each'
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/spec_set.rb:12:in `each'
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:17:in `setup'
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler.rb:100:in `setup'
        from /disk1/home/slugs/254653_1bad33f_8a40/mnt/config/../config/preinitializer.rb:16
        from /disk1/home/slugs/254653_1bad33f_8a40/mnt/config/boot.rb:43:in `load'
        from /disk1/home/slugs/254653_1bad33f_8a40/mnt/config/boot.rb:43:in `preinitialize'
        from /disk1/home/slugs/254653_1bad33f_8a40/mnt/config/boot.rb:25:in `boot!'
        from /disk1/home/slugs/254653_1bad33f_8a40/mnt/config/boot.rb:125
        from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /disk1/home/slugs/254653_1bad33f_8a40/mnt/config/environment.rb:7
        from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:42:in `load_application'
        from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:23:in `initialize'
        from /home/heroku_rack/heroku.ru:31:in `new'
        from /home/heroku_rack/heroku.ru:31
        from /home/slugs/254653_1bad33f_8a40/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
        from /home/slugs/254653_1bad33f_8a40/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
        from /home/slugs/254653_1bad33f_8a40/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:63:in `new'
        from /home/slugs/254653_1bad33f_8a40/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:63:in `map'
        from /home/heroku_rack/heroku.ru:20
        from /home/slugs/254653_1bad33f_8a40/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
        from /home/slugs/254653_1bad33f_8a40/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
        from /home/heroku_rack/heroku.ru:13:in `new'
        from /home/heroku_rack/heroku.ru:13
        from /home/slugs/254653_1bad33f_8a40/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
        from /home/slugs/254653_1bad33f_8a40/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
        from /home/heroku_rack/heroku.ru:1:in `new'
        from /home/heroku_rack/heroku.ru:1

-----> Your application is requiring a file that it can't find.

       Most often this is due to missing gems, or it could be that you failed
       to commit the file to your repo.  See http://docs.heroku.com/gems for
       more information on managing gems.

source :gemcutter

gem "rails", "~> 2.3.5"
gem "pg", :group => :production
gem "calendar_date_select"
gem "paperclip"
gem "nokogiri"
gem "webrat"
gem "scrapi", "~>1.2.0"
gem "tidy", "~>1.1.2"
gem "facebooker"
gem "shoulda"
gem "devise", "~>1.0.7"
gem "devise_facebook_connectable", "~>0.2.1"
gem "mysql"
gem "rack", "~>1.0.1"
A: 

I've switched to .gems. the problem with tidy was I had to set Tidy.path= to the .so lib path before running the task or in the env.

gavri_gp