ruby 企业版和 Rails<3 应用程序

发布于 2024-10-08 05:19:44 字数 1768 浏览 1 评论 0 原文

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

/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.

但是,我安装了这些 gem:

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)

i'm trying to run Redmine using rubyEE, but I am constantly facing some action_controller problems.
When I'm running unicorn, I get:

/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'

When I remove the vendor directory I get:

# 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.

However, I have those gems 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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寂寞美少年 2024-10-15 05:19:44

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

gem uninstall actionpack activesupport -v 2.3.9

如果您需要两个版本,您可以使用 rvm 用于更多 ruby​​ 版本,每个项目均可轻松配置。

you need to remove rails 2.3.9, they might be get loaded because of no strict dependencies:

gem uninstall actionpack activesupport -v 2.3.9

If you need both versions you can use rvm for more ruby versions easy configurable per project.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文