开发者

rails server wont start due to will_paginate error

开发者 https://www.devze.com 2023-03-27 12:29 出处:网络
I am trying to use Neo4j with JRuby on my system. I followed this guide, but I get the following error when I try to start up the server. I\'ve required the will_paginate gem in the application.rb so

I am trying to use Neo4j with JRuby on my system. I followed this guide, but I get the following error when I try to start up the server. I've required the will_paginate gem in the application.rb so I dont know whats causing the server to fail to start up.

Thanks in advance!

    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

This is what my application.rb looks like

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 y开发者_StackOverflowou 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)


Neo4j.rb does not work with the new release of will_paginate 3.0.0 I have updated the neo4j to have a dependency to version 3.0.pre4, see https://github.com/andreasronge/neo4j/commit/fb86d975da1034fde3a3828b5f6e511f7460e09a


Why are you require-ing will_paginate in your application.rb file? Also line 28 is a comment in that file, are you sure they both match up? Can you move that will_paginate?

Oh and I didn't see you report this on will_paginate's issue tracker on github, and what the heck is neo4j and why Jruby... that's all i got :-)

0

精彩评论

暂无评论...
验证码 换一张
取 消