Remarkable appears to conflict with Sunspot::Rails Module "wrong constant name #<Class:0x105745760> (NameError)"

59 views
Skip to first unread message

Rob Aldred

unread,
Aug 20, 2010, 12:21:37 PM8/20/10
to Remarkable
I have installed remarkable on my existing rails app.
Great gem, was really looking forward to using it, but it seems to
conflict with Sunspot::Rails
I'm trying to find out which is to blame, or whether something is just
incompatible, it hasnt even started running anything in the rails app,
it doesn't seem to be able to get past the initial rails environment
load.

If any one has any ideas, I'd really appreciate some help.
Backtrace is below.

Cheers
Rob

--

/Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
activesupport-2.3.4/lib/active_support/inflector.rb:361:in
`const_defined?': wrong constant name #<Class:0x105745760> (NameError)
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
activesupport-2.3.4/lib/active_support/inflector.rb:361:in
`constantize'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
activesupport-2.3.4/lib/active_support/inflector.rb:360:in `each'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
activesupport-2.3.4/lib/active_support/inflector.rb:360:in
`constantize'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
activesupport-2.3.4/lib/active_support/core_ext/string/inflections.rb:
162:in `constantize'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
sunspot_rails-1.1.0/lib/sunspot/rails/request_lifecycle.rb:12:in
`included'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
sunspot_rails-1.1.0/lib/sunspot/rails/request_lifecycle.rb:12:in `map'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
sunspot_rails-1.1.0/lib/sunspot/rails/request_lifecycle.rb:12:in
`included'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
sunspot_rails-1.1.0/rails/init.rb:7:in `include'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
sunspot_rails-1.1.0/rails/init.rb:7:in `evaluate_init_rb'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
sunspot_rails-1.1.0/rails/init.rb:7:in `module_eval'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
sunspot_rails-1.1.0/rails/init.rb:7:in `evaluate_init_rb'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
rails-2.3.4/lib/rails/plugin.rb:158:in `evaluate_init_rb'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
activesupport-2.3.4/lib/active_support/core_ext/kernel/reporting.rb:
11:in `silence_warnings'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
rails-2.3.4/lib/rails/plugin.rb:154:in `evaluate_init_rb'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
rails-2.3.4/lib/rails/plugin.rb:48:in `load'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
rails-2.3.4/lib/rails/plugin/loader.rb:38:in `load_plugins'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
rails-2.3.4/lib/rails/plugin/loader.rb:37:in `each'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
rails-2.3.4/lib/rails/plugin/loader.rb:37:in `load_plugins'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
rails-2.3.4/lib/initializer.rb:369:in `load_plugins'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
rails-2.3.4/lib/initializer.rb:165:in `process'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
rails-2.3.4/lib/initializer.rb:113:in `send'
from /Users/robaldred/.rvm/gems/ruby-1.8.7-p249@kitten/gems/
rails-2.3.4/lib/initializer.rb:113:in `run'
from /Users/robaldred/Sites/ahoys/config/environment.rb:13
from /Users/robaldred/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/
1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /Users/robaldred/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/
1.8/rubygems/custom_require.rb:31:in `require'
from /Users/robaldred/Sites/ahoys/spec/spec_helper.rb:2
from /Users/robaldred/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/
1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /Users/robaldred/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/
1.8/rubygems/custom_require.rb:31:in `require'
from ./spec/models/printer_spec.rb:1

Rob Aldred

unread,
Aug 20, 2010, 12:40:36 PM8/20/10
to Remarkable
Found the issue its actually related to bundler.
make sure the gem is loaded in your gem file like so:

gem 'remarkable_rails', :require => false

:require => false stops it loading at initialisation.
then just add the require 'remarkable_rails' to your spec helper as
per the gem README

Ho-Sheng Hsiao

unread,
Aug 20, 2010, 5:49:22 PM8/20/10
to Remarkable

I don't think Rails 2.3 uses Bundler. Are you talking about the gem
declarations in config/environment.rb ?

Ho-Sheng Hsiao
Reply all
Reply to author
Forward
0 new messages