Сервер rails не запустится из-за ошибки will_paginate - PullRequest
1 голос
/ 10 августа 2011

Я пытаюсь использовать Neo4j с JRuby в моей системе.Я следовал этому руководству , но я получаю следующую ошибку при попытке запустить сервер.Мне потребовался гем will_paginate в application.rb, поэтому я не знаю, что заставляет сервер не запускаться.

Заранее спасибо!

    LoadError: no such file to load -- will_paginate/finders/base
  require at org/jruby/RubyKernel.java:1038
   (root) at /home/maulin/.rvm/gems/jruby-1.6.3@brtr/gems/neo4j-1.1.0-java/lib/neo4j.rb:12
  require at org/jruby/RubyKernel.java:1038
   (root) at /home/maulin/.rvm/gems/jruby-1.6.3@brtr/gems/neo4j-1.1.0-java/lib/neo4j.rb:8
  require at org/jruby/RubyKernel.java:1038
   (root) at /home/maulin/projects/brtr/config/application.rb:28
      tap at org/jruby/RubyKernel.java:1803
   (root) at /home/maulin/.rvm/gems/jruby-1.6.3@brtr/gems/railties-3.0.9/lib/rails/commands.rb:27
  require at org/jruby/RubyKernel.java:1038
   (root) at script/rails:6

Вот так выглядит мой application.rb

require File.expand_path('../boot', __FILE__)

require 'will_paginate'
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "rails/test_unit/railtie"
require 'neo4j'


# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)

module Brtr
  class Application < Rails::Application
    # Settings in config/environments/* take precedence over those specified here.
    # Application configuration should go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded.

    # Custom directories with classes and modules you want to be autoloadable.
    # config.autoload_paths += %W(#{config.root}/extras)

    # Only load the plugins named here, in the order given (default is alphabetical).
    # :all can be used as a placeholder for all plugins not explicitly named.
    # config.plugins = [ :exception_notification, :ssl_requirement, :all ]

    # Activate observers that should always be running.
    # config.active_record.observers = :cacher, :garbage_collector, :forum_observer

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
    # config.time_zone = 'Central Time (US & Canada)'

    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
    # config.i18n.default_locale = :de

    # JavaScript files you want as :defaults (application.js is always included).
    # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)

    # Configure the default encoding used in templates for Ruby 1.9.
    config.encoding = "utf-8"

    # Configure sensitive parameters which will be filtered from the log file.
    config.filter_parameters += [:password]

    # Enable Neo4j generators, e.g:  rails generate model Admin --parent User
    config.generators do |g|
      g.orm             :neo4j
      g.test_framework  :rspec, :fixture => false
    end

    # Configure where the neo4j database should exist
    config.neo4j.storage_path = "#{config.root}/db/neo4j-#{Rails.env}"

  end
end

список драгоценных камней --local

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.9)
actionpack (3.0.9)
activemodel (3.0.9)
activerecord (3.0.9)
activeresource (3.0.9)
activesupport (3.0.9)
arel (2.0.10)
builder (2.1.2)
bundler (1.0.17)
diff-lcs (1.1.2)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.19)
mime-types (1.16)
neo4j (1.1.0 java)
orm_adapter (0.0.5)
polyglot (0.3.2)
rack (1.2.3)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (3.0.9)
railties (3.0.9)
rake (0.9.2)
rdoc (3.9.1)
rspec (2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
rspec-mocks (2.6.0)
rspec-rails (2.6.1)
thor (0.14.6)
treetop (1.4.10)
tzinfo (0.3.29)
will_paginate (3.0.0)

Ответы [ 2 ]

3 голосов
/ 10 августа 2011

Neo4j.rb не работает с новой версией will_paginate 3.0.0 Я обновил neo4j, чтобы иметь зависимость от версии 3.0.pre4, см. https://github.com/andreasronge/neo4j/commit/fb86d975da1034fde3a3828b5f6e511f7460e09a

0 голосов
/ 10 августа 2011

Зачем вам нужно will_paginate в вашем файле application.rb? Также в строке 28 есть комментарий в этом файле, вы уверены, что они совпадают? Вы можете переместить это will_paginate?

О, и я не видел, чтобы вы сообщали об этом на трекере проблем will_paginate на github, и что за хрень neo4j и почему Jruby ... это все, что я получил: -)

...