Reputation: 191
I am trying to create an application with JRuby, Rails and Neo4j. I tried installing neo4j and get it started with Rails 5.0.0, but I got several complaint regarding a missing (???) activesupport gem. Which is weird because the gem is listed when I run “gem list”. Well, I tried doing the same using Rails 4.2.6. After many temporary tweaks to eliminate some issues reported below, I finally got neo4j to start. However, I could not start the Rails server unless I commented out almost every line in confit/initializers/new_framework_defaults.rb. Here are the reported errors, and how I dealt with them. Is there a better solution for this, that will not imply enabling/disabling all this configuration methods?
Could please anyone suggest methods to go around/solve all these issues?
gem install rails -v 4.2
bundle exec rails new myApp -m http://neo4jrb.io/neo4j/neo4j.rb -O
cd myApp && bundle exec rake neo4j:install[community-latest]
START NEO4j: bundle exec rake neo4j:start
PROBLEM 1: NameError: uninitialized constant ActiveSupport::EventedFileUpdateChecker
PROBLEM 2: NoMethodError: undefined method `to_time_preserves_timezone=' for ActiveSupport:Module.
PROBLEM 3: NoMethodError: undefined method 'halt_callback_chains_on_return_false=' for ActiveSupport:Module
PROBLEM 4: NoMethodError: undefined method `perform_caching=' for ActionMailer::Base:Class
Then re-ran bundle exec rake neo4j:start:
FINALLY, IT WORKED
5) Starting be rails s
PROBLEM: "Rack app error: #< RuntimeError: Invalid option key: per_form_csrf_tokens=>"
I set Rails.application.config.action_controller.per_form_csrf_tokens = false
in config/initializers/new_framework_defaults.rb. However, it did not help.
Below is the full error message:
I had to comment out the line Rails.application.config.action_controller.forgery_protection_origin_check = true in config/initializers/new_framework_defaults.rb
block in Railtie'
org/jruby/RubyHash.java:1343:in
each'
/Users/yandj/.gem/jruby/2.2.2/gems/actionpack-4.2.6/lib/action_controller/railtie.rb:54:in block in Railtie'
org/jruby/RubyBasicObject.java:1633:in
instance_eval'
/Users/yandj/.gem/jruby/2.2.2/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:38:in execute_hook'
/Users/yandj/.gem/jruby/2.2.2/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:45:in
block in run_load_hooks'
org/jruby/RubyArray.java:1560:in each'
/Users/yandj/.gem/jruby/2.2.2/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:44:in
run_load_hooks'
/Users/yandj/.gem/jruby/2.2.2/gems/actionpack-4.2.6/lib/action_controller/base.rb:266:in <class:Base>'
/Users/yandj/.gem/jruby/2.2.2/gems/actionpack-4.2.6/lib/action_controller/base.rb:164:in
'
/Users/yandj/.gem/jruby/2.2.2/gems/actionpack-4.2.6/lib/action_controller/base.rb:5:in <top>'
/Users/yandj/.gem/jruby/2.2.2/gems/actionpack-4.2.6/lib/action_dispatch/middleware/static.rb:1:in
(root)'
/Users/yandj/.gem/jruby/2.2.2/gems/actionpack-4.2.6/lib/action_dispatch/middleware/static.rb:69:in ext'
/Users/yandj/.gem/jruby/2.2.2/gems/actionpack-4.2.6/lib/action_dispatch/middleware/static.rb:27:in
match?'
/Users/yandj/.gem/jruby/2.2.2/gems/actionpack-4.2.6/lib/action_dispatch/middleware/static.rb:114:in call'
/Users/yandj/.gem/jruby/2.2.2/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in
call'
/Users/yandj/.gem/jruby/2.2.2/gems/railties-4.2.6/lib/rails/engine.rb:518:in call'
/Users/yandj/.gem/jruby/2.2.2/gems/railties-4.2.6/lib/rails/application.rb:165:in
call'
/Users/yandj/.gem/jruby/2.2.2/gems/rack-1.6.4/lib/rack/content_length.rb:15:in call'
/Users/yandj/.gem/jruby/2.2.2/gems/puma-3.4.0-java/lib/puma/configuration.rb:224:in
call'
/Users/yandj/.gem/jruby/2.2.2/gems/puma-3.4.0-java/lib/puma/server.rb:569:in handle_request'
/Users/yandj/.gem/jruby/2.2.2/gems/puma-3.4.0-java/lib/puma/server.rb:406:in
block in process_client'
org/jruby/RubyProc.java:318:in `call'Upvotes: 1
Views: 362
Reputation: 10856
Sorry, I think we should have a note in our README
about this. Could you try the rails5
branch?
gem 'neo4j', github: 'neo4jrb/neo4j', branch: 'rails5'
Upvotes: 0