Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't bundle when deploying RoR app with passenger

I'm deploying an app to production using passenger and apache. I've deployed multiple apps on the same server without problems. However, for some reason I'm having problems with this app.

When I run bundle I get a lot of warnings I've never seen before:

WARNING:  #<ArgumentError: Illformed requirement ["#<YAML::Syck::DefaultKey:0x7fcbdc2ce610> 1.6.0"]>
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
  s.name = %q{bson_ext}
  s.version = "1.6.0"

  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
  s.authors = ["Mike Dirolf"]
  s.date = %q{2012-02-22}
  s.description = %q{C extensions to accelerate the Ruby BSON serialization. For more information about BSON, see http://bsonspec.org.  For information about MongoDB, see http://www.mongodb.org.}
  s.email = %q{[email protected]}
  s.extensions = ["ext/cbson/extconf.rb"]
  s.files = ["Rakefile", "bson_ext.gemspec", "ext/cbson/extconf.rb", "ext/cbson/bson_buffer.c", "ext/cbson/cbson.c", "ext/cbson/encoding_helpers.c", "ext/cbson/bson_buffer.h", "ext/cbson/encoding_helpers.h", "ext/cbson/version.h"]
  s.homepage = %q{http://www.mongodb.org}
  s.require_paths = ["ext"]
<SNIP>

<SNIP>
Using bson (1.6.0) 
Installing bson_ext (1.6.0) with native extensions 
Using bundler (1.0.22) 
Using coffee-script-source (1.2.0) 
Using execjs (1.3.0) 
Using coffee-script (2.2.0) 
Using rack-ssl (1.3.2) 
Using json (1.6.5) 
Using rdoc (3.12) 
Using thor (0.14.6) 
Using railties (3.2.2) 
Using coffee-rails (3.2.2) 
Using geoip_city (0.2.0) 
Using jquery-rails (2.0.1) 
Using libv8 (3.3.10.4) 
Installing mongo (1.6.0) 
Using mongoid (2.4.6) 
Using rails (3.2.2) 
Using sass (3.1.15) 
Using sass-rails (3.2.4) 
Using therubyracer (0.9.10) 
Using uglifier (1.2.3) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

Although it appears as if my gems get bundled when I go to my app I get a passenger error.

passenger error

Anyone have any idea what might be going on?

Thanks in advance.

like image 808
Hinchy Avatar asked Dec 03 '25 16:12

Hinchy


1 Answers

Apparently its a bug with the ruby mongo driver 1.6.0 working with older RubyGems version. Its already fixed and will be in 1.6.1 (that should have been released a few days ago and i guess will be any day now).

In the meantime, patch your GemFile (hopefully you don't have all that 1.6.0 cherries...):

gem 'bson',  '< 1.6.0'
gem 'bson_ext', '< 1.6.0'
gem 'mongo',  '< 1.6.0'

HTH

like image 133
Hertzel Guinness Avatar answered Dec 06 '25 07:12

Hertzel Guinness



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!