Weird install issues

All-
Not sure if I missed a step but I'm getting weird issues when
attempting to install the foreman:

root@puppet:~# apt-get install foreman
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
foreman
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 0B/3,507kB of archives.
After this operation, 22.9MB of additional disk space will be used.
Selecting previously deselected package foreman.
(Reading database … 58356 files and directories currently
installed.)
Unpacking foreman (from …/archives/foreman_0.4-1_all.deb) …
Processing triggers for ureadahead …
Setting up foreman (0.4-1) …
dbconfig-common: writing config to /etc/dbconfig-common/foreman.conf

Creating config file /etc/foreman/database.yml with new version
granting access to database puppet for puppet@localhost: success.
verifying access for puppet@localhost: success.
creating database puppet: success.
verifying database puppet exists: success.
dbconfig-common: flushing administrative password
dpkg: error processing foreman (–configure):
subprocess installed post-installation script returned error exit
status 1
Errors were encountered while processing:
foreman
E: Sub-process /usr/bin/dpkg returned an error code (1)

I am running mysql, and the puppet db already exists:

rake db:migrate
(in /usr/share/foreman)
NOTE: Gem.source_index is deprecated, use Specification. It will be
removed on or after 2011-11-01.
Gem.source_index called from /usr/share/foreman/config/…/vendor/rails/
railties/lib/rails/gem_dependency.rb:21.
NOTE: Gem::SourceIndex#refresh! is deprecated with no replacement. It
will be removed on or after 2011-11-01.
Gem::SourceIndex#refresh! called from /usr/share/foreman/config/…/
vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:34.
NOTE: Gem::SourceIndex#load_gems_in is deprecated with no replacement.
It will be removed on or after 2011-11-01.
Gem::SourceIndex#load_gems_in called from /usr/local/lib/site_ruby/1.8/
rubygems/source_index.rb:322.
NOTE: Gem::SourceIndex#add_spec is deprecated, use
Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /usr/local/lib/site_ruby/1.8/
rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use
Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /usr/local/lib/site_ruby/1.8/
rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use
Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /usr/local/lib/site_ruby/1.8/
rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use
Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /usr/local/lib/site_ruby/1.8/
rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use
Specification.add_spec. It will be removed on or after 2011-11-01.

<snip>
NOTE: Gem::SourceIndex#add_spec is deprecated, use
Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /usr/local/lib/site_ruby/1.8/
rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use
Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /usr/local/lib/site_ruby/1.8/
rubygems/source_index.rb:91.
DEPRECATION WARNING: Rake tasks in vendor/plugins/jrails/tasks and
vendor/plugins/scoped_search/tasks are deprecated. Use lib/tasks
instead. (called from /usr/share/foreman/vendor/rails/railties/lib/
tasks/rails.rb:10)
rake aborted!
undefined method `name' for "abstract":String

(See full trace by running task with --trace)

Am I missing something? I'm not really a rails dude, so please be
gentle :wink:

-Josh

That's a shiny Debian command :slight_smile: - what version of Debian are you running on?

Cheers,
Greg

··· On 15 December 2011 19:59, Josh Vaughn wrote: > All- > Not sure if I missed a step but I'm getting weird issues when > attempting to install the foreman: > > root@puppet:~# apt-get install foreman

I have pretty much the same issue here and took apart the whole deb.
Turns out, in the postinst there is a line

su - foreman -s /bin/sh -c /usr/share/foreman/extras/dbmigrate >/dev/null
2>&1

I changed that and removed the redirect at the end, that leads to

dpkg --configure -a

Setting up foreman (0.4.2-1) …
dbconfig-common: writing config to /etc/dbconfig-common/foreman.conf
(in /usr/share/foreman)
rake aborted!
undefined method `downcase' for nil:NilClass
(See full trace by running task with --trace)

I put --trace in, that leads to

su - foreman -s /bin/sh -c /usr/share/foreman/extras/dbmigrate

(in /usr/share/foreman)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method downcase&#39; for nil:NilClass /usr/lib/ruby/1.8/puppet/defaults.rb:226 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in require&#39; /usr/share/foreman/vendor/rails/activesupport/lib/active_support/dependencies.rb:184:inrequire'
/usr/lib/ruby/1.8/puppet.rb:99
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require&#39; /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire'
/usr/share/foreman/vendor/rails/activesupport/lib/active_support/dependencies.rb:184:in
require&#39; /usr/share/foreman/config/initializers/foreman.rb:3 /usr/share/foreman/vendor/rails/activesupport/lib/active_support/dependencies.rb:173:inload_without_new_constant_marking'
/usr/share/foreman/vendor/rails/activesupport/lib/active_support/dependencies.rb:173:in
load&#39; /usr/share/foreman/config/../vendor/rails/railties/lib/initializer.rb:622:inload_application_initializers'
/usr/share/foreman/config/…/vendor/rails/railties/lib/initializer.rb:621:in
each&#39; /usr/share/foreman/config/../vendor/rails/railties/lib/initializer.rb:621:inload_application_initializers'
/usr/share/foreman/config/…/vendor/rails/railties/lib/initializer.rb:176:in
process&#39; /usr/share/foreman/config/../vendor/rails/railties/lib/initializer.rb:113:insend'
/usr/share/foreman/config/…/vendor/rails/railties/lib/initializer.rb:113:in
run&#39; /usr/share/foreman/config/environment.rb:9 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in require&#39; /usr/share/foreman/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:inrequire'
/usr/share/foreman/vendor/rails/activesupport/lib/active_support/dependencies.rb:547:in
new_constants_in&#39; /usr/share/foreman/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:inrequire'
/usr/share/foreman/vendor/rails/railties/lib/tasks/misc.rake:4
/usr/lib/ruby/1.8/rake.rb:636:in call&#39; /usr/lib/ruby/1.8/rake.rb:636:inexecute'
/usr/lib/ruby/1.8/rake.rb:631:in each&#39; /usr/lib/ruby/1.8/rake.rb:631:inexecute'
/usr/lib/ruby/1.8/rake.rb:597:in invoke_with_call_chain&#39; /usr/lib/ruby/1.8/monitor.rb:242:insynchronize'
/usr/lib/ruby/1.8/rake.rb:590:in invoke_with_call_chain&#39; /usr/lib/ruby/1.8/rake.rb:607:ininvoke_prerequisites'
/usr/lib/ruby/1.8/rake.rb:604:in each&#39; /usr/lib/ruby/1.8/rake.rb:604:ininvoke_prerequisites'
/usr/lib/ruby/1.8/rake.rb:596:in invoke_with_call_chain&#39; /usr/lib/ruby/1.8/monitor.rb:242:insynchronize'
/usr/lib/ruby/1.8/rake.rb:590:in invoke_with_call_chain&#39; /usr/lib/ruby/1.8/rake.rb:583:ininvoke'
/usr/lib/ruby/1.8/rake.rb:2051:in invoke_task&#39; /usr/lib/ruby/1.8/rake.rb:2029:intop_level'
/usr/lib/ruby/1.8/rake.rb:2029:in each&#39; /usr/lib/ruby/1.8/rake.rb:2029:intop_level'
/usr/lib/ruby/1.8/rake.rb:2068:in standard_exception_handling&#39; /usr/lib/ruby/1.8/rake.rb:2023:intop_level'
/usr/lib/ruby/1.8/rake.rb:2001:in run&#39; /usr/lib/ruby/1.8/rake.rb:2068:instandard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

I hope that helps to identify whatever is going wrong …

··· On Thursday, December 15, 2011 8:59:38 PM UTC+1, Josh Vaughn wrote: > > All- > Not sure if I missed a step but I'm getting weird issues when > attempting to install the foreman: > > root@puppet:~# apt-get install foreman > Reading package lists... Done > Building dependency tree > Reading state information... Done > The following NEW packages will be installed: > foreman > 0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded. > Need to get 0B/3,507kB of archives. > After this operation, 22.9MB of additional disk space will be used. > Selecting previously deselected package foreman. > (Reading database ... 58356 files and directories currently > installed.) > Unpacking foreman (from .../archives/foreman_0.4-1_all.deb) ... > Processing triggers for ureadahead ... > Setting up foreman (0.4-1) ... > dbconfig-common: writing config to /etc/dbconfig-common/foreman.conf > > Creating config file /etc/foreman/database.yml with new version > granting access to database puppet for puppet@localhost: success. > verifying access for puppet@localhost: success. > creating database puppet: success. > verifying database puppet exists: success. > dbconfig-common: flushing administrative password > dpkg: error processing foreman (--configure): > subprocess installed post-installation script returned error exit > status 1 > Errors were encountered while processing: > foreman > E: Sub-process /usr/bin/dpkg returned an error code (1) > > ( ... ) > -- Hardy

> Joshua Vaughn josh@sibblingz.com via googlegroups.com 22/12/2011 (13 days
ago) to foreman-users
> Ubuntu 10 LTS

Hmm, sounds like a similar issue I had trying to get Foreman to run on
Debian Wheezy. Never did track it down - I resorted to using the from-git
method. I did encounter a number of version-dependant problems in Wheezy,
particularly with gems/rake - what version of rubygems is installed on
10LTS?

Cheers,
Greg