That suggests it’s missing the RAILS_ENV=production and is defaulting to
the “development” environment (which’ll be configured with SQLite).
Check you have RAILS_ENV specified either at the start of the rake
command (as an environment variable) or as one of the arguments.
I forgot to mention that ruby193-rake is a shortcut to “scl enable
ruby193 ‘rake…’”.
–
Dominic Cleal
Red Hat Engineering
On 26/07/13 13:54, J. Adam Craig wrote:
Thanks, Dominic!
That seems to work! However, now I see a dependency error indicating
that I need to install a gem, ‘activerecord-sqlite3-adapter’. The
suggested command produces the following error:
[root@foreman foreman]# gem install activerecord-sqlite3-adapter
ERROR: Could not find a valid gem ‘activerecord-sqlite3-adapter’ (>= 0)
in any repository
Best,
– Adam
On Friday, July 26, 2013 8:45:25 AM UTC-4, Dominic Cleal wrote:
This was changed in Foreman 1.2 on EL due to a few packaging
differences. Instead, you'll usually run (EL only):
cd ~foreman && sudo -u foreman scl enable ruby193
'RAILS_ENV=production
rake puppet:import:hosts_and_facts'
It's obviously getting rather lengthy, so we're adding a
“foreman-rake”
in 1.3 to cut down on typing and differences between each of our
supported distros.
--
Dominic Cleal
Red Hat Engineering
On 26/07/13 13:42, J. Adam Craig wrote:
> Hello!
>
> After installing Foreman using the 'foreman-installer' method on
RHEL
> 6.4, I am receiving the following error messages when attempting
to run
> 'rake' commands based on examples given in the manual. This is
Foreman 1.2.
>
> I should note that I previously had Puppet and Foreman installed
to this
> server and configured to work together manually. I've since
removed the
> relevant patches and config files (I think!) and re-installed via
the
> 'foreman-installer'.
>
> [root@foreman ~]# *rake puppet:import:hosts_and_facts
RAILS_ENV=production*
> rake aborted!
> No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,
> Rakefile.rb)
>
> (See full trace by running task with --trace)
>
> After seeing the above, I change to '/usr/share/foreman' and try
again.
> This fails, but for a different reason:
>
> [root@foreman ~]# *cd /usr/share/foreman/*
> [root@foreman foreman]# *rake puppet:import:hosts_and_facts
> RAILS_ENV=production*
> rake aborted!
> no such file to load -- rails/all
>
> (See full trace by running task with --trace)
>
> Here's the full output with '--trace':
>
> [root@foreman foreman]# *rake puppet:import:hosts_and_facts
> RAILS_ENV=production --trace*
> rake aborted!
> no such file to load -- rails/all
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require'
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
> /usr/share/foreman/config/application.rb:3
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require'
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
> /usr/share/foreman/Rakefile:1
>
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `load’
>
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in
> `load_rakefile'
>
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:583:in
> `raw_load_rakefile'
>
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:89:in
> `load_rakefile'
>
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:160:in
> `standard_exception_handling'
>
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:88:in
> `load_rakefile'
>
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:72:in `run’
>
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:160:in
> `standard_exception_handling'
>
/usr/lib/ruby/gems/1.8/gems/rake-10.0.3/lib/rake/application.rb:70:in `run’
> /usr/lib/ruby/gems/1.8/gems/rake-10.0.3/bin/rake:33
> /usr/bin/rake:19:in `load'
> /usr/bin/rake:19
>
> Any assistance is greatly needed and appreciated.
>
> Thanks!
> -- Adam
>
> --
> 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/groups/opt_out
<https://groups.google.com/groups/opt_out>.
>
>
–
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.
–
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.