Project

General

Profile

Redmine 2.X.X install - rake db:migrate doesn't do anything

Added by Jason O'Brien over 11 years ago

I really want to try out Redmine, but I can't get the database to initialize. I run:

localhost> RAILS_ENV=production rake db:migrate --trace
Picked up _JAVA_OPTIONS: -Xint -Xms60m -Xmx1200m
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
** Invoke db:_dump (first_time)
** Execute db:_dump
** Invoke db:schema:dump (first_time)
** Invoke environment
** Invoke db:load_config
** Execute db:schema:dump

The exit code is 0 (success), and the sqlite3 database is created as an empty file. Following the advice on some other threads, I tried:
localhost> RAILS_ENV=production rake db:reset
Picked up _JAVA_OPTIONS: -Xint -Xms60m -Xmx1200m
-- initialize_schema_migrations_table()
   -> 0.0570s
-- assume_migrated_upto_version(0, ["/home/e19351/deps/redmine/redmine-2.2.2/db/migrate"])
   -> 0.0520s
You have 209 pending migrations:
     1 Setup
     2 IssueMove
     3 IssueAddNote
     4 ExportPdf
     5 IssueStartDate
...
Run `rake db:migrate` to update your database then try again.

The output made me think I was getting somewhere, but it just put a single empty table in the sqlite3 database: schema_migrations. Then I tried db:migrate again, but the result was the same as the first time. Running db:drop/db:create didn't do anything interesting.

My database.yml for Sqlite3 (although I tried others with same result):

production:
  adapter: sqlite3
  database: db/production.sqlite3

development:
  adapter: sqlite3
  database: db/development.sqlite3

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
test:
  adapter: sqlite3
  database: db/test.sqlite3

The platform is Linux/AMD64 (Redhat 5.7). I've tried just about every combination of:
  • Redmine 2.2.2, 2.2.1 and 2.1.6
  • JRuby 1.7.2 and native Ruby 1.9.3-p374
  • MySQL 5.5.29 (local), PostgreSQL 9.2 (local and remote), and Sqlite 3.7.15.2 (local)
  • Rake 10.0.3
  • Rails 3.2.11

Nothing made any difference, and the versions look good according to the wiki. I've rebuilt everything and started over multiple times. Anyone have any ideas before I surrender?

Thanks in advance


Replies (3)

RE: Redmine 2.X.X install - rake db:migrate doesn't do anything - Added by Jan Niggemann (redmine.org team member) over 11 years ago

Perhaps my guide can help you?
I don't see anything wrong at first glance...

RE: Redmine 2.X.X install - rake db:migrate doesn't do anything - Added by Toshi MARUYAMA over 11 years ago

Try "jdbcsqlite3" instead of "sqlite3" in database.yml.

RE: Redmine 2.X.X install - rake db:migrate doesn't do anything - Added by Jason O'Brien over 11 years ago

Jan Niggemann wrote:

Perhaps my guide can help you?
I don't see anything wrong at first glance...

Unfortunately the guide up to the point of DB initialization seems identical to what I did when I tried MySQL, short of installing Passenger (but I can't even get far enough to use it).

Toshi MARUYAMA wrote:

Try "jdbcsqlite3" instead of "sqlite3" in database.yml.

I think they're aliases now, but not sure. I tried it and it had no effect (same trace for db:migrate).

Thanks for the help guys, unfortunately no luck.

    (1-3/3)