Make sure devise-neo4j works with 2.0.0 #135

Closed
forgewill opened this Issue Jan 16, 2012 · 19 comments

Projects

None yet

8 participants

@forgewill

Should check that the neo4j specific gems work with 2.0.0

Appearing error is:

D:\Dev\Quantum>jruby -S bundle update
Updating git://github.com/andreasronge/neo4j.git
Updating git://github.com/andreasronge/devise-neo4j.git
Updating git://github.com/pmq20/mathjax-rails.git
Fetching source index for http://rubygems.org/
Bundler could not find compatible versions for gem "neo4j":
  In Gemfile:
    devise-neo4j (>= 0) java depends on
      neo4j (~> 1.1) java

    neo4j (2.0.0.alpha.1)

The part of my gemfile is following:

gem 'rails'
gem 'neo4j', :git => 'git://github.com/andreasronge/neo4j.git'
gem 'devise-neo4j', :git => 'git://github.com/andreasronge/devise-neo4j.git'
gem "carrierwave-neo4j", :require => "carrierwave/neo4j"
gem 'mathjax-rails', :git => 'git://github.com/pmq20/mathjax-rails.git'
@andreasronge
Neo4jRB member

When we release neo4j 2.0.0 we have to make sure that the devise-neo4j will depend on 2.0.0
I think devise-neo4j still work with the latest. If you really want to use the latest neo4j from github then I suggest forking devise-neo4j and updating the gem dependency to neo4j 2.0.0

@forgewill

Thanks a lot Andreas! I'll be waiting for release ;) Good day friends! :)

@iRonin

I'm using devise-neo4j without a problem with neo4j 2.0.0

@forgewill

Hello, guys!
I'm sorry, but maybe can you help me with trouble? I try to use devise-neo4j but after updating to neo4j 2.0 and all gems corresponding my Gemfile I have following error:

D:\Dev\Quantum>jruby -S rails s
LoadError: no such file to load -- devise/neo4j
  require at org/jruby/RubyKernel.java:1033
  require at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/bundler-1.2.0.pre/lib/bundler/runtime.rb:74
     each at org/jruby/RubyArray.java:1615
  require at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/bundler-1.2.0.pre/lib/bundler/runtime.rb:55
  require at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/bundler-1.2.0.pre/lib/bundler.rb:126
   (root) at D:/Dev/Quantum/config/application.rb:13
  require at org/jruby/RubyKernel.java:1033
   (root) at D:/Dev/Quantum/config/application.rb:52
      tap at org/jruby/RubyKernel.java:1787
   (root) at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/railties-3.1.4/lib/rails/commands.rb:49
  require at org/jruby/RubyKernel.java:1033
   (root) at script/rails:6

The part of my gemfile is following:

#Graph Database
gem 'neo4j', '2.0.0'

#Authentication
gem 'devise-neo4j', :git => 'git://github.com/andreasronge/devise-neo4j.git'

#CarrierWave for Neo4j
gem "carrierwave-neo4j", :require => "carrierwave/neo4j", :git => 'git://github.com/forgewill/carrierwave-neo4j.git'

And part of application.rb is:

require 'action_controller/railtie'
require 'action_mailer/railtie'
require 'active_resource/railtie'
require 'rails/test_unit/railtie'
require 'sprockets/railtie'
require 'neo4j'
@andreasronge
Neo4jRB member
@forgewill

Andreas, I've tried https://github.com/andreasronge/rails3-devise-rspec-cucumber and result:

D:\Dev\ex>jruby -S rails s
LoadError: no such file to load -- devise/schema
           Schema at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/bundler/gems/devise-neo4j-1fa76ed31ae4/lib/devise/orm/neo4j/schema.rb:5
            Neo4j at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/bundler/gems/devise-neo4j-1fa76ed31ae4/lib/devise/orm/neo4j/schema.rb:4
              Orm at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/bundler/gems/devise-neo4j-1fa76ed31ae4/lib/devise/orm/neo4j/schema.rb:3
           Devise at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/bundler/gems/devise-neo4j-1fa76ed31ae4/lib/devise/orm/neo4j/schema.rb:2
           (root) at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/bundler/gems/devise-neo4j-1fa76ed31ae4/lib/devise/orm/neo4j/schema.rb:1
          require at org/jruby/RubyKernel.java:1033
          require at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251
  load_dependency at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236
          require at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251
           (root) at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/bundler/gems/devise-neo4j-1fa76ed31ae4/lib/devise/orm/neo4j/schema.rb:3
          require at org/jruby/RubyKernel.java:1033
           (root) at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/bundler/gems/devise-neo4j-1fa76ed31ae4/lib/devise-neo4j.rb:1
          require at org/jruby/RubyKernel.java:1033
           (root) at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/bundler/gems/devise-neo4j-1fa76ed31ae4/lib/devise/orm/neo4j.rb:6
          require at org/jruby/RubyKernel.java:1033
           (root) at D:/Dev/ex/config/application.rb:53
              tap at org/jruby/RubyKernel.java:1787
           (root) at D:/Dev/Environment/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/commands.rb:50
          require at org/jruby/RubyKernel.java:1033
           (root) at script/rails:6
@andreasronge
Neo4jRB member

Aha, I think you have to require it in the config/application.rb

require File.expand_path('../boot', __FILE__)
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "rails/test_unit/railtie"
require 'neo4j'
require 'devise-neo4j'

I've got a project using devise with the following dependencies:

gem 'rails', '3.0.10'
gem 'neo4j', '2.0.0'
gem 'devise-neo4j',  :git => 'git://github.com/andreasronge/devise-neo4j.git'
gem 'cancan'
@forgewill

Andreas, it's bring about the same error. I tried to fork your https://github.com/andreasronge/devise-neo4j and find out that after commit andreasronge/devise-neo4j@9d12b47 application is crashed.

Following changes force it:

-  s.add_runtime_dependency "devise", "~> 1.3"
+  s.add_runtime_dependency "devise"

I rolled back to previous commit and application works fine with latest update corresponding my Gemfile.

@andreasronge andreasronge reopened this May 31, 2012
@arikan

Hi there,

getting a similar error on this setup:

devise-neo4j (1.1.0) from git://github.com/andreasronge/devise-neo4j.git (at master)
neo4j (2.2.0)
rails (3.2.8)

>> bundle exec rails g devise:install --orm=neo4j
NameError: uninitialized constant Devise::Schema

What might cause this error?

@andreasronge
Neo4jRB member

Did you try with an older devise, e.g. 1.3.x ?

@arikan

for now devise-neo4j works with rails 3.2.8 and neo4j 2.2.0 when used with Chris F's fork in your Gemfile:

gem 'devise-neo4j', :git => 'git://github.com/cfitz/devise-neo4j.git'

As discussed here:
https://groups.google.com/d/topic/neo4jrb/WPCZ5C_gVbE/discussion

@tomaadland

I had the same problem and this worked. How about getting these changes back into the original ?

@andreasronge
Neo4jRB member

I guess we want to release it to rubygems as well.
Currently only Ben Jackson, Bobby Calderwood can release it, http://rubygems.org/gems/devise-neo4j
Maybe someone of you wants to become owner of that gem ?
Not sure which git repo should be the master either.

@tomaadland

Yes it would be good if the master gem is the working solution. It's only a matter of time before more people are looking for this same fix.

@saterus

Thoughts on who should own the neo4j-devise gem? I'm sure some users would find this to be an important bridge when trying out Neo4j. Being able to have the latest version on Rubygems.org would be valuable for beginners.

/cc @benjackson @cfitz @andreasronge

@andreasronge
Neo4jRB member

I guess there is no active developer for that gem :(
But we could at least run its rspecs after each new release of neo4j.rb.

@benjackson

I'd be happy to release to rubygems, if you want to send me a pull request?

Sorry I've been slack on this one, but it's been a while since I've used it and so haven't had the time to update. I remember the specs for devise not running fully when updating the dependencies, so it required a lot more work to get it to comply. I'd be happy to try again from a pull request.

@subvertallchris
Neo4jRB member

Closing this, working great in 3.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment