我正在尝试在我的系统上使用Neo4j和JRuby。我遵循了这个guide,但是当我尝试启动服务器时出现以下错误。我已经在application.rb中需要了will_paginate gem,所以我不知道是什么导致服务器无法启动。
提前致谢!
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
gem list --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)
答案 0 :(得分:3)
Neo4j.rb不适用于新版本的will_paginate 3.0.0 我已经更新了neo4j以使其依赖于版本3.0.pre4,请参阅https://github.com/andreasronge/neo4j/commit/fb86d975da1034fde3a3828b5f6e511f7460e09a
答案 1 :(得分:0)
为什么需要在application.rb文件中使用will_paginate?第28行也是该文件中的注释,你确定它们都匹配吗?你可以移动那个will_paginate吗?
哦,我没有看到你在github上的will_paginate问题跟踪器上报告这个问题,neo4j到底是什么以及为什么Jruby ......这就是我所得到的: - )