Trouble installing Foreman with the Puppet Module

Hi,

I'm having trouble installing foreman via the official puppet module. Here
are the params

class {'foreman':

foreman_url             => "http://foreman.********/",

ssl                     => false,

configure_epel_repo     => false,
selinux                 => false,

db_manage               => false,
db_type                 => 'mysql',

db_host                 => 'mysql.****.com',
db_port                 => '3306',
db_database             => 'foreman_primary',
db_username             => 'foreman_primary',
db_password             => '********',

locations_enabled       => true,
organizations_enabled   => true

}

After install I get an error from passenger: "no such file to load –
rails/all". Looks like its trying to use ruby 1.8

I've attached a screenshot showing the error and also my last 3 yum
transaction details (the ones that reference ruby).

If anyone has any idea what might be going wrong… I'd be grateful for any
help.

Thanks,
Luke

Thanks, the yum debug was very helpful.

The issue is you have a mix of Passenger versions, I suspect you have a
yum-priorities configuration which is preferring EPEL's older version to
the one we ship in the Foreman repo:

Install     mod_passenger-3.0.21-11.el6.x86_64                 @epel
Dep-Install rubygem-passenger-3.0.21-11.el6.x86_64             @epel
Dep-Install rubygem-passenger-native-3.0.21-11.el6.x86_64      @epel
Dep-Install rubygem-passenger-native-libs-3.0.21-11.el6.x86_64 @epel

Dep-Install ruby193-rubygem-passenger-4.0.5-7.el6.x86_64

@foreman
Install ruby193-rubygem-passenger-native-4.0.5-7.el6.x86_64
@foreman
Dep-Install ruby193-rubygem-passenger-native-libs-4.0.5-7.el6.x86_64
@foreman

All of them should be version 4.0.5. Try doing:

yum upgrade mod_passenger-4.0.5 rubygem-passenger-4.0.5
rubygem-passenger-native-4.0.5 rubygem-passenger-native-libs-4.0.5

Regards,

··· On 19/02/14 01:00, Luke Chavers wrote: > Hi, > > I'm having trouble installing foreman via the official puppet module. > Here are the params > > class {'foreman': > > foreman_url => "http://foreman.********/", > > ssl => false, > > configure_epel_repo => false, > selinux => false, > > db_manage => false, > db_type => 'mysql', > > db_host => 'mysql.****.com', > db_port => '3306', > db_database => 'foreman_primary', > db_username => 'foreman_primary', > db_password => '********', > > locations_enabled => true, > organizations_enabled => true > > } > > > > After install I get an error from passenger: "no such file to load -- > rails/all". Looks like its trying to use ruby 1.8 > > I've attached a screenshot showing the error and also my last 3 yum > transaction details (the ones that reference ruby). > > If anyone has any idea what might be going wrong.. I'd be grateful for > any help.


Dominic Cleal
Red Hat Engineering

We had more luck with this command:

[root@foreman ~]# yum --disablerepo="*" --enablerepo=foreman upgrade
mod_passenger-4.0.5 rubygem-passenger-4.0.5 rubygem-passenger-native-4.0.5
rubygem-passenger-native-libs-4.0.5
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
Setting up Upgrade Process
Resolving Dependencies
–> Running transaction check
—> Package mod_passenger.x86_64 0:3.0.21-11.el6 will be updated
—> Package mod_passenger.x86_64 0:4.0.5-7.el6 will be an update
—> Package rubygem-passenger.x86_64 0:3.0.21-11.el6 will be updated
—> Package rubygem-passenger.x86_64 0:4.0.5-7.el6 will be an update
—> Package rubygem-passenger-native.x86_64 0:3.0.21-11.el6 will be updated
—> Package rubygem-passenger-native.x86_64 0:4.0.5-7.el6 will be an update
—> Package rubygem-passenger-native-libs.x86_64 0:3.0.21-11.el6 will be
updated
—> Package rubygem-passenger-native-libs.x86_64 0:4.0.5-7.el6 will be an
update
–> Finished Dependency Resolution

Dependencies Resolved

··· ============================================================================================================================================ Package Arch Version Repository Size ============================================================================================================================================ Updating: mod_passenger x86_64 4.0.5-7.el6 foreman 189 k rubygem-passenger x86_64 4.0.5-7.el6 foreman 164 k rubygem-passenger-native x86_64 4.0.5-7.el6 foreman 728 k rubygem-passenger-native-libs x86_64 4.0.5-7.el6 foreman 12 k

Transaction Summary

Upgrade 4 Package(s)

Total download size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): mod_passenger-4.0.5-7.el6.x86_64.rpm
> 189 kB 00:00
(2/4): rubygem-passenger-4.0.5-7.el6.x86_64.rpm
> 164 kB 00:00
(3/4): rubygem-passenger-native-4.0.5-7.el6.x86_64.rpm
> 728 kB 00:00
(4/4): rubygem-passenger-native-libs-4.0.5-7.el6.x86_64.rpm
> 12 kB 00:00

Total
831 kB/s | 1.1 MB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : rubygem-passenger-4.0.5-7.el6.x86_64
1/8
Updating : rubygem-passenger-native-libs-4.0.5-7.el6.x86_64
2/8
Updating : rubygem-passenger-native-4.0.5-7.el6.x86_64
3/8
Updating : mod_passenger-4.0.5-7.el6.x86_64
4/8
Cleanup : mod_passenger-3.0.21-11.el6.x86_64
5/8
Cleanup : rubygem-passenger-native-3.0.21-11.el6.x86_64
6/8
Cleanup : rubygem-passenger-native-libs-3.0.21-11.el6.x86_64
7/8
Cleanup : rubygem-passenger-3.0.21-11.el6.x86_64
8/8
Verifying : rubygem-passenger-native-libs-4.0.5-7.el6.x86_64
1/8
Verifying : rubygem-passenger-native-4.0.5-7.el6.x86_64
2/8
Verifying : mod_passenger-4.0.5-7.el6.x86_64
3/8
Verifying : rubygem-passenger-4.0.5-7.el6.x86_64
4/8
Verifying : rubygem-passenger-3.0.21-11.el6.x86_64
5/8
Verifying : rubygem-passenger-native-libs-3.0.21-11.el6.x86_64
6/8
Verifying : rubygem-passenger-native-3.0.21-11.el6.x86_64
7/8
Verifying : mod_passenger-3.0.21-11.el6.x86_64
8/8

Updated:
mod_passenger.x86_64 0:4.0.5-7.el6
rubygem-passenger.x86_64 0:4.0.5-7.el6 rubygem-passenger-native.x86_64
0:4.0.5-7.el6
rubygem-passenger-native-libs.x86_64 0:4.0.5-7.el6

Complete!
[root@foreman ~]# service foreman restart
Restarting foreman rails app: [ OK ]

[root@foreman ~]# service httpd restart
Stopping httpd: [ OK ]

Starting httpd: [Thu Feb 20 22:43:17 2014] [warn] module passenger_module
is already loaded, skipping
[ OK ]

We then run into another error, but it’s unrelated and we know [generally]
which direction to go in: “Mysql2::Error: Table 'foreman_primary.features’
doesn’t exist: SHOW FULL FIELDS FROM features
(ActiveRecord::StatementInvalid)”.

However, this does prove your assertion. EPEL is being prioritized ahead
of the Foreman repo when installing passenger, and since we manage EPEL
elsewhere in our base puppet config, it all makes sense, sorta. So, we’ll
keep digging.

Thanks again,
Luke

> We had more luck with this command:
>
> [root@foreman ~]# yum --disablerepo="*" --enablerepo=foreman upgrade
> mod_passenger-4.0.5 rubygem-passenger-4.0.5 rubygem-passenger-native-4.0.5
> rubygem-passenger-native-libs-4.0.5
> Loaded plugins: fastestmirror, priorities
> Loading mirror speeds from cached hostfile
> Setting up Upgrade Process
> Resolving Dependencies
> --> Running transaction check
> —> Package mod_passenger.x86_64 0:3.0.21-11.el6 will be updated
> —> Package mod_passenger.x86_64 0:4.0.5-7.el6 will be an update
> —> Package rubygem-passenger.x86_64 0:3.0.21-11.el6 will be updated
> —> Package rubygem-passenger.x86_64 0:4.0.5-7.el6 will be an update
> —> Package rubygem-passenger-native.x86_64 0:3.0.21-11.el6 will be
> updated
> —> Package rubygem-passenger-native.x86_64 0:4.0.5-7.el6 will be an
> update
> —> Package rubygem-passenger-native-libs.x86_64 0:3.0.21-11.el6 will be
> updated
> —> Package rubygem-passenger-native-libs.x86_64 0:4.0.5-7.el6 will be an
> update
> --> Finished Dependency Resolution
>
> Dependencies Resolved
>
>
> ============================================================================================================================================
> Package Arch
> Version Repository Size
>
> ============================================================================================================================================
> Updating:
> mod_passenger x86_64
> 4.0.5-7.el6 foreman 189 k
> rubygem-passenger x86_64
> 4.0.5-7.el6 foreman 164 k
> rubygem-passenger-native x86_64
> 4.0.5-7.el6 foreman 728 k
> rubygem-passenger-native-libs x86_64
> 4.0.5-7.el6 foreman 12 k
>
> Transaction Summary
>
> ============================================================================================================================================
> Upgrade 4 Package(s)
>
> Total download size: 1.1 M
> Is this ok [y/N]: y
> Downloading Packages:
> (1/4): mod_passenger-4.0.5-7.el6.x86_64.rpm
> > 189 kB 00:00
> (2/4): rubygem-passenger-4.0.5-7.el6.x86_64.rpm
> > 164 kB 00:00
> (3/4): rubygem-passenger-native-4.0.5-7.el6.x86_64.rpm
> > 728 kB 00:00
> (4/4): rubygem-passenger-native-libs-4.0.5-7.el6.x86_64.rpm
> > 12 kB 00:00
>
> --------------------------------------------------------------------------------------------------------------------------------------------
> Total
> 831 kB/s | 1.1 MB 00:01
> Running rpm_check_debug
> Running Transaction Test
> Transaction Test Succeeded
> Running Transaction
> Updating : rubygem-passenger-4.0.5-7.el6.x86_64
> 1/8
> Updating : rubygem-passenger-native-libs-4.0.5-7.el6.x86_64
> 2/8
> Updating : rubygem-passenger-native-4.0.5-7.el6.x86_64
> 3/8
> Updating : mod_passenger-4.0.5-7.el6.x86_64
> 4/8
> Cleanup : mod_passenger-3.0.21-11.el6.x86_64
> 5/8
> Cleanup : rubygem-passenger-native-3.0.21-11.el6.x86_64
> 6/8
> Cleanup : rubygem-passenger-native-libs-3.0.21-11.el6.x86_64
> 7/8
> Cleanup : rubygem-passenger-3.0.21-11.el6.x86_64
> 8/8
> Verifying : rubygem-passenger-native-libs-4.0.5-7.el6.x86_64
> 1/8
> Verifying : rubygem-passenger-native-4.0.5-7.el6.x86_64
> 2/8
> Verifying : mod_passenger-4.0.5-7.el6.x86_64
> 3/8
> Verifying : rubygem-passenger-4.0.5-7.el6.x86_64
> 4/8
> Verifying : rubygem-passenger-3.0.21-11.el6.x86_64
> 5/8
> Verifying : rubygem-passenger-native-libs-3.0.21-11.el6.x86_64
> 6/8
> Verifying : rubygem-passenger-native-3.0.21-11.el6.x86_64
> 7/8
> Verifying : mod_passenger-3.0.21-11.el6.x86_64
> 8/8
>
> Updated:
> mod_passenger.x86_64 0:4.0.5-7.el6
> rubygem-passenger.x86_64 0:4.0.5-7.el6 rubygem-passenger-native.x86_64
> 0:4.0.5-7.el6
> rubygem-passenger-native-libs.x86_64 0:4.0.5-7.el6
>
> Complete!
> [root@foreman ~]# service foreman restart
> Restarting foreman rails app: [ OK ]
>
>
>
> [root@foreman ~]# service httpd restart
> Stopping httpd: [ OK ]
>
>
>
> Starting httpd: [Thu Feb 20 22:43:17 2014] [warn] module passenger_module
> is already loaded, skipping
> [ OK ]
>
>
> We then run into another error, but it's unrelated and we know [generally]
> which direction to go in: "Mysql2::Error: Table 'foreman_primary.features'
> doesn't exist: SHOW FULL FIELDS FROM features
> (ActiveRecord::StatementInvalid)".
>
> However, this does prove your assertion. EPEL is being prioritized ahead
> of the Foreman repo when installing passenger, and since we manage EPEL
> elsewhere in our base puppet config, it all makes sense, sorta. So, we'll
> keep digging.
>
>
try running:

foreman-rake db:migrate
foreman-rake db:seed

Ohad

··· On Fri, Feb 21, 2014 at 1:02 AM, Luke Chavers wrote:

Thanks again,
Luke


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/groups/opt_out.