Mon
April 16, 2012, 3:50pm
#1
Hello,
Populating database is failing
/usr/share/foreman# rake RAILS_ENV=production db:migrate
at /var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
rake aborted!
undefined method `name' for "json":String
DATA
/usr/share/foreman# gem list
*** LOCAL GEMS ***
json (1.6.6)
mime-types (1.18)
rack (1.1.2)
rake (0.9.2.2)
rdoc (3.12)
rest-client (1.6.7)
···
--------------------------------------------------------------------------
/usr/share/foreman# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu precise (development branch)
Release: 12.04
Codename: precise
-----------------------------------------------------------------------------
Can you help me? any other data needed?
Mon
April 19, 2012, 12:41pm
#2
Hello,
(How to install foreman in Precise Ubuntu)
Here the solution to the problem reported: install an old rubygem
version on the system.
BEFORE:
/usr/share/foreman/script# gem env
RubyGems Environment:
RUBYGEMS VERSION: 1.8.15
RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
INSTALLATION DIRECTORY: /var/lib/gems/1.8
RUBY EXECUTABLE: /usr/bin/ruby1.8
EXECUTABLE DIRECTORY: /usr/local/bin
RUBYGEMS PLATFORMS:
GEM PATHS:
/var/lib/gems/1.8
/root/.gem/ruby/1.8
GEM CONFIGURATION:
:update_sources => true
:verbose => true
:benchmark => false
:backtrace => false
:bulk_threshold => 1000
REMOTE SOURCES:
I tried
/usr/share/foreman/script# gem update --system 1.3.7
But of course i got this error:
ERROR: gem update --system is disabled on Debian, because it will
overwrite the content of the rubygems Debian package, and might break
your Debian system in subtle ways. The Debian-supported way to update
rubygems is through apt-get, using Debian official repositories.
If you really know what you are doing, you can still update rubygems
by setting the REALLY_GEM_UPDATE_SYSTEM environment variable, but
please remember that this is completely unsupported by Debian.
So I manually install this version from the tar ball, I follow the
instructions in
Puppet automates away the challenges, complexity, and risk of securing and running global hybrid and cloud-native infrastructure, so you can focus on delivering the next great thing.
two steps:
Execute
(
URL="http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz "
PACKAGE=$(echo $URL | sed "s/.[^.]$//; s/^. ///")
cd $(mktemp -d /tmp/install_rubygems.XXXXXXXXXX) &&
wget -c -t10 -T20 -q $URL &&
tar xfz $PACKAGE.tgz &&
cd $PACKAGE &&
sudo ruby setup.rb
)
update-alternatives --install /usr/bin/gem gem /usr/bin/gem1.8 1
AFTER
/usr/share/foreman/script# gem env
RubyGems Environment:
RUBYGEMS VERSION: 1.3.7
RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
RUBY EXECUTABLE: /usr/bin/ruby1.8
EXECUTABLE DIRECTORY: /usr/bin
RUBYGEMS PLATFORMS:
GEM PATHS:
/usr/lib/ruby/gems/1.8
/root/.gem/ruby/1.8
GEM CONFIGURATION:
:update_sources => true
:verbose => true
:benchmark => false
:backtrace => false
:bulk_threshold => 1000
REMOTE SOURCES:
Regards.
···
On Apr 16, 5:50 pm, Mon wrote:
> Hello,
>
> Populating database is failing
> /usr/share/foreman# rake RAILS_ENV=production db:migrate
>
> at /var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
> rake aborted!
> undefined method `name' for "json":String
>
> DATA
>
> /usr/share/foreman# gem list
>
> *** LOCAL GEMS ***
>
> json (1.6.6)
> mime-types (1.18)
> rack (1.1.2)
> rake (0.9.2.2)
> rdoc (3.12)
> rest-client (1.6.7)
> --------------------------------------------------------------------------
> /usr/share/foreman# lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: Ubuntu precise (development branch)
> Release: 12.04
> Codename: precise
> -----------------------------------------------------------------------------
>
> Can you help me? any other data needed?