Project

General

Profile

Troubleshooting » History » Version 13

« Previous - Version 13/98 (diff) - Next » - Current version
Corey Osman, 11/07/2011 08:33 PM


rake aborted!

I get the following error while running rake db:migrate

rake aborted!
undefined method `reenable' for <Rake::Task db:schema:dump => [environment]>:Rake::Task

this means you have an old version of rake (older than 0.87), you can verify it by typing:

rake --version

Usually this error is "safe" to ignore, however, it is recommended to upgrade to rake >= 0.87

I want to switch from SQLite to Mysql and maintain my data

I found this article that may help you out

http://blog.heroku.com/archives/2007/11/23/yamldb_for_databaseindependent_data_dumps/

I use puppet enterprise, what now?

As of PE version 1.0, foreman won't install easily without a few modifications. Since PE ships with its own version of Ruby you will need to install a few gems.
Basically you need to tell foreman to use the PE provided ruby library instead. Your not required to run the puppet version of ruby either as many distros now ship with ruby 1.8.7.

  1. You first need to install the pe-ruby-devel package that ships with PE. You can find this in your packages folder wherever you extracted PE.
    a. rpm -ivh pe-ruby-devel-1.8.7.302-1.el5.i386.rpm
  2. Update your path variable to use the ruby version PE ships with (export PATH=/opt/puppet/bin:$PATH)
  3. Check to make sure your PATH was updated ("which gem" should return /opt/puppet/bin/gem)
  4. gem install json
  5. gem install rest-client
    (install the gem database driver you use)
  6. gem install sqlite3 or gem install mysql ( you may have additional dependencies that would need to be resolved first)

Some of the gem dependencies can be resolved by installing the development library for that package (example: mysql-devel)

I found it difficult to install the sqlite3 gem because of dependency hell so I just setup mysql instead which was far easier to setup. Additionally mysql is much more scalable than sqlite.

You can get a list of the currently installed gems by using: gem list.

If your running the foreman init script or /etc/sysconfig/foreman configuration file. You may need to update apache/passenger configurations that point to the PE ruby version.

error: Entry 'some file' not uptodate. Cannot merge.

If you downloaded Foreman from source (git), it could be that some of the files you have modified (or were modified automatically) conflicts with another file Foreman wants to upgrade.

If you don't think that you edited this file (e.g. db/schema.rb) it is usually safe to do:

git checkout 'some file'

This will revert the file to its previous condition (as in the repo at the time of checkout) and now you should be able to get the latest version by:

git pull

Strange errors with passenger

Passenger executes foreman, based on the owner of the config/environmnets.rb file, make sure that this use can actually access:
  • puppet configuration files
  • sqlite database (if using sqlite)
  • write to log, tmp directories

see source:extras/puppet/foreman for complete puppet based setup for Foreman.

error: Could not send facts to Foreman: wrong Content-Length format (RuntimeError)

You might see this error if you run the HTTP push facts script or the sample external nodes script.
This is most likely due to older version of the mongrel gem. Please try and update your gems.

gem update mongrel

Is my Foreman instance running?

There is simple status service that returns JSON with "result" message "ok" when the instance is up and running. It also "pings" database and returns lag. Example:

$ curl -k -H "Accept: application/json" http://instance:3000/status
{"status":200,"result":"ok","db_duration_ms":"5"}

How do I enable debugging?

Edit config/environments/production.rb and uncomment "config.log_level = :debug"

Unattended Provisioning Troubleshooting