问题:
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>'
如果我运行任何 rake 命令,也会发生同样的事情。我所有的其他 Rails 应用程序都可以正常工作。只是这个(我没有写的那个)不会开始。
我看到问题出在这里: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
我只是不知道该怎么办。我的理解是 Rails 正在这个目录中寻找东西
devise_invitable/controllers/registrations
但没有找到它,因为该目录不存在。显然,该代码适用于印度的开发人员,但他们不愿意帮助我弄清楚为什么它没有在我的机器上运行。
我正在运行 Ubuntu 12.04
宝石文件:
gem 'devise'
gem 'devise_invitable'
捆绑安装
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.