gem - Gemfile and Bundler error in foreman when doing bundle install -


i'm trying install foreman hooks there error in gemfile, , bundler cannot continue. when running bundle install

foreman version 1.1

[root@foreman foreman]# bundle update /usr/share/foreman/config/settings.rb:2: undefined method `load_file' yaml:module (nomethoderror)     /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'     /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'     /usr/share/foreman/gemfile:1:in `eval_gemfile'     /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/dsl.rb:9:in `evaluate'     /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/definition.rb:19:in `build'     /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler.rb:148:in `definition'     /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/cli.rb:301:in `update'     /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `__send__'     /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `run'     /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'     /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:344:in `dispatch'     /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:in `start'     /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/bin/bundle:20     /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'     /usr/lib/ruby/gems/1.8/gems/bundler-1.3.5/bin/bundle:20     /usr/bin/bundle:19:in `load'     /usr/bin/bundle:19 there error in gemfile, , bundler cannot continue. 

gemfile:

[root@foreman foreman]# cat gemfile require file.expand_path('../config/settings', __file__) source 'http://rubygems.org'  gem 'rails' gem "jquery-rails" gem 'json' gem 'rest-client' gem "audited-activerecord" gem "will_paginate" gem "ancestry" gem 'scoped_search' gem 'net-ldap' gem "safemode" gem 'ruby_parser' gem 'uuidtools' gem "apipie-rails" gem 'rabl' gem 'oauth'  dir["#{file.dirname(__file__)}/bundler.d/*.rb"].each |bundle|  # puts "adding custom gem file #{bundle}"   self.instance_eval(bundler.read_file(bundle)) end 

and gemlock.file

[root@foreman foreman]# cat gemfile.lock  gem   remote: http://rubygems.org/   specs:     abstract (1.0.0)     actionmailer (3.0.20)       actionpack (= 3.0.20)       mail (~> 2.3.0)     actionpack (3.0.20)       activemodel (= 3.0.20)       activesupport (= 3.0.20)       builder (~> 2.1.2)       erubis (~> 2.6.6)       i18n (~> 0.5.0)       rack (~> 1.2.5)       rack-mount (~> 0.6.14)       rack-test (~> 0.5.7)       tzinfo (~> 0.3.23)     activemodel (3.0.20)       activesupport (= 3.0.20)       builder (~> 2.1.2)       i18n (~> 0.5.0)     activerecord (3.0.20)       activemodel (= 3.0.20)       activesupport (= 3.0.20)       arel (~> 2.0.10)       tzinfo (~> 0.3.23)     activeresource (3.0.20)       activemodel (= 3.0.20)       activesupport (= 3.0.20)     activesupport (3.0.20)     ancestry (1.3.0)       activerecord (>= 2.3.14)     apipie-rails (0.0.13)     arel (2.0.10)     audited (3.0.0.rc1)     audited-activerecord (3.0.0.rc1)       activerecord (~> 3.0)       audited (= 3.0.0.rc1)     builder (2.1.2)     erubis (2.6.6)       abstract (>= 1.0.0)     excon (0.14.0)     fog (1.9.0)       builder       excon (~> 0.14)       formatador (~> 0.2.0)       mime-types       multi_json (~> 1.0)       net-scp (~> 1.0.4)       net-ssh (>= 2.1.3)       nokogiri (~> 1.5.0)       ruby-hmac     foreman_hooks (0.3.1)     formatador (0.2.1)     i18n (0.5.0)     jquery-rails (1.0.19)       railties (~> 3.0)       thor (~> 0.14)     json (1.6.8)     mail (2.3.3)       i18n (>= 0.4.0)       mime-types (~> 1.16)       treetop (~> 1.4.8)     mime-types (1.18)     multi_json (1.2.0)     net-ldap (0.3.1)     net-scp (1.0.4)       net-ssh (>= 1.99.1)     net-ssh (2.3.0)     nokogiri (1.5.2)     oauth (0.4.7)     polyglot (0.3.3)     rabl (0.7.5)       activesupport (>= 2.3.14)       multi_json (~> 1.0)     rack (1.2.5)     rack-mount (0.6.14)       rack (>= 1.0.0)     rack-test (0.5.7)       rack (>= 1.0)     rails (3.0.20)       actionmailer (= 3.0.20)       actionpack (= 3.0.20)       activerecord (= 3.0.20)       activeresource (= 3.0.20)       activesupport (= 3.0.20)       bundler (~> 1.0)       railties (= 3.0.20)     railties (3.0.20)       actionpack (= 3.0.20)       activesupport (= 3.0.20)       rake (>= 0.8.7)       rdoc (~> 3.4)       thor (~> 0.14.4)     rake (0.9.2.2)     rbvmomi (1.5.1)       builder       nokogiri (>= 1.4.1)       trollop     rdoc (3.12)       json (~> 1.4)     rest-client (1.6.7)       mime-types (>= 1.16)     ruby-hmac (0.4.0)     ruby-libvirt (0.4.0)     ruby2ruby (2.0.1)       ruby_parser (~> 3.0.0)       sexp_processor (~> 4.0)     ruby_parser (3.0.1)       sexp_processor (~> 4.1)     safemode (1.2.0)       ruby2ruby (>= 2.0.1)       ruby_parser (>= 3.0.1)       sexp_processor (>= 4.1.2)     scoped_search (2.4.0)       activerecord (>= 2.1.0)     sexp_processor (4.1.2)     sqlite3 (1.3.5)     thor (0.14.6)     treetop (1.4.10)       polyglot       polyglot (>= 0.3.1)     trollop (1.16.2)     tzinfo (0.3.32)     uuidtools (2.1.1)     will_paginate (3.0.3)  platforms   ruby  dependencies   ancestry   apipie-rails   audited-activerecord   fog (>= 1.9)   foreman_hooks   jquery-rails   json   net-ldap   oauth   rabl   rails   rbvmomi   rest-client   ruby-libvirt   ruby_parser   safemode   scoped_search   sqlite3   uuidtools   will_paginate 

this has started happening recently, think due change in bundler or possibly rvm means yaml doesn't loaded before gemfile's parsed. such highlights bug in foreman fixed in develop (for 1.2), hasn't been backported 1.1 stable branch.

to fix it, add following line top of config/settings.rb in foreman installation:

require 'yaml' 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -