Foreman 1.7 Build an SUSE SLE 12 - NameError: uninitialized constant Safemode

Hello,

I want to compile Foreman 1.7 from get for SUSE SLE 12 with a MySQL
database. (My enviroment is below)

The commands are:

  • bundle install --retry 4 --without sqlite postgresql development test
    –path vendor

  • RAILS_ENV=production bundle exec rake db:migrate

The Ouput is

RAILS_ENV=production rake db:migrate
/home/foreman/foreman/vendor/ruby/2.1.0/gems/ruby_parser-3.0.3/lib/ruby_lexer.rb:5:
warning: already initialized constant RubyLexer::RUBY19
/home/foreman/foreman/vendor/ruby/2.1.0/gems/ruby_parser-3.0.3/lib/ruby_lexer.rb:5:
warning: previous definition of RUBY19 was here
WARNING: Nokogiri was built against LibXML version 2.9.2, but has
dynamically loaded 2.9.1
Apipie cache enabled but not present yet. Run apipie:cache rake task to
speed up API calls.
== ChangeHostBuildDefaultToFalse: migrating

··· ================================== -- change_column(:hosts, :build, :boolean, {:default=>false}) -> 0.0065s rake aborted! StandardError: An error has occurred, all later migrations canceled: uninitialized constant Safemode/home/foreman/foreman/app/models/host/managed.rb:58:in `' /home/foreman/foreman/app/models/host/managed.rb:1:in `' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/inflector/methods.rb:230:in `block in constantize' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/inflector/methods.rb:229:in `each' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/inflector/methods.rb:229:in `constantize' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/core_ext/string/inflections.rb:54:in `constantize' /home/foreman/foreman/app/models/host.rb:16:in `method_missing' /home/foreman/foreman/db/migrate/20090916053824_change_host_build_default_to_false.rb:5:in `up' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:370:in `up' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:410:in `block (2 levels) in migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:410:in `block in migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in `with_connection' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:389:in `migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:528:in `migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:720:in `block (2 levels) in migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:777:in `call' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:777:in `ddl_transaction' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:719:in `block in migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:700:in `each' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:700:in `migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:570:in `up' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:551:in `migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/railties/databases.rake:193:in `block (2 levels) in ' NameError: uninitialized constant Safemode /home/foreman/foreman/app/models/host/managed.rb:58:in `' /home/foreman/foreman/app/models/host/managed.rb:1:in `' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/inflector/methods.rb:230:in `block in constantize' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/inflector/methods.rb:229:in `each' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/inflector/methods.rb:229:in `constantize' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/core_ext/string/inflections.rb:54:in `constantize' /home/foreman/foreman/app/models/host.rb:16:in `method_missing' /home/foreman/foreman/db/migrate/20090916053824_change_host_build_default_to_false.rb:5:in `up' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:370:in `up' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:410:in `block (2 levels) in migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:410:in `block in migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in `with_connection' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:389:in `migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:528:in `migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:720:in `block (2 levels) in migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:777:in `call' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:777:in `ddl_transaction' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:719:in `block in migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:700:in `each' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:700:in `migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:570:in `up' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/migration.rb:551:in `migrate' /home/foreman/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/railties/databases.rake:193:in `block (2 levels) in ' Tasks: TOP => db:migrate (See full trace by running task with --trace)

Could anybody help me to solve the issue NameError: uninitialized constant
Safemode?

Best Ludwig

My Environment (I hope, this is all)

gem list
*** LOCAL GEMS ***
activemodel (4.2.0)
activerecord (4.2.0)
activerecord-mysql-adapter (0.0.1)
activesupport (4.2.0)
arel (6.0.0)
bigdecimal (1.2.4)
builder (3.2.2)
bundler (1.8.3, 1.8.2, 1.7.3)
fast_gettext (0.8.1)
gem2rpm (0.10.1)
i18n (0.7.0)
io-console (0.4.2)
json (1.8.2, 1.8.1)
mini_portile (0.6.2)
minitest (5.5.1, 4.7.5)
mysql (2.9.1)
nokogiri (1.6.6.2)
psych (2.0.5)
rake (10.4.2, 10.1.0)
rdoc (4.1.0)
ruby-dbus (0.9.3)
ruby2ruby (2.1.3)
ruby_parser (3.6.4)
rubygems-update (2.4.6)
safemode (1.2.2)
sexp_processor (4.4.5)
suse-connect (0.2.14)
test-unit (2.1.2.0)
thread_safe (0.3.4)
tzinfo (1.2.2)

rpm -qa|grep -i ruby
ruby2.1-rubygem-ruby-dbus-0.9.3-3.6.x86_64
libruby2_1-2_1-2.1.2-6.1.x86_64
ruby2.1-devel-2.1.2-6.1.x86_64
ruby2.1-stdlib-2.1.2-6.1.x86_64
ruby-common-2.1-12.1.noarch
yast2-ruby-bindings-3.1.24-1.8.x86_64
ruby2.1-rubygem-fast_gettext-0.8.1-2.9.x86_64
ruby2.1-rubygem-bundler-1.7.3-1.2.x86_64
ruby2.1-rubygem-gem2rpm-0.10.1-2.1.x86_64
ruby-2.1-1.6.x86_64
ruby2.1-rubygem-suse-connect-0.2.14-1.1.x86_64
libstorage-ruby-2.25.16-1.1.x86_64
ruby2.1-2.1.2-6.1.x86_64