我正在尝试在 Ubuntu 上安装 Redmine,但打开 Redmine 页面时出现错误:
请安装 mysql2 适配器:(
gem install activerecord-mysql2-adapter
无法加载此类文件 - mysql2)(LoadError)
如果我执行以下命令,我就会成功(这是单独的挑战):
# gem install activerecord-mysql2-adapter
Successfully installed activerecord-mysql2-adapter-0.0.3
1 gem installed
Installing ri documentation for activerecord-mysql2-adapter-0.0.3...
Installing RDoc documentation for activerecord-mysql2-adapter-0.0.3...
怎么修?
更新
一些信息:
$ ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
$ gem -v
1.8.23
$ dpkg -s redmine
Package: redmine
Status: install ok installed
Priority: extra
Section: web
Installed-Size: 13445
Maintainer: Ubuntu Developers <[email protected]>
Architecture: all
Version: 2.4.2-1
Depends: ruby | ruby-interpreter, ruby-railties-3.2 (>= 3.2.13-2~), ruby-rails-observers, dbconfig-common, redmine-sqlite | redmine-mysql | redmine-pgsql, ruby-rack (>= 1.4.5~) | r uby-rack1.4, ruby-coderay (>= 1.0.6), ruby-net-ldap (>= 0.3.1), ruby-openid, ruby-rack-ope nid, libjs-scriptaculous, debconf (>= 0.5) | debconf-2.0
Pre-Depends: debconf
Recommends: ruby-passenger, libfcgi-ruby1.9.1 | libfcgi-ruby
Suggests: ruby-rmagick, bzr, cvs, darcs, git, mercurial, subversion
Breaks: redmine-plugin-botsfilter (<= 1.02-2), redmine-plugin-recaptcha (<= 0.1.0+git20121 018)
Conflicts: ruby-passenger (<< 3)
看起来有一些冲突!
$ gem list
*** LOCAL GEMS ***
actionmailer (4.2.0, 3.2.19)
actionpack (4.2.0, 3.2.19)
actionview (4.2.0)
activejob (4.2.0)
activemodel (4.2.0, 3.2.19)
activerecord (4.2.0, 3.2.19)
activerecord-mysql2-adapter (0.0.3)
activeresource (4.0.0, 3.2.19)
activesupport (4.2.0, 3.2.19)
arel (6.0.0, 3.0.3)
builder (3.2.2, 3.0.4)
bundler (1.7.9)
coderay (1.1.0)
erubis (2.7.0)
globalid (0.3.0)
hike (2.1.3, 1.2.3)
i18n (0.7.0)
journey (1.0.4)
json (1.8.1)
loofah (2.0.1)
mail (2.6.3, 2.5.4)
mime-types (2.4.3, 1.25.1)
mini_portile (0.6.1)
minitest (5.5.0)
multi_json (1.10.1)
mysql2 (0.3.17)
nokogiri (1.6.5)
polyglot (0.3.5)
rack (1.6.0, 1.4.5)
rack-cache (1.2)
rack-ssl (1.4.1, 1.3.4)
rack-test (0.6.2)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (1.0.5)
rails-html-sanitizer (1.0.1)
rails-observers (0.1.2)
rake (10.4.2)
sprockets (2.12.3, 2.2.3)
thread_safe (0.3.4)
tilt (2.0.1, 1.4.1)
treetop (1.5.3, 1.4.15)
tzinfo (1.2.2, 0.3.42)
(以我的用户名运行,不是root
,不是www-data
)