Project

General

Profile

Actions

Support #14435

closed

Problem in memcache plugin

Added by Juan Carlos Perez about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hi again!
A new problem appears on the installation.
Environment:
Ubuntu 12 precise
Over virtual box
On windows 7 host

After the deployment script based on this :
https://gist.github.com/yoplait/252a8fa00f75a72f8688f7dce0f98ff3

I ran the install command without problems, it takes some time

sudo foreman-installer \
--no-enable-puppet \
--no-enable-foreman-plugin-bootdisk \
--no-enable-foreman-proxy \
--foreman-db-adapter=mysql2 \
--foreman-db-database=foreman \
--foreman-db-host=db.domain \
--foreman-db-manage=false \
--foreman-db-username=foreman \
--foreman-db-password='foreman_password' \
--foreman-db-port=3306 \
--foreman-db-type=mysql \
--foreman-server-ssl-ca=/etc/ssl/domain/certs/ca.pem \
--foreman-server-ssl-chain=/etc/ssl/domain/certs/ca.pem \
--foreman-server-ssl-cert=/etc/ssl/domain/certs/domain.pem \
--foreman-server-ssl-key=/etc/ssl/domain/private_keys/domain.pem \
--foreman-server-ssl-crl=/etc/ssl/domain/certs/intermediate.crl.pem

and after I get this:
Installing Done
Success! * Foreman is running at https://foreman.domain
Initial credentials are admin / nXnEc4XYQs4mmnKK
The full log is at /var/log/foreman-installer/foreman-installer.log

But when I go to set the memcached plugin using these lines:

echo "gem 'foreman_memcache'" | sudo tee -a /usr/share/foreman/bundler.d/Gemfile.local.rb
sudo chown foreman:foreman /usr/share/foreman/bundler.d/Gemfile.local.rb
cd ~foreman
sudo -u foreman bundle update foreman_memcached
touch ~foreman/tmp/restart.txt

I got this error
root@foreman:/usr/share/foreman# sudo -u foreman bundle update foreman_memcached
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Installing rake (10.5.0)
Installing i18n (0.6.11)
Installing multi_json (1.11.2)
Installing activesupport (3.2.21)
Installing builder (3.0.4)
Installing activemodel (3.2.21)
Installing erubis (2.7.0)
Installing journey (1.0.4)
Installing rack (1.4.7)
Installing rack-cache (1.2)
Installing rack-test (0.6.3)
Installing hike (1.2.3)
Installing tilt (1.4.1)
Installing sprockets (2.2.3)
Installing actionpack (3.2.21)
Installing mime-types (1.25.1)
Installing polyglot (0.3.5)
Installing treetop (1.4.15)
Installing mail (2.5.4)
Installing actionmailer (3.2.21)
Installing arel (3.0.3)
Installing tzinfo (0.3.48)
Installing activerecord (3.2.21)
Installing activeresource (3.2.21)
Installing ancestry (2.1.0)
Installing json (1.8.3) with native extensions
Installing apipie-rails (0.2.6)
Installing audited (3.0.0)
Installing audited-activerecord (3.0.0)
Using bundler (1.2.2)
Installing coffee-script-source (1.10.0)
Installing execjs (2.4.0)
Installing coffee-script (2.4.1)
Installing rack-ssl (1.3.4)
Installing rdoc (3.12.2)
Installing thor (0.19.1)
Installing railties (3.2.21)
Installing coffee-rails (3.2.2)
Installing dalli (2.7.6)
Installing deep_cloneable (2.2.0)
Installing fast_gettext (0.9.2)
Installing foreigner (1.7.4)
Gem::InstallError: foreigner requires Ruby version >= 1.9.2.
An error occurred while installing foreigner (1.7.4), and Bundler cannot continue.
Make sure that `gem install foreigner -v '1.7.4'` succeeds before bundling.

So I try to install that one but….

root@foreman:/usr/share/foreman# gem install foreigner -v '1.7.4'
Fetching: i18n-0.7.0.gem (100%)
ERROR: Error installing foreigner:
i18n requires Ruby version >= 1.9.3.
root@foreman:/usr/share/foreman#

root@foreman:/usr/share/foreman# ruby --version
rvmruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

Thanks!
JC

Actions #1

Updated by Juan Carlos Perez about 8 years ago

Looks for me that is a problem with the ruby version, but I tried to update and after I got other problem, so as I don’t see if it is necessary and the ruby base on Ubuntu 12 is this one 1.8.7
I was trying to use the process to move to 1.9.3 from here
https://www.brightbox.com/docs/ruby/ubuntu/
Buth then the problem was that I couldn’t login with that user and I couldn’t change the password with

foreman-rake permissions:reset
Getting an error with
Apipie cache enabled but not present yet. Run apipie:cache rake task to speed up API calls.

Thanks!
JC

Actions #2

Updated by Dominic Cleal about 8 years ago

  • Status changed from New to Feedback

The bundle command you ran should have been foreman-ruby /usr/bin/bundle, because the default Ruby on Precise is 1.8.7, but Foreman is configured to run with the Brightbox Ruby (ruby1.9). The foreman-ruby symlink should point to the one in use.

The bundle command also should have been "foreman_memcache" instead of "foreman_memcached".

Lastly, the best way to do this is to use the plugin package supplied in our repositories. Install ruby-foreman-memcache, or if using Foreman 1.11 (the stable version as of today) you can add --enable-foreman-plugin-memcache to your installer command to do it automatically.

I'm not sure what's happened to your installation now you've performed the custom steps in your last comment, I can't help with that.

Actions #3

Updated by Juan Carlos Perez about 8 years ago

Well now is working!

I did this:
sudo ln -sf /usr/bin/ruby1.9.3 ruby

And I did this:
cd ~foreman
echo "gem 'foreman_memcache'" | sudo tee -a /usr/share/foreman/bundler.d/Gemfile.local.rb
sudo chown foreman:foreman /usr/share/foreman/bundler.d/Gemfile.local.rb
sudo -u foreman foreman-ruby /usr/bin/bundle

And after now this command works:
foreman-rake permissions:reset

So If I didn’t understand wrong, you said with the 1.11 is possible to do this:
foreman-installer --enable-foreman-plugin-memcache ??

Thanks!

Actions #4

Updated by Dominic Cleal about 8 years ago

  • Tracker changed from Bug to Support
  • Status changed from Feedback to Resolved

I don't recommend changing the default Ruby version from the OS default of 1.8.7.

So If I didn’t understand wrong, you said with the 1.11 is possible to do this: foreman-installer --enable-foreman-plugin-memcache ??

Yes.

Glad it's resolved anyway, closing. If you've got support queries in future, please use the users mailing list or IRC channel first, see http://theforeman.org/support.html

Actions #5

Updated by Juan Carlos Perez about 8 years ago

Thanks a lot for your comments and help, I changed again the current version to 1.8
And I keep digging with this! I hope not find more problems!
Thanks!

JC

Actions

Also available in: Atom PDF