1

我正在尝试使用 ruby​​EE 运行 Redmine,但我经常面临一些 action_controller 问题。当我运行独角兽时,我得到:

/opt/rubyEE-2010-02/lib/ruby/site_ruby/1.8/rubygems.rb:223:in `activate': undefined method `map' for nil:NilClass (NoMethodError)
        from /opt/rubyEE-2010-02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:35:in `require'
        from /usr/share/redmine/config/environment.rb:34
        from /opt/rubyEE-2010-02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /opt/rubyEE-2010-02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'

当我删除供应商目录时,我得到:

# unicorn_rails -c /etc/redmine.ru -E production
I, [2010-12-19T20:52:36.251056 #21117]  INFO -- : listening on addr=0.0.0.0:4000 fd=3
I, [2010-12-19T20:52:36.253061 #21117]  INFO -- : Refreshing Gem list
Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

但是,我安装了这些宝石:

abstract (1.0.0)
actionmailer (2.3.9, 2.3.5)
actionpack (2.3.9, 2.3.5)
activerecord (2.3.9, 2.3.5)
activeresource (2.3.9, 2.3.5)
activesupport (2.3.9, 2.3.5)
arel (2.0.4)
builder (2.1.2)
bundler (1.0.7)
daemon_controller (0.2.5)
erubis (2.6.6)
fastthread (1.0.7)
file-tail (1.0.5)
i18n (0.4.2)
kgio (2.0.0)
mail (2.2.10)
mime-types (1.16)
mysql (2.8.1)
passenger (3.0.0)
pg (0.9.0)
polyglot (0.3.1)
rack (1.2.1, 1.1.0, 1.0.1)
rack-mount (0.6.13)
rack-test (0.5.6)
rails (2.3.9, 2.3.5)
rake (0.8.7)
rubytree (0.8.1)
spruz (0.2.2)
sqlite3-ruby (1.3.2)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.23)
unicorn (3.1.0)
4

1 回答 1

3

您需要删除 rails 2.3.9,因为没有严格的依赖关系,它们可能会被加载:

gem uninstall actionpack activesupport -v 2.3.9

如果你需要这两个版本,你可以使用rvm来获得更多的 ruby​​ 版本,每个项目都可以轻松配置。

于 2010-12-19T20:02:18.553 回答