bulk_api icon indicating copy to clipboard operation
bulk_api copied to clipboard

Trying to install in Rails 3.1 error

Open msolovyov opened this issue 13 years ago • 2 comments

I was trying to use this to see if I could use the bulk api with rails 3.1 and sproutcore 2, but I received the following error after putting buik_api in my gemfile, running bundle install and then trying to run rails generate bulk:install

NameError: uninitialized constant Bulk::Engine::ActiveRecord
  load_missing_constant at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:504
          const_missing at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:181
                   each at org/jruby/RubyArray.java:1602
          const_missing at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:179
          const_missing at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/rspec-core-2.6.4/lib/rspec/core/backward_compatibility.rb:21
          const_missing at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/rspec-expectations-2.6.0/lib/rspec/expectations/backward_compatibility.rb:22
                 Engine at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/bulk_api-0.0.3/lib/bulk/engine.rb:7
          instance_exec at org/jruby/RubyKernel.java:2045
                    run at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/railties-3.1.0.rc4/lib/rails/initializable.rb:25
       run_initializers at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/railties-3.1.0.rc4/lib/rails/initializable.rb:50
                   each at org/jruby/RubyArray.java:1602
       run_initializers at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/railties-3.1.0.rc4/lib/rails/initializable.rb:49
            initialize! at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/railties-3.1.0.rc4/lib/rails/application.rb:96
                   send at org/jruby/RubyKernel.java:2059
         method_missing at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/railties-3.1.0.rc4/lib/rails/railtie/configurable.rb:30
                 (root) at /home/michael/dev/git4/nfproto/config/environment.rb:5
                require at org/jruby/RubyKernel.java:1038
                require at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:237
        load_dependency at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:223
       new_constants_in at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:639
       new_constants_in at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:638
        load_dependency at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:223
                require at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/activesupport-3.1.0.rc4/lib/active_support/dependencies.rb:237
   require_environment! at /home/michael/dev/git4/nfproto/config/environment.rb:78
                 (root) at /home/michael/.rvm/gems/jruby-1.6.2@railspre/gems/railties-3.1.0.rc4/lib/rails/commands.rb:22
                require at org/jruby/RubyKernel.java:1038
                 (root) at script/rails:6

Is there similar functionality already built into sproutcore 2.0 that will make the binding between rails db content and sproutcore2.0?

Thanks

msolovyov avatar Jun 24 '11 09:06 msolovyov

This repository requires ActiveRecord. What ORM do you use? My fork aims to be ORM- and Rails-agnostic, so you might give it a try. A good stack of changes is not on Github yet though.

SC2 will AFAIK not ship with such functionality, though SC and Rails core members are interested in it.

aflatter avatar Jun 26 '11 10:06 aflatter

I'm using Neo4j.rb as my database, which extends ActiveRecord so I'm not sure if that's the cause of the issue, but it might be.

I guess we'll have to wait and see what gets released with SC2 on the data linking side.

Thanks.

msolovyov avatar Jun 27 '11 08:06 msolovyov