Hi,
started upgrading to ver 1.5.
after the rpm update trying to run db migrate and getting the next error
rake aborted!
undefined method `in_rake?' for Foreman:Module
please advice
Hi,
started upgrading to ver 1.5.
after the rpm update trying to run db migrate and getting the next error
rake aborted!
undefined method `in_rake?' for Foreman:Module
please advice
> Hi,
> started upgrading to ver 1.5.
>
> after the rpm update trying to run db migrate and getting the next error
>
> rake aborted!
> undefined method `in_rake?' for Foreman:Module
>
can you please send a full trace? and how are you executing rake, is it
using foreman-rake?
Ohad
please advice
–
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/d/optout.
Hi,
yes, i did it with foreman-rake
trace:
rake aborted!
undefined method `in_rake?' for Foreman:Module
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
[root@ptkpl-foreman ~]# foreman-rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method in_rake?' for Foreman:Module /usr/share/foreman/config/initializers/fix_cache.rb:8:in
<top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in
load' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in
block in load'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in
load_dependency' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in
load'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:588:in
block (2 levels) in <class:Engine>' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:587:in
each'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:587:in
block in <class:Engine>' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:30:in
instance_exec'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:30:in
run' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:55:in
block in run_initializers'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:54:in
each' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:54:in
run_initializers'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:136:in
initialize!' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in
method_missing'
/usr/share/foreman/config/environment.rb:5:in <top (required)>' /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in
require'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in
require' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in
block in require'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in
load_dependency' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in
require'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:103:in
require_environment!' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:295:in
block (2 levels) in initialize_tasks'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in call' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in
block in execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in each' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in
execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in block in invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in
mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in
invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:176:in
block in
invoke_prerequisites'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:174:in each' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:174:in
invoke_prerequisites'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:157:in block in invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in
mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in
invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in
invoke'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in invoke_task' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in
block (2
levels) in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in each' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in
block in
top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in
standard_exception_handling' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in
top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in block in run' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in
standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in run' /opt/rh/ruby193/root/usr/bin/rake:32:in
<main>'
Tasks: TOP => db:migrate => environment
Try an "rpm -V foreman" to verify your installation and see if
/usr/share/foreman/lib/foreman.rb is reported as modified or not.
If you need to restore it for some reason, get a copy from here, or yum
reinstall foreman:
https://raw.githubusercontent.com/theforeman/foreman/1.5-stable/lib/foreman.rb
On 12/05/14 11:41, eliran shlomo wrote:
Hi,
yes, i did it with foreman-raketrace:
rake aborted!
undefined method `in_rake?’ for Foreman:ModuleTasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
[root@ptkpl-foreman ~]# foreman-rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined methodin_rake?' for Foreman:Module /usr/share/foreman/config/initializers/fix_cache.rb:8:in
<top (required)>’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in
load' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in
block in load’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in
load_dependency' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in
load’
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:588:in
block (2 levels) in <class:Engine>' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:587:in
each’
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:587:in
block in <class:Engine>' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:30:in
instance_exec’
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:30:in
run' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:55:in
block in run_initializers’
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:54:in
each' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:54:in
run_initializers’
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:136:in
initialize!' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in
method_missing’
/usr/share/foreman/config/environment.rb:5:in<top (required)>' /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in
require’
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in
require' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in
block in require’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in
load_dependency' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in
require’
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:103:in
require_environment!' /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:295:in
block (2 levels) in initialize_tasks’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:incall' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in
block in execute’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:ineach' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in
execute’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:inblock in invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in
mon_synchronize’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in
invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:176:in
block in
invoke_prerequisites’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:174:ineach' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:174:in
invoke_prerequisites’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:157:inblock in invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in
mon_synchronize’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in
invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in
invoke’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:ininvoke_task' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in
block (2
levels) in top_level’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:ineach' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in
block in
top_level’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in
standard_exception_handling' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in
top_level’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:inblock in run' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in
standard_exception_handling’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:inrun' /opt/rh/ruby193/root/usr/bin/rake:32:in
'
Tasks: TOP => db:migrate => environmentOn Sunday, May 11, 2014 4:11:40 PM UTC+3, ohad wrote:
On Sun, May 11, 2014 at 3:15 PM, eliran shlomo <eliran...@gmail.com > <javascript:>> wrote: Hi, started upgrading to ver 1.5. after the rpm update trying to run db migrate and getting the next error rake aborted! undefined method `in_rake?' for Foreman:Module can you please send a full trace? and how are you executing rake, is it using foreman-rake? Ohad please advice -- 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-user...@googlegroups.com <javascript:>. To post to this group, send email to forema...@googlegroups.com <javascript:>. Visit this group at http://groups.google.com/group/foreman-users <http://groups.google.com/group/foreman-users>. For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
–
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
mailto:foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com
mailto:foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.
Hi,
the yum had a problem i missied
error: unpacking of archive failed on file
/usr/share/foreman/config/settings.plugins.d: cpio: rename
after rename the settings.plugins.d directory reinstall solved the problem
Apologies, please ignore my comment about restoring foreman.rb.
We found on IRC that this error can happen if your RPM upgrade had
partially failed. This tends to happen due to a bug (#5482) around the
plugin settings directory.
Please check the yum output to be sure, but then try backing up the
contents of /usr/share/foreman/config/settings.plugins.d, deleting that
whole directory and doing the "yum upgrade foreman* ruby*" again.
Once upgraded, you can restore those config files to the new directory
at /etc/foreman/plugins/.
On 12/05/14 11:48, Dominic Cleal wrote:
Try an “rpm -V foreman” to verify your installation and see if
/usr/share/foreman/lib/foreman.rb is reported as modified or not.If you need to restore it for some reason, get a copy from here, or yum
reinstall foreman:
https://raw.githubusercontent.com/theforeman/foreman/1.5-stable/lib/foreman.rb