Problem installing Foreman latest development code

Hi,

I'm curious for the new development code so I wanted to checkout and
give it a spin. Unfortunately I'm unable to do so.

I used the instructions from:
http://theforeman.org/projects/foreman/wiki/Installing_latest_code

Up to the point before I run 'RAILS_ENV=production bundle exec rake
db:migrate' I have no issues, but when I run it I hit the error as
shown below. It cannot find 'facter' altough the gem facter is
installed on my system.

mawi@mawi-laptop:~/foreman$ RAILS_ENV=production bundle exec rake db:migrate
/home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:10:
warning: already initialized constant ENC_NONE
/home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:11:
warning: already initialized constant ENC_EUC
/home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:12:
warning: already initialized constant ENC_SJIS
/home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:13:
warning: already initialized constant ENC_UTF8
rake aborted!
no such file to load – facter

Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
mawi@mawi-laptop:~/foreman$

specs workstation:

Description: Ubuntu 12.04 LTS

ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]

On my production system it cannot find 'puppet' although installed.

<HOST> foreman # RAILS_ENV=production bundle exec rake db:migrate
/usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:10:
warning: already initialized constant ENC_NONE
/usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:11:
warning: already initialized constant ENC_EUC
/usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:12:
warning: already initialized constant ENC_SJIS
/usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:13:
warning: already initialized constant ENC_UTF8
rake aborted!
no such file to load – puppet

Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
<HOST> foreman #

specs production dashboard server:

Description: Ubuntu 10.04.4 LTS
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]

gem list facter
*** LOCAL GEMS ***

facter (1.6.6, 1.6.4, 1.6.3, 1.6.0)

gem list puppet
*** LOCAL GEMS ***

puppet (2.7.12, 2.7.9, 2.7.6, 2.7.5)

Any help will be really appreciated!

··· --- Kind Regards,

Martin Willemsma

> Hi,
>
> I'm curious for the new development code so I wanted to checkout and
> give it a spin. Unfortunately I'm unable to do so.
>
> I used the instructions from:
> Installing latest code - Foreman
>
> Up to the point before I run 'RAILS_ENV=production bundle exec rake
> db:migrate' I have no issues, but when I run it I hit the error as
> shown below. It cannot find 'facter' altough the gem facter is
> installed on my system.
>
> mawi@mawi-laptop:~/foreman$ RAILS_ENV=production bundle exec rake
> db:migrate
>
> /home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:10:
> warning: already initialized constant ENC_NONE
>
> /home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:11:
> warning: already initialized constant ENC_EUC
>
> /home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:12:
> warning: already initialized constant ENC_SJIS
>
> /home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:13:
> warning: already initialized constant ENC_UTF8
> rake aborted!
> no such file to load – facter
>
> Tasks: TOP => db:migrate => environment
> (See full trace by running task with --trace)
> mawi@mawi-laptop:~/foreman$
>
> specs workstation:
>
> Description: Ubuntu 12.04 LTS
>
> ruby -v
> ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]
>
>
> On my production system it cannot find 'puppet' although installed.
>
>
> <HOST> foreman # RAILS_ENV=production bundle exec rake db:migrate
>
> /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:10:
> warning: already initialized constant ENC_NONE
>
> /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:11:
> warning: already initialized constant ENC_EUC
>
> /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:12:
> warning: already initialized constant ENC_SJIS
>
> /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:13:
> warning: already initialized constant ENC_UTF8
> rake aborted!
> no such file to load – puppet
>

I'm guessing you dont have puppet / facter installed on this machine (or
you are using rvm etc)

to work around the solution simply create a new file under bundler.d
for example

echo gem 'puppet' > bundler.d/local-gems.rb

Ohad

··· On Mon, Jul 2, 2012 at 5:32 PM, Martin Willemsma wrote:

Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
foreman #

specs production dashboard server:

Description: Ubuntu 10.04.4 LTS
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]

gem list facter
*** LOCAL GEMS ***

facter (1.6.6, 1.6.4, 1.6.3, 1.6.0)

gem list puppet
*** LOCAL GEMS ***

puppet (2.7.12, 2.7.9, 2.7.6, 2.7.5)

Any help will be really appreciated!


Kind Regards,

Martin Willemsma


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Thanks for this quick response.

I tried your line on both my workstation and production system but no
change. I use ruby 1.8.7 from Ubuntu. Both puppet and facter are
installed from gems. No RVM involved.

<HOST> foreman # RAILS_ENV=production bundle exec rake db:migrate
/usr/share/foreman/Gemfile:20:in evaluate&#39;: undefined local variable or methodpuppet' for #<Bundler::Dsl:0x7f3fd085c250> (NameError)
from /usr/share/foreman/Gemfile:18:in each&#39; from /usr/share/foreman/Gemfile:18:inevaluate'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/definition.rb:17:in
build&#39; from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler.rb:138:indefinition'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler.rb:126:in load&#39; from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler.rb:110:insetup'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/cli.rb:340:in
exec&#39; from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/vendor/thor/task.rb:22:insend'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/vendor/thor/task.rb:22:in
run&#39; from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/vendor/thor/invocation.rb:118:ininvoke_task'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/vendor/thor.rb:263:in
dispatch&#39; from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/vendor/thor/base.rb:386:instart'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/bin/bundle:13
from /usr/bin/bundle:19:in `load'
from /usr/bin/bundle:19

<HOST> foreman # cat bundler.d/local-gems.rb
gem puppet

<HOST> foreman # puppet --version
2.7.12

Any other hints ?

··· 2012/7/2 Ohad Levy : > > > On Mon, Jul 2, 2012 at 5:32 PM, Martin Willemsma > wrote: >> >> Hi, >> >> I'm curious for the new development code so I wanted to checkout and >> give it a spin. Unfortunately I'm unable to do so. >> >> I used the instructions from: >> http://theforeman.org/projects/foreman/wiki/Installing_latest_code >> >> Up to the point before I run 'RAILS_ENV=production bundle exec rake >> db:migrate' I have no issues, but when I run it I hit the error as >> shown below. It cannot find 'facter' altough the gem facter is >> installed on my system. >> >> mawi@mawi-laptop:~/foreman$ RAILS_ENV=production bundle exec rake >> db:migrate >> >> /home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:10: >> warning: already initialized constant ENC_NONE >> >> /home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:11: >> warning: already initialized constant ENC_EUC >> >> /home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:12: >> warning: already initialized constant ENC_SJIS >> >> /home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:13: >> warning: already initialized constant ENC_UTF8 >> rake aborted! >> no such file to load -- facter >> >> Tasks: TOP => db:migrate => environment >> (See full trace by running task with --trace) >> mawi@mawi-laptop:~/foreman$ >> >> specs workstation: >> >> Description: Ubuntu 12.04 LTS >> >> ruby -v >> ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux] >> >> >> On my production system it cannot find 'puppet' although installed. >> >> >> foreman # RAILS_ENV=production bundle exec rake db:migrate >> >> /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:10: >> warning: already initialized constant ENC_NONE >> >> /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:11: >> warning: already initialized constant ENC_EUC >> >> /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:12: >> warning: already initialized constant ENC_SJIS >> >> /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:13: >> warning: already initialized constant ENC_UTF8 >> rake aborted! >> no such file to load -- puppet > > > I'm guessing you dont have puppet / facter installed on this machine (or you > are using rvm etc) > > to work around the solution simply create a new file under bundler.d > for example > > echo gem 'puppet' > bundler.d/local-gems.rb > > > Ohad >> >> >> Tasks: TOP => db:migrate => environment >> (See full trace by running task with --trace) >> foreman # >> >> >> specs production dashboard server: >> >> Description: Ubuntu 10.04.4 LTS >> ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux] >> >> gem list facter >> *** LOCAL GEMS *** >> >> facter (1.6.6, 1.6.4, 1.6.3, 1.6.0) >> >> gem list puppet >> *** LOCAL GEMS *** >> >> puppet (2.7.12, 2.7.9, 2.7.6, 2.7.5) >> >> Any help will be really appreciated! >> >> >> --- >> Kind Regards, >> >> Martin Willemsma >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To post to this group, send email to foreman-users@googlegroups.com. >> To unsubscribe from this group, send email to >> foreman-users+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/foreman-users?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To post to this group, send email to foreman-users@googlegroups.com. > To unsubscribe from this group, send email to > foreman-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/foreman-users?hl=en.

Kind regards,

Martin Willemsma

Thanks for the hint

I was able to resolve it. I missed the quotes around "puppet"

After the edit of local-gems.rb I ran bundle update succesfully

1.0 is Looking good!

> Hi,
>
> I'm curious for the new development code so I wanted to checkout and
> give it a spin. Unfortunately I'm unable to do so.
>
> I used the instructions from:
> Installing latest code - Foreman
>
> Up to the point before I run 'RAILS_ENV=production bundle exec rake
> db:migrate' I have no issues, but when I run it I hit the error as
> shown below. It cannot find 'facter' altough the gem facter is
> installed on my system.
>
> mawi@mawi-laptop:~/foreman$ RAILS_ENV=production bundle exec rake
> db:migrate
>
> /home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:10:
> warning: already initialized constant ENC_NONE
>
> /home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:11:
> warning: already initialized constant ENC_EUC
>
> /home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:12:
> warning: already initialized constant ENC_SJIS
>
> /home/mawi/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:13:
> warning: already initialized constant ENC_UTF8
> rake aborted!
> no such file to load – facter
>
> Tasks: TOP => db:migrate => environment
> (See full trace by running task with --trace)
> mawi@mawi-laptop:~/foreman$
>
> specs workstation:
>
> Description: Ubuntu 12.04 LTS
>
> ruby -v
> ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]
>
>
> On my production system it cannot find 'puppet' although installed.
>
>
> <HOST> foreman # RAILS_ENV=production bundle exec rake db:migrate
>
> /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:10:
> warning: already initialized constant ENC_NONE
>
> /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:11:
> warning: already initialized constant ENC_EUC
>
> /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:12:
> warning: already initialized constant ENC_SJIS
>
> /usr/share/foreman/vendor/ruby/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:13:
> warning: already initialized constant ENC_UTF8
> rake aborted!
> no such file to load – puppet
>

I'm guessing you dont have puppet / facter installed on this machine (or
you are using rvm etc)

to work around the solution simply create a new file under bundler.d
for example

echo gem 'puppet' > bundler.d/local-gems.rb

Ohad

··· Op 2 jul. 2012 om 16:34 heeft Ohad Levy het volgende geschreven: On Mon, Jul 2, 2012 at 5:32 PM, Martin Willemsma wrote:

Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
foreman #

specs production dashboard server:

Description: Ubuntu 10.04.4 LTS
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]

gem list facter
*** LOCAL GEMS ***

facter (1.6.6, 1.6.4, 1.6.3, 1.6.0)

gem list puppet
*** LOCAL GEMS ***

puppet (2.7.12, 2.7.9, 2.7.6, 2.7.5)

Any help will be really appreciated!


Kind Regards,

Martin Willemsma


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.