I have upgraded my rails project from 4.x to 5.0.0.beta1 for use the actioncable and I have followed the example of DHH but it is not working. When I start the rails server it shows error:
$ rails s
=> Booting Puma
=> Rails 5.0.0.beta1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actioncable-5.0.0.beta1/lib/action_cable/server/configuration.rb:15:in `initialize': uninitialized constant ActionCable::Server::Configuration::ApplicationCable (NameError)
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actioncable-5.0.0.beta1/lib/action_cable/server/base.rb:16:in `new'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actioncable-5.0.0.beta1/lib/action_cable/server/base.rb:16:in `block in <class:Base>'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta1/lib/active_support/core_ext/module/attribute_accessors.rb:72:in `block in mattr_reader'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta1/lib/active_support/core_ext/module/attribute_accessors.rb:55:in `each'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta1/lib/active_support/core_ext/module/attribute_accessors.rb:55:in `mattr_reader'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta1/lib/active_support/core_ext/module/attribute_accessors.rb:208:in `mattr_accessor'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actioncable-5.0.0.beta1/lib/action_cable/server/base.rb:16:in `<class:Base>'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actioncable-5.0.0.beta1/lib/action_cable/server/base.rb:12:in `<module:Server>'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actioncable-5.0.0.beta1/lib/action_cable/server/base.rb:7:in `<module:ActionCable>'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actioncable-5.0.0.beta1/lib/action_cable/server/base.rb:6:in `<top (required)>'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actioncable-5.0.0.beta1/lib/action_cable.rb:43:in `server'
from /home/laport/Téléchargements/Nouveau TP/Module_chat (copie)/config/routes.rb:28:in `block in <top (required)>'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.beta1/lib/action_dispatch/routing/route_set.rb:380:in `instance_exec'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.beta1/lib/action_dispatch/routing/route_set.rb:380:in `eval_block'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.beta1/lib/action_dispatch/routing/route_set.rb:362:in `draw'
from /home/laport/Téléchargements/Nouveau TP/Module_chat (copie)/config/routes.rb:1:in `<top (required)>'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/application/routes_reloader.rb:40:in `each'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta1/lib/active_support/file_update_checker.rb:75:in `execute'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/application/routes_reloader.rb:27:in `updater'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/initializable.rb:30:in `instance_exec'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/initializable.rb:30:in `run'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/initializable.rb:54:in `run_initializers'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/application.rb:350:in `initialize!'
from /home/laport/Téléchargements/Nouveau TP/Module_chat (copie)/config/environment.rb:5:in `<top (required)>'
from /home/laport/Téléchargements/Nouveau TP/Module_chat (copie)/config.ru:3:in `require'
from /home/laport/Téléchargements/Nouveau TP/Module_chat (copie)/config.ru:3:in `block in <main>'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/builder.rb:55:in `instance_eval'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/builder.rb:55:in `initialize'
from /home/laport/Téléchargements/Nouveau TP/Module_chat (copie)/config.ru:in `new'
from /home/laport/Téléchargements/Nouveau TP/Module_chat (copie)/config.ru:in `<main>'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/builder.rb:49:in `eval'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/builder.rb:49:in `new_from_string'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/builder.rb:40:in `parse_file'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/server.rb:318:in `build_app_and_options_from_config'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/server.rb:218:in `app'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/commands/server.rb:56:in `app'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/server.rb:353:in `wrapped_app'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/commands/server.rb:134:in `log_to_stdout'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/commands/server.rb:74:in `start'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/commands/commands_tasks.rb:90:in `block in server'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/commands/commands_tasks.rb:85:in `server'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/command.rb:20:in `run'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.0.beta1/lib/rails/commands.rb:19:in `<top (required)>'
from /home/laport/Téléchargements/Nouveau TP/Module_chat (copie)/bin/rails:8:in `require'
from /home/laport/Téléchargements/Nouveau TP/Module_chat (copie)/bin/rails:8:in `<top (required)>'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/laport/.rbenv/versions/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/laport/Téléchargements/Nouveau TP/Module_chat (copie)/bin/spring:16:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
This is my Gemfile :
gem 'bcrypt'
gem 'faker'
gem 'carrierwave'
gem 'mini_magick'
gem 'fog'
# gem 'haml-rails'
gem 'sqlite3'
gem 'active_model_serializers', '~> 0.10.0.rc1'
gem 'sprockets'
gem 'sprockets-rails'
gem 'bourbon'
gem 'neat'
gem 'bitters'
gem 'bunny'
gem 'activesupport', '5.0.0.beta1'
gem 'actionpack'
gem 'arel'
gem 'rack'
gem 'puma', '2.15.3'
gem 'actioncable' , '5.0.0.beta1'
gem 'will_paginate'
gem 'bootstrap-will_paginate'
gem 'bootstrap-sass'
gem 'sass-rails'
gem 'uglifier'
gem 'coffee-rails'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder'
gem 'sdoc'
You need to add require 'action_cable/engine' to your config/application.rb.
The error is related to not having the correct ActionCable files in your project. You need app/channels/application_cable/channel.rb that looks like this:
module ApplicationCable
class Channel < ActionCable::Channel::Base
end
end
and
# app/channels/application_cable/connection.rb
module ApplicationCable
class Connection < ActionCable::Connection::Base
end
end
Add require "action_cable" in config/application.rb
Source:
https://github.com/rails/rails/issues/23183
Related
RAILS_ENV=production rails s
leads to
=> Booting Puma
=> Rails 4.2.6 application starting in production on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/***/.rvm/gems/ruby-2.3.0#global/gems/activerecord-4.2.6/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined local variable or method `paperclip' for #<Class:0x007fbf49ddafa8> (NameError)
This only happens when I start the server in production. In dev and test mode, its all fine.
So I guessed that there is some misconfiguration in the gemfile but paperclip and related gems are not grouped (or excluded for production) so this does not make any sense.
The only gems which are grouped into test/dev only are:
group :development, :test do
# Test driven development
gem 'rspec-rails'
gem 'factory_girl_rails'
gem 'shoulda'
gem 'faker'
# check for dead routes
gem 'traceroute'
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
# find missing translations
gem 'i18n-tasks', '~> 0.8.3'
gem 'simplecov'
gem 'rack-mini-profiler'
gem 'letter_opener'
# Model/Controller graphing
gem 'railroady'
end
group :test do
gem 'rspec-sidekiq'
end
I'm rather convinced that this has nothing to do with paperclip itself.
If I require paperclip manually in the model, other gem related methods fail as well.
Here is the full error trace:
/Users/***/.rvm/gems/ruby-2.3.0#global/gems/activerecord-4.2.6/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined local variable or method `paperclip' for #<Class:0x007fbf49ddafa8> (NameError)
from /Users/***/Documents/Projekte/***/app/models/sponsorship.rb:2:in `<class:Sponsorship>'
from /Users/***/Documents/Projekte/***/app/models/sponsorship.rb:1:in `<top (required)>'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:360:in `require_or_load'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:494:in `load_missing_constant'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:184:in `const_missing'
from /Users/***/Documents/Projekte/***/app/models/advertisement.rb:1:in `<top (required)>'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:360:in `require_or_load'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:317:in `depend_on'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:233:in `require_dependency'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/engine.rb:471:in `each'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/engine.rb:471:in `block in eager_load!'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/engine.rb:469:in `each'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/engine.rb:469:in `eager_load!'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/engine.rb:346:in `eager_load!'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/application/finisher.rb:56:in `each'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!'
from /Users/***/Documents/Projekte/***/config/environment.rb:5:in `<top (required)>'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/***/Documents/Projekte/***/config.ru:3:in `block in <main>'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /Users/***/Documents/Projekte/***/config.ru:in `new'
from /Users/***/Documents/Projekte/***/config.ru:in `<main>'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/commands/server.rb:61:in `app'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/commands/server.rb:80:in `start'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/***/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/***/Documents/Projekte/***/bin/rails:8:in `require'
from /Users/***/Documents/Projekte/***/bin/rails:8:in `<top (required)>'
from /Users/***/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/client/rails.rb:28:in `load'
from /Users/***/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/client/rails.rb:28:in `call'
from /Users/***/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/client/command.rb:7:in `call'
from /Users/***/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/client.rb:30:in `run'
from /Users/***/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/bin/spring:49:in `<top (required)>'
from /Users/***/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/binstub.rb:11:in `load'
from /Users/***/.rvm/gems/ruby-2.3.0/gems/spring-1.7.1/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/***/Documents/Projekte/***/bin/spring:16:in `require'
from /Users/***/Documents/Projekte/***/bin/spring:16:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
From the stacktrace, the class Sponsorship has on line 2 a call to a method paperclip. This method does not exist in your code or in the paperclip gem. You need to look at that line and fix it.
The reason that it is not blowing up in development / test is that the code is not auto-loaded in these environments (specifically, in the configuration config.eager_load is set to true in production but false in development.
If you start a rails console in development and run something like Sponsorship.first I bet you will see an error.
I am new to both angularjs and rails.
In my new company we have to use ruby on rails with angularjs. After takingup tutorials for angularjs and ruby on rails separately, I was trying how the both would work together using the following link:
https://thinkster.io/angular-rails#generating-activerecord-models
After following all steps till the topic "Integrating the Front-end with the Asset Pipeline" (including steps in this topic) when I run rails s command the following error comes:
=> Booting WEBrick
=> Rails 4.2.5 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
**/home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/angular-rails-templates-0.1.4/lib/angular-rails-templates/engine.rb:49:in `block (2 levels) in <class:Engine>': undefined method `register_engine' for nil:NilClass (NoMethodError)**
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/angular-rails-templates-0.1.4/lib/angular-rails-templates/engine.rb:39:in `each'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/angular-rails-templates-0.1.4/lib/angular-rails-templates/engine.rb:39:in `block in <class:Engine>'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/cb/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /home/cb/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /home/cb/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /home/cb/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /home/cb/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /home/cb/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /home/cb/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /home/cb/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /home/cb/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
from /home/cb/flapper-news/config/environment.rb:5:in `<top (required)>'
from /home/cb/flapper-news/config.ru:3:in `require'
from /home/cb/flapper-news/config.ru:3:in `block in <main>'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /home/cb/flapper-news/config.ru:in `new'
from /home/cb/flapper-news/config.ru:in `<main>'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/railties-4.2.5/lib/rails/commands/server.rb:61:in `app'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/railties-4.2.5/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/railties-4.2.5/lib/rails/commands/server.rb:78:in `start'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `server'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
from /home/cb/flapper-news/bin/rails:9:in `require'
from /home/cb/flapper-news/bin/rails:9:in `<top (required)>'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/spring-1.6.0/lib/spring/client/rails.rb:28:in `load'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/spring-1.6.0/lib/spring/client/rails.rb:28:in `call'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/spring-1.6.0/lib/spring/client/command.rb:7:in `call'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/spring-1.6.0/lib/spring/client.rb:28:in `run'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/spring-1.6.0/bin/spring:51:in `<top (required)>'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/spring-1.6.0/lib/spring/binstub.rb:11:in `load'
from /home/cb/.rvm/gems/ruby-2.2.3#flapper-news/gems/spring-1.6.0/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/cb/flapper-news/bin/spring:13:in `require'
from /home/cb/flapper-news/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
Using rails version 4.2.5
Following is a snippet of the Gemfile:
source 'https://rubygems.org'
gem 'angular-rails-templates'
gem 'rails', '4.2.5'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
gem 'byebug'
end
group :development do
gem 'web-console', '~> 2.0'
gem 'spring'
end
I had the same issue. It was a problem related with 'sprockets'. Try to install an older version adding gem 'sprockets', '2.12.3' to your gem file and then update your gems by running bundle update.
It worked for me.
When I run my rails server on Terminal, I get the following message:
Exiting
/Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined method `devise' for Install (call 'Install.connection' to establish a connection):Class (NoMethodError)
from /Users/Rushal-Marketing/Desktop/pinter/app/models/install.rb:4:in `<class:Install>'
from /Users/Rushal-Marketing/Desktop/pinter/app/models/install.rb:1:in `<top (required)>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:457:in `load'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:457:in `block in load_file'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:647:in `new_constants_in'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:456:in `load_file'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:354:in `require_or_load'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:494:in `load_missing_constant'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:184:in `const_missing'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/inflector/methods.rb:261:in `const_get'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/inflector/methods.rb:261:in `block in constantize'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/inflector/methods.rb:259:in `each'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/inflector/methods.rb:259:in `inject'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/inflector/methods.rb:259:in `constantize'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:566:in `get'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:597:in `constantize'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise.rb:291:in `get'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/mapping.rb:81:in `to'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/mapping.rb:76:in `modules'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/mapping.rb:93:in `routes'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/mapping.rb:160:in `default_used_route'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/mapping.rb:70:in `initialize'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise.rb:325:in `new'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise.rb:325:in `add_mapping'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/rails/routes.rb:238:in `block in devise_for'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/rails/routes.rb:237:in `each'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/devise-3.5.3/lib/devise/rails/routes.rb:237:in `devise_for'
from /Users/Rushal-Marketing/Desktop/pinter/config/routes.rb:4:in `block in <top (required)>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:434:in `instance_exec'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:434:in `eval_block'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:412:in `draw'
from /Users/Rushal-Marketing/Desktop/pinter/config/routes.rb:1:in `<top (required)>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in `load'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in `load'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
from /Users/Rushal-Marketing/Desktop/pinter/config/environment.rb:5:in `<top (required)>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /Users/Rushal-Marketing/Desktop/pinter/config.ru:3:in `block in <main>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /Users/Rushal-Marketing/Desktop/pinter/config.ru:in `new'
from /Users/Rushal-Marketing/Desktop/pinter/config.ru:in `<main>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/server.rb:61:in `app'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/server.rb:78:in `start'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/Rushal-Marketing/Desktop/pinter/bin/rails:9:in `require'
from /Users/Rushal-Marketing/Desktop/pinter/bin/rails:9:in `<top (required)>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/spring-1.6.0/lib/spring/client/rails.rb:28:in `load'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/spring-1.6.0/lib/spring/client/rails.rb:28:in `call'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/spring-1.6.0/lib/spring/client/command.rb:7:in `call'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/spring-1.6.0/lib/spring/client.rb:28:in `run'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/spring-1.6.0/bin/spring:51:in `<top (required)>'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/spring-1.6.0/lib/spring/binstub.rb:11:in `load'
from /Users/Rushal-Marketing/.rvm/gems/ruby-2.2.1/gems/spring-1.6.0/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/Rushal-Marketing/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/Rushal-Marketing/Desktop/pinter/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
Here is my Gemfile:
source 'https://rubygems.org'
ruby '2.2.1'
gem 'rails', '~> 4.2.5'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'devise', '~> 3.5.3'
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
gem 'byebug'
end
group :development do
gem 'web-console', '~> 2.0'
gem 'spring'
end
gem 'bootstrap-sass'
Any assistance with this would be much appreciated! Thanks!
You need to run the command
rails generate devise:install
You need to do it in your console
bundle install
Then
bundle exec rails generate devise:install
bundle exec rails generate device model_name
in your case model_name might be Install
First you have to bundle your gems:
bundle install
Then you have to install devise:
rails g devise:install
And then you have to restart the rails server:
Ctrl + C
$ rails s
I have this problem, which is when i try to start to start the rails server i get this:
=> Booting WEBrick
=> Rails 4.2.0 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:492:in `load_missing_constant': Circular dependency detected while autoloading constant AdminUser (RuntimeError)
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
from /Users/ludvigsorensen/Desktop/BackyardCoding/app/admin/admin_user.rb:1:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in `load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in `block in load_file'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:647:in `new_constants_in'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:456:in `load_file'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:354:in `require_or_load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:494:in `load_missing_constant'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:261:in `const_get'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:261:in `block in constantize'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:259:in `each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:259:in `inject'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:259:in `constantize'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:566:in `get'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:597:in `constantize'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise.rb:302:in `get'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:80:in `to'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:75:in `modules'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:92:in `routes'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:159:in `default_used_route'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:69:in `initialize'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise.rb:336:in `new'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise.rb:336:in `add_mapping'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/rails/routes.rb:224:in `block in devise_for'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/rails/routes.rb:223:in `each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.4.1/lib/devise/rails/routes.rb:223:in `devise_for'
from /Users/ludvigsorensen/Desktop/BackyardCoding/config/routes.rb:3:in `block in <top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:423:in `instance_exec'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:423:in `eval_block'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:401:in `draw'
from /Users/ludvigsorensen/Desktop/BackyardCoding/config/routes.rb:1:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
from /Users/ludvigsorensen/Desktop/backyardcoding/config/environment.rb:5:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /Users/ludvigsorensen/Desktop/backyardcoding/config.ru:3:in `block in <main>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /Users/ludvigsorensen/Desktop/backyardcoding/config.ru:in `new'
from /Users/ludvigsorensen/Desktop/backyardcoding/config.ru:in `<main>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:61:in `app'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:78:in `start'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/ludvigsorensen/Desktop/BackyardCoding/bin/rails:8:in `require'
from /Users/ludvigsorensen/Desktop/BackyardCoding/bin/rails:8:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client/rails.rb:28:in `load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client/rails.rb:28:in `call'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client/command.rb:7:in `call'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/client.rb:28:in `run'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/bin/spring:49:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/binstub.rb:11:in `load'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.4.0/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/ludvigsorensen/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/ludvigsorensen/Desktop/backyardcoding/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I think this might be related to active_admin btw here is my gem file.....
source 'https://rubygems.org'
gem 'bootstrap-sass', '~> 3.3.5.1'
gem 'devise', '~> 3.4.1'
gem 'toastr-rails'
gem 'activeadmin', github: 'activeadmin'
gem 'paperclip', '~> 4.2.1'
gem 'friendly_id', '~> 5.1.0'
gem 'active_admin-sortable_tree', '~> 0.2.1'
gem 'kaminari', '~> 0.16.3'
gem 'stripe', :git => 'https://github.com/stripe/stripe-ruby'
gem 'mandrill-api', '1.0.52', require: 'mandrill'
gem 'redcarpet', '~> 3.2.3'
gem 'coderay', '~> 1.1.0'
gem 'rails', '4.2.0'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
gem 'byebug'
gem 'web-console', '~> 2.0'
gem 'spring'
end
Do you know what i should do?
So i just fixed it myself. This answer helped me out: https://github.com/activeadmin/activeadmin/issues/2334#issuecomment-42626409
I just had to rename my models inside the app/admin directory to plural, fx with admin_user.rb. I renamed app/admin/admin_user.rb to app/admin/admin_users.rb, and then renamed the other files to plural as well.
I have installed ActiveAdmin(1.0.0.pre1), Paperclip(4.2.1) and Cucumber(1.4.2).
I am facing strange issue in my system when I do testing with cucumber.
I have a model with paperclip configuration and has method has_attached_file. However everything is working well, but I do testing with cucumber it raises error regarding active admin resource of that model.
Here is full error stack :
undefined method `has_attached_file' for Document (call 'Document.connection' to establish a connection):Class (NoMethodError)
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activerecord-4.2.1/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
/home/anand/rails_workspace_20_1_2015/MyApp/app/models/document.rb:7:in `<class:Document>'
/home/anand/rails_workspace_20_1_2015/MyApp/app/models/document.rb:2:in `<top (required)>'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:360:in `require_or_load'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:494:in `load_missing_constant'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:184:in `const_missing'
/home/anand/rails_workspace_20_1_2015/MyApp/app/admin/document.rb:2:in `<top (required)>'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/bundler/gems/activeadmin-28e8a8f36640/lib/active_admin/application.rb:197:in `block in load'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/bundler/gems/activeadmin-28e8a8f36640/lib/active_admin/error.rb:41:in `capture'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/bundler/gems/activeadmin-28e8a8f36640/lib/active_admin/application.rb:197:in `load'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/bundler/gems/activeadmin-28e8a8f36640/lib/active_admin/application.rb:189:in `block in load!'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/bundler/gems/activeadmin-28e8a8f36640/lib/active_admin/application.rb:189:in `each'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/bundler/gems/activeadmin-28e8a8f36640/lib/active_admin/application.rb:189:in `load!'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/bundler/gems/activeadmin-28e8a8f36640/lib/active_admin/application.rb:211:in `routes'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/bundler/gems/activeadmin-28e8a8f36640/lib/active_admin.rb:79:in `routes'
/home/anand/rails_workspace_20_1_2015/MyApp/config/routes.rb:2:in `block in <top (required)>'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:432:in `instance_exec'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:432:in `eval_block'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:410:in `draw'
/home/anand/rails_workspace_20_1_2015/MyApp/config/routes.rb:1:in `<top (required)>'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `each'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/file_update_checker.rb:75:in `call'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/activesupport-4.2.1/lib/active_support/file_update_checker.rb:75:in `execute'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:27:in `updater'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/railties-4.2.1/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/anand/.rvm/rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
/home/anand/.rvm/rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/home/anand/.rvm/rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/tsort.rb:427:in `each_strongly_connected_component_from'
/home/anand/.rvm/rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
/home/anand/.rvm/rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/tsort.rb:345:in `each'
/home/anand/.rvm/rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/tsort.rb:345:in `call'
/home/anand/.rvm/rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
/home/anand/.rvm/rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
/home/anand/.rvm/rubies/ruby-2.2.0-preview1/lib/ruby/2.2.0/tsort.rb:205:in `tsort_each'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/cucumber-rails-1.4.2/lib/cucumber/rails/application.rb:15:in `initialize!'
/home/anand/rails_workspace_20_1_2015/MyApp/config/environment.rb:5:in `<top (required)>'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/cucumber-rails-1.4.2/lib/cucumber/rails.rb:7:in `require'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/cucumber-rails-1.4.2/lib/cucumber/rails.rb:7:in `<top (required)>'
/home/anand/rails_workspace_20_1_2015/MyApp/features/support/env.rb:8:in `require'
/home/anand/rails_workspace_20_1_2015/MyApp/features/support/env.rb:8:in `<top (required)>'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/cucumber-1.3.19/lib/cucumber/rb_support/rb_language.rb:95:in `load'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/cucumber-1.3.19/lib/cucumber/rb_support/rb_language.rb:95:in `load_code_file'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:180:in `load_file'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:82:in `each'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/cucumber-1.3.19/lib/cucumber/runtime.rb:184:in `load_step_definitions'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/cucumber-1.3.19/lib/cucumber/runtime.rb:42:in `run!'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/cucumber-1.3.19/lib/cucumber/cli/main.rb:47:in `execute!'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/gems/cucumber-1.3.19/bin/cucumber:13:in `<top (required)>'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/bin/cucumber:23:in `load'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/bin/cucumber:23:in `<main>'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/bin/ruby_executable_hooks:15:in `eval'
/home/anand/.rvm/gems/ruby-2.2.0-preview1/bin/ruby_executable_hooks:15:in `<main>'
Gemfile :
source 'https://rubygems.org'
gem 'devise'
gem 'mysql2'
gem 'cancancan'
gem 'activeadmin' , github: "activeadmin"
gem 'paperclip'
gem 'paper_trail'
gem 'rails', '4.2.1'
gem 'jquery-rails'
group :development, :test do
gem 'byebug'
gem 'pry-byebug'
gem 'pry-stack_explorer'
gem 'pry-rails'
gem 'pry-doc'
gem 'web-console', '~> 2.0'
gem 'spring'
gem 'factory_girl_rails'
gem 'capybara'
gem 'database_cleaner'
gem 'cucumber-rails', require: false
gem 'rspec-rails'
end
Model :
class Document < ActiveRecord::Base
belongs_to :user
has_paper_trail
has_attached_file :doc, :default_url => "/images/:style/missing.png"
validates_attachment :doc, content_type: {:content_type => ["application/pdf", /\Aimage\/.*\Z/ ] }
end
ActiveAdmin resource :
ActiveAdmin.register_page "Document" do
end
What is the reason to getting this problem ? I have tried searching all the resource from google and may other way to trace it. And finally I have posted here. Need suggestion. Thank you.
After checking all files and experiments, I finally found the solution. The problem was paperclip.rb file in Rails.root/lib folder. The file contains no content but it creates problem while I was running cucumber. So I deleted that file and all works. Let's hope this helps to other :-)