Skip to content

New install, getting error creating DB: #230

@jasmeralia

Description

@jasmeralia
root@sage:/var/www/rubycas-server# bundle exec rubycas-server -c config.yml

=> Using custom config file "config.yml"

>>> Redirecting RubyCAS-Server log to /var/log/casserver.log


>>> Running migrations to make sure your database schema is up to date...

   (2.3ms)  CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
   (0.6ms)  SHOW KEYS FROM `schema_migrations`
   (10.9ms)  CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
/var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `to_sql': undefined method `accept' for nil:NilClass (NoMethodError)
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/abstract/database_statements.rb:38:in `select_values'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:587:in `get_all_versions'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:745:in `migrated'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:668:in `current_version'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:685:in `block in migrate'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:685:in `each'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:685:in `detect'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:685:in `migrate'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:570:in `up'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:551:in `migrate'
        from /var/www/rubycas-server/lib/casserver/server.rb:262:in `init_database!'
        from /var/www/rubycas-server/lib/casserver/server.rb:273:in `block in <class:Server>'
        from /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1402:in `configure'
        from /var/www/rubycas-server/lib/casserver/server.rb:270:in `<class:Server>'
        from /var/www/rubycas-server/lib/casserver/server.rb:6:in `<module:CASServer>'
        from /var/www/rubycas-server/lib/casserver/server.rb:5:in `<top (required)>'
        from /var/www/rubycas-server/lib/casserver.rb:18:in `require'
        from /var/www/rubycas-server/lib/casserver.rb:18:in `<top (required)>'
        from /var/www/rubycas-server/bin/rubycas-server:28:in `require'
        from /var/www/rubycas-server/bin/rubycas-server:28:in `<top (required)>'
        from /var/lib/gems/1.9.1/bin/rubycas-server:23:in `load'
        from /var/lib/gems/1.9.1/bin/rubycas-server:23:in `<main>'
root@sage:/var/www/rubycas-server#

Trying this again generated the same error:

root@sage:/var/www/rubycas-server# more /var/log/casserver.log 
# Logfile created on 2014-10-31 06:41:38 +0000 by logger.rb/31641
root@sage:/var/www/rubycas-server# bundle exec rubycas-server -c config.yml

=> Using custom config file "config.yml"

>>> Redirecting RubyCAS-Server log to /var/log/casserver.log


>>> Running migrations to make sure your database schema is up to date...

/var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `to_sql': undefined method `accept' for nil:NilClass (NoMethodError)
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/connection_adapters/abstract/database_statements.rb:38:in `select_values'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:587:in `get_all_versions'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:745:in `migrated'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:668:in `current_version'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:685:in `block in migrate'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:685:in `each'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:685:in `detect'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:685:in `migrate'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:570:in `up'
        from /var/lib/gems/1.9.1/gems/activerecord-3.2.20/lib/active_record/migration.rb:551:in `migrate'
        from /var/www/rubycas-server/lib/casserver/server.rb:262:in `init_database!'
        from /var/www/rubycas-server/lib/casserver/server.rb:273:in `block in <class:Server>'
        from /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1402:in `configure'
        from /var/www/rubycas-server/lib/casserver/server.rb:270:in `<class:Server>'
        from /var/www/rubycas-server/lib/casserver/server.rb:6:in `<module:CASServer>'
        from /var/www/rubycas-server/lib/casserver/server.rb:5:in `<top (required)>'
        from /var/www/rubycas-server/lib/casserver.rb:18:in `require'
        from /var/www/rubycas-server/lib/casserver.rb:18:in `<top (required)>'
        from /var/www/rubycas-server/bin/rubycas-server:28:in `require'
        from /var/www/rubycas-server/bin/rubycas-server:28:in `<top (required)>'
        from /var/lib/gems/1.9.1/bin/rubycas-server:23:in `load'
        from /var/lib/gems/1.9.1/bin/rubycas-server:23:in `<main>'
root@sage:/var/www/rubycas-server#

Checking the DB, I only see this:

-- phpMyAdmin SQL Dump
-- version 3.3.4
-- http://www.phpmyadmin.net
--
-- Generation Time: Oct 31, 2014 at 06:56 AM
-- Server version: 5.5.40
-- PHP Version: 5.5.9-1ubuntu4.5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `rubycas`
--

-- --------------------------------------------------------

--
-- Table structure for table `schema_migrations`
--

CREATE TABLE IF NOT EXISTS `schema_migrations` (
  `version` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  UNIQUE KEY `unique_schema_migrations` (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `schema_migrations`
--

Suggestions very welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions