ruby on rails - How to get mongrel working with bundler? -


transitioning bundler existing production setup. naively gemfile , setup like:

gem "rails", "2.3.8" gem "mongrel", git: "http://github.com/dynamix/mongrel.git"  bundle install --path /mnt/app/shared/bundle 

starting with

bundle exec mongrel_rails start --environment=production ... 

results in

/mnt/app/shared/bundle/ruby/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:166:in `require':  no such file load -- /mnt/services/shared/bundle/ruby/1.9.1/gems/mongrel-1.2.0.beta.1/lib/mongrel/init.rb (missingsourcefile) 

what do?

to answer own, since couldn't find correct solution elsewhere on web scenario:

the problem seems interaction of bundler , mongrel's use of gem_plugin. yes, these may on life support unfortunately lots of people's production configs still depend on them.

seems mongrel --pre installed git source, it's looking in bundle/ruby/1.9.1/gems/mongrel_ instead of bundle/ruby/1.9.1/bundler/gems/mongrel_ bundler stashing gem cloned git.

so solution worked our config symlink them:

ln -s /mnt/app/shared/bundle/ruby/1.9.1/bundle/gems/mongrel* \  /mnt/app/shared/bundle/ruby/1.9.1/gems/mongrel-1.2.0.beta.1 

this simple bundler automatically. full trace of exception was:

/mnt/app/shared/bundle/ruby/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:166:in `require':  no such file load -- /mnt/app/shared/bundle/ruby/1.9.1/gems/mongrel-1.2.0.beta.1/lib/mongrel/init.rb (missingsourcefile)     /mnt/app/shared/bundle/ruby/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:166:in `require'     /mnt/app/shared/bundle/ruby/1.9.1/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:134:in `block in load'     /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:241:in `each'     /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:241:in `each'     /mnt/services/shared/bundle/ruby/1.9.1/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:112:in `load'     /mnt/app/shared/bundle/ruby/1.9.1/bundler/gems/mongrel-f3e69eb8e6fb/lib/mongrel/configurator.rb:231:in `load_plugins' 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -