0

我正在尝试在 Ubuntu 系统上安装 redmine,我相信它应该可以正常运行。但它似乎卡在这里:

Your config/database.yml may not be written correctly. Please check it and fix any errors.
Your database schema may be out of date or nonexistant. Please run rake db:migrate to ensure that the database schema is up-to-date.
The database server may not be running. Please check whether it's running, and start it if it isn't.

我的 database.yml 设置正确,mysql 正在运行并且凭证正确。

production:
adapter: mysql
database: myredminedb
host: localhost
username: redmine
password: password
encoding: utf8w

它目前在http://track.hutber.com/上使用单独的虚拟主机:

<VirtualHost *:80>
        DocumentRoot /var/www/hutber.com/track.hutber.com
        ServerName track.hutber.com

    <Directory /var/www/hutber.com/track.hutber.com>
       Options FollowSymLinks
       RailsBaseURI /usr/share/redmine
       PassengerResolveSymlinksinDocumentRoot on               
       AllowOverride None
     </Directory>
</VirtualHost>

我完全被难住了。我自己是一个php人...

运行 rake db:migrate

RAILS_ENV=production rake db:migrate
(in /usr/share/redmine)
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /usr/share/redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:21.
NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#initialize called from /usr/share/redmine/config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /usr/lib/ruby/vendor_ruby/1.8/rubygems/source_index.rb:91.
Please install RDoc 2.4.2+ to generate documentation.
Character set 'utf8w' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file
rake aborted!
Can't initialize character set utf8w (path: /usr/share/mysql/charsets/)

Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
4

1 回答 1

1

您需要rake db:migrate从应用程序根目录中运行。那将是其中包含文件的目录Rakefile。从你的问题的细节不确定,但我猜你需要这样做:

cd /var/www/hutber.com/track.hutber.com
RAILS_ENV=production rake db:migrate

更新

并将您的字符集更改database.ymlutf8. 目前设置为utf8w

于 2013-09-14T18:09:45.530 回答