Question

Problem:

m@m-Lenovo-IdeaPad-Y470:~/Dropbox/software/Rails/CIRCAR_CP_NEW$ rails s
Initialize SymmetricEncryption module.
=> Booting Thin
=> Rails 3.2.6 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/home/m/Dropbox/software/Rails/CIRCAR_CP_NEW/config/initializers/registrations.rb:1:in `<top (required)>': cannot load such file -- devise_invitable/controllers/registrations (LoadError)
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `load'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `block in load'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `load'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/railties-3.2.6/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/railties-3.2.6/lib/rails/engine.rb:587:in `each'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/railties-3.2.6/lib/rails/engine.rb:587:in `block in <class:Engine>'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `instance_exec'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `run'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/railties-3.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `each'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `run_initializers'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/railties-3.2.6/lib/rails/application.rb:136:in `initialize!'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/m/Dropbox/software/Rails/CIRCAR_CP_NEW/config/environment.rb:7:in `<top (required)>'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from /home/m/Dropbox/software/Rails/CIRCAR_CP_NEW/config.ru:3:in `block in <main>'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from /home/m/Dropbox/software/Rails/CIRCAR_CP_NEW/config.ru:in `new'
from /home/m/Dropbox/software/Rails/CIRCAR_CP_NEW/config.ru:in `<main>'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/railties-3.2.6/lib/rails/commands/server.rb:46:in `app'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/railties-3.2.6/lib/rails/commands/server.rb:70:in `start'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/railties-3.2.6/lib/rails/commands.rb:55:in `block in <top (required)>'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/railties-3.2.6/lib/rails/commands.rb:50:in `tap'
from /home/m/.rvm/gems/ruby-1.9.3-p194@proof/gems/railties-3.2.6/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

If I run any rake commands, the same thing happens. All my other rails applications work just fine. It's just this one (the one I didn't write) that won't start.

I see that the problem is here: CIRCAR_CP_NEW/config/initializers/registrations.rb:1

CIRCAR_CP_NEW/config/initializers/registrations.rb

module DeviseInvitable::Controllers::Registrations
  def self.included(controller)
   controller.send :around_filter, :keep_invitation_info, :only => :create
  end

 ...

    yield
    reset_invitation_info
  end if resource_invitable
  puts "Keep Invitation Info End"
  puts "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
end

I just have no idea what to do about it. My understanding is that Rails is looking for something in this directory

devise_invitable/controllers/registrations

but is not finding it because that directory does not exist. Apparently the code works for the developers in India but they don't feel inclined to help me figure out why it's not running on my machine.

I'm running Ubuntu 12.04

Gemfile:

gem 'devise'
gem 'devise_invitable'

Bundle Install

m@m-Lenovo-IdeaPad-Y470:~/Dropbox/software/Rails/CIRCAR_CP_NEW$ bundle install
Using rake (10.0.4)
...

Using devise (2.2.4) 
Using devise_invitable (1.1.8)

...

Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Was it helpful?

Solution 2

It was a gem compatibility issue.

After version 1.1.4, the structure of devise_invitable changed.

devise_invitable/controllers/registrations

no longer exists. Therefore

module DeviseInvitable::Controllers::Registrations

needed to change to

module DeviseInvitable::RegistrationsControllers

to reflect the structure of the updated gem.

The other solution would be to add the version number to the gemfile and make sure I am using a compatible version so that things are being referenced as expected.

The server and rake commands now run, but there are a number of other issues I have to figure out now :P

OTHER TIPS

Are you certain that you have the devise gems are:

e.g. bundle install


EDIT: If we know that the gems have been downloaded, there may be a problem with the Gem's configured load paths.

  1. Within irb or pry run Gem.path

  2. Check each of the returned paths for the devise libraries. If the devise directory structure is not found, we have found your problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top