JRuby と Rails 3.2 を使用していますが、Rails 2 のプロジェクトに取り組まなければならないことがわかりました。
jruby ./script/server
サーバーを起動するコマンドなど、Rails 2 に関するいくつかの基本的なことは知っていますrails s
が、Rails 2 の gem について話し始めると、複雑になります。
現在、プロジェクトを実行する必要があり、次のエラーが発生しています。
最初にこの繰り返しのメッセージ:
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
これを解決するのに役立つその他の詳細を提供します。タナクス!