$ jruby -S rails generate scaffold User name:string email:string
2020-11-13T11:37:59.585-05:00 [main] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem
Pass '--add-opens java.base/sun.nio.ch=org.jruby.dist --add-opens java.base/java.io=org.jruby.dist' to enable.
2020-11-13T11:38:03.555-05:00 [main] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem
Pass '--add-opens java.base/sun.nio.ch=org.jruby.dist --add-opens java.base/java.io=org.jruby.dist' to enable.
invoke active_graph
identical app/models/user.rb
ArgumentError: Can not transliterate strings with Windows-1252 encoding
transliterate at D:/jruby-9.2.13.0/lib/ruby/gems/shared/gems/activesupport-6.0.3.4/lib/active_support/inflector/transliterate.rb:67
parameterize at D:/jruby-9.2.13.0/lib/ruby/gems/shared/gems/activesupport-6.0.3.4/lib/active_support/inflector/transliterate.rb:123
parameterize at D:/jruby-9.2.13.0/lib/ruby/gems/shared/gems/activesupport-6.0.3.4/lib/active_support/core_ext/string/inflections.rb:196
base_migration_file_name at D:/jruby-9.2.13.0/lib/ruby/gems/shared/gems/activegraph-10.0.1/lib/rails/generators/active_graph_generator.rb:15
migration_file_name at D:/jruby-9.2.13.0/lib/ruby/gems/shared/gems/activegraph-10.0.1/lib/rails/generators/active_graph_generator.rb:19
migration_template at D:/jruby-9.2.13.0/lib/ruby/gems/shared/gems/activegraph-10.0.1/lib/rails/generators/active_graph_generator.rb:40
create_model_file at D:/jruby-9.2.13.0/lib/ruby/gems/shared/gems/activegraph-10.0.1/lib/rails/generators/active_graph/model/model_generator.rb:21
run at D:/jruby-9.2.13.0/lib/ruby/gems/shared/gems/thor-1.0.1/lib/thor/command.rb:27
invoke_command at D:/jruby-9.2.13.0/lib/ruby/gems/shared/gems/thor-1.0.1/lib/thor/invocation.rb:127
invoke_all at D:/jruby-9.2.13.0/lib/ruby/gems/shared/gems/thor-1.0.1/lib/thor/invocation.rb:134
each at org/jruby/RubyHash.java:1415
map at org/jruby/RubyEnumerable.java:886
invoke_all at D:/jruby-9.2.13.0/lib/ruby/gem
RUN apt-get install -y wget
RUN wget https://github.com/neo4j-drivers/seabolt/releases/download/v1.7.4/seabolt-1.7.4-Linux-ubuntu-18.04.deb
RUN dpkg -i seabolt-1.7.4-Linux-ubuntu-18.04.deb
RUN rm seabolt-1.7.4-Linux-ubuntu-18.04.deb
included do
around_action :wrap_in_session_or_transaction
end
def wrap_in_session_or_transaction
ActiveGraph::Base.session(bookmarks: transaction_bookmarks) do
wrap_in_transaction? ? ActiveGraph::Base.send(transaction_method) { yield } : yield
end
@last_bookmark = serialize_bk(ActiveGraph::Base.last_bookmark)
auth_token_headers
end
transaction_method
is read_transaction
or write_transaction
. You need to specify this correctly to get the full benefit of causal cluster.
Hi. We have an array field in our nodes and I want to search by this field.
If I do Node.where(ar: [1, 2, 3])
the query is ... WHERE n.ar IN $ar...
, how can I use the equality operator =
instead of IN
?
I tried making a custom type with a custom converter where to_db
returned an array, but even then the query used IN
but not =
.
Anyone else using Neo4j Aura with ActiveGraph? I got an email today saying:
"It seem you are using a Ruby driver (we believe via http://neo4jrb.io/ ) to connect to Aura and as you know unfortunately this driver is not part of the official Neo4j supported drivers certified to work well with Aura.
Note that this driver https://github.com/neo4jrb/activegraph#neo4j-version-support states that support for 4.1 and above are not supported and since Aura is running 4.2+ this is indeed an issue."
Anyone else got this?
In our project we faced some random freezes and decided to try jruby with neo4j-java-driver.
In the dev environment we use docker-compose with the Rails app and Neo4j 3.5 running in different containers.
In config/neo4j.yml
I have
development:
url: bolt://docker_neo4j:7687
username: neo4j
password: password
But I get
Invalid address format `bolt://docker_neo4j:7687`
/usr/local/bundle/gems/neo4j-java-driver-1.7.4-java/jruby/neo4j/driver/ext/exception_checkable.rb:18:in `check'
/usr/local/bundle/gems/neo4j-java-driver-1.7.4-java/jruby/neo4j/driver/ext/graph_database.rb:14:in `driver'
/usr/local/bundle/gems/neo4j-java-driver-1.7.4-java/lib/neo4j/driver/auto_closable.rb:16:in `block in driver'
/usr/local/bundle/gems/activegraph-10.1.0/lib/active_graph/railtie.rb:75:in `setup!'
/usr/local/bundle/gems/activegraph-10.1.0/lib/active_graph/railtie.rb:53:in `block in Railtie'
/usr/local/bundle/gems/activegraph-10.1.0/lib/active_graph/base.rb:29:in `establish_driver'
/usr/local/bundle/gems/activegraph-10.1.0/lib/active_graph/base.rb:19:in `driver'
/usr/local/bundle/gems/activegraph-10.1.0/lib/active_graph/transactions.rb:37:in `send_transaction'
/usr/local/bundle/gems/activegraph-10.1.0/lib/active_graph/transactions.rb:21:in `transaction'
/usr/local/bundle/gems/activegraph-10.1.0/lib/active_graph/base.rb:33:in `query'
/usr/local/bundle/gems/activegraph-10.1.0/lib/active_graph/core/schema.rb:20:in `constraints'
/usr/local/bundle/gems/activegraph-10.1.0/lib/active_graph/model_schema.rb:35:in `model_constraints'
/usr/local/bundle/gems/activegraph-10.1.0/lib/active_graph/model_schema.rb:131:in `each_schema_element'
/usr/local/bundle/gems/activegraph-10.1.0/lib/active_graph/model_schema.rb:94:in `validate_model_schema!'
/usr/local/bundle/gems/activegraph-10.1.0/lib/active_graph/base.rb:73:in `validate_model_schema!'
/usr/local/bundle/gems/activegraph-10.1.0/lib/active_graph/base.rb:50:in `new_query'
This was working on MRI with neo4j-ruby-driver.
Interestingly, bolt://localhost:7687
works.
I tried bolt://neo4j:password@docker_neo4j:7687
and neo4j://docker_neo4j:7687
, but they also give the same error