Rails 2 - 运行项目的问题

时间:2013-05-22 16:26:20

标签: ruby-on-rails ruby jruby ruby-on-rails-2

我使用JRuby和Rails 3.2,但现在我发现我必须在Rails 2上开展一个项目。

我知道一些关于Rails 2的基本内容,比如命令jruby ./script/server来启动服务器而不是rails s但是当我们开始讨论Rails中的gems时,事情变得复杂了。

现在我需要运行该项目,我将收到下一个错误:

首先是这个重复的消息:

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 C:/jruby-.6.7.2/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91.

还有:

config.gem: Unpacked gem activerecord-jdbc-adapter-0.9 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem activerecord-jdbcmysql-adapter-0.9 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem builder-2.1.2 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem ci_reporter-1.6.0 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem CVS in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem CVS in vendor/gems not in a versioned directory. Giving up.
config.gem: Unpacked gem jdbc-mysql-5.0.4 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem remarkable-3.1.8 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem remarkable_activerecord-3.1.8 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem remarkable_rails-3.1.6 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem ruby-ole-1.2.10.1 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem spreadsheet-0.6.4.1 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem will_paginate-2.2.2 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.

最后,当服务器即将启动时:

=> Booting Mongrel
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
WARNING: Using default logging
RuntimeError: will_paginate 3.0 is not compatible with Rails 2.3 or older
            (root) at C:/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/will_paginate-3.0.4/lib/will_paginate.rb:8
           require at org/jruby/RubyKernel.java:1033
           require at C:/jruby-1.6.7.2/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60
           require at C:/jruby-1.6.7.2/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55
           require at D:/MyProject/vendor/rails/activesupport/lib/active_support/dependencies.rb:156
  new_constants_in at D:/MyProject/vendor/rails/activesupport/lib/active_support/dependencies.rb:521
  new_constants_in at D:/MyProject/vendor/rails/activesupport/lib/active_support/dependencies.rb:520
           require at D:/MyProject/vendor/rails/activesupport/lib/active_support/dependencies.rb:156
            (root) at C:/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/will_paginate-3.0.4/lib/will_paginate.rb:67
           require at org/jruby/RubyKernel.java:1033
           require at C:/jruby-1.6.7.2/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36
           require at D:/MyProject/vendor/rails/activesupport/lib/active_support/dependencies.rb:156
  new_constants_in at D:/MyProject/vendor/rails/activesupport/lib/active_support/dependencies.rb:521
  new_constants_in at D:/MyProject/vendor/rails/activesupport/lib/active_support/dependencies.rb:520
           require at D:/MyProject/vendor/rails/activesupport/lib/active_support/dependencies.rb:156
            (root) at D:/MyProject/config/environment.rb:84
           require at org/jruby/RubyKernel.java:1033
           require at D:/MyProject/vendor/rails/railties/lib/commands/server.rb:36
            (root) at ./script/server:3

我会提供任何其他细节来帮助解决这个问题让我知道。 Thnaks!

0 个答案:

没有答案
相关问题