I try to integrate piggybak in my rails application, using the example initializer for rails_admin from
https://github.com/piggybak/demo/blob/master/config/initializers/rails_admin.rb
When I try to start up the server I get the following error:
/home/dumand/Desktop/Projects/3dgreen/config/initializers/rails_admin.rb:32:in block (2 levels) in <top (required)>': undefined methodnestable' for RailsAdmin::Config::Actions:Module (NoMethodError)
This is the server log:
/home/dumand/Desktop/Projects/3dgreen/config/initializers/rails_admin.rb:32:in `block (2 levels) in <top (required)>': undefined method `nestable' for RailsAdmin::Config::Actions:Module (NoMethodError)
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/rails_admin-0.6.3/lib/rails_admin/config.rb:239:in `instance_eval'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/rails_admin-0.6.3/lib/rails_admin/config.rb:239:in `actions'
from /home/dumand/Desktop/Projects/3dgreen/config/initializers/rails_admin.rb:21:in `block in <top (required)>'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/rails_admin-0.6.3/lib/rails_admin.rb:29:in `call'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/rails_admin-0.6.3/lib/rails_admin.rb:29:in `config'
from /home/dumand/Desktop/Projects/3dgreen/config/initializers/rails_admin.rb:1:in `<top (required)>'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:609:in `block (2 levels) in <class:Engine>'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `each'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `block in <class:Engine>'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/dumand/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /home/dumand/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /home/dumand/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
from /home/dumand/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /home/dumand/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child'
from /home/dumand/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `call'
from /home/dumand/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
from /home/dumand/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /home/dumand/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /home/dumand/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /home/dumand/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /home/dumand/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /home/dumand/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/dumand/Desktop/Projects/3dgreen/config/environment.rb:5:in `<top (required)>'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /home/dumand/Desktop/Projects/3dgreen/config.ru:3:in `block in <main>'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /home/dumand/Desktop/Projects/3dgreen/config.ru:in `new'
from /home/dumand/Desktop/Projects/3dgreen/config.ru:in `<main>'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands/server.rb:48:in `app'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands/server.rb:75:in `start'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (required)>'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
from /home/dumand/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
and here is rails_admin initializer:
RailsAdmin.config do |config|
config.main_app_name = ["3D Green"]
### Popular gems integration
## == Devise ==
# config.authenticate_with do
# warden.authenticate! scope: :user
# end
# config.current_user_method(&:current_user)
## == Cancan ==
# config.authorize_with :cancan
## == PaperTrail ==
# config.audit_with :paper_trail, 'User', 'PaperTrail::Version' # PaperTrail >= 3.0.0
### More at https://github.com/sferik/rails_admin/wiki/Base-configuration
config.actions do
dashboard # mandatory
index # mandatory
new
export
bulk_delete
show
edit
delete
show_in_app
nestable do
visible do
[::PiggybakTaxonomy::NavigationNode].include? bindings[:abstract_model].model
end
end
## With an audit adapter, you can add:
# history_index
# history_show
config.model Product do
edit do
include_all_fields
end
end
end
end
Try it with removing nestable taxanomy code because it seems that you didn't uses nested taxanomy as per your models also
Related
I am trying to connect the Log4r with the silence logger from active support with
Log4r.send :include,
ActiveRecord::SessionStore::Extension::LoggerSilencer
But now I get this error if I try to start the server :
I tried it with
require 'active_support/all'
in my session_store.rb and log4r.rb, but always get the same error. Anyone with an idea how to fix this ?
C:/Ruby200/lib/ruby/gems/2.0.0/gems/activerecord-session_store-1.0.0/lib/active_record/session_store/extension/logger_silencer.rb:16:in `block in <module:LoggerSilencer>': undefined method `cattr_accessor' for Log4r:Module (NoMethodError)
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/concern.rb:114:in `class_eval'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/concern.rb:114:in `append_features'
from C:/SVN/FOS/branches/FOS_5_0/config/initializers/session_store.rb:4:in `include'
from C:/SVN/FOS/branches/FOS_5_0/config/initializers/session_store.rb:4:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:223:in `load'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:223:in `block in load'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:214:in `load_dependency'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:223:in `load'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/engine.rb:609:in `block (2 levels) in <class:Engine>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/engine.rb:608:in `each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/engine.rb:608:in `block in <class:Engine>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/initializable.rb:30:in `instance_exec'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/initializable.rb:30:in `run'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/initializable.rb:44:in `each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/initializable.rb:44:in `tsort_each_child'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:180:in `each'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/initializable.rb:54:in `run_initializers'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/application.rb:215:in `initialize!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
from C:/SVN/FOS/branches/FOS_5_0/config/environment.rb:7:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `block in require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:214:in `load_dependency'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
from C:/SVN/FOS/branches/FOS_5_0/config.ru:3:in `block in <main>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
from C:/SVN/FOS/branches/FOS_5_0/config.ru:in `new'
from C:/SVN/FOS/branches/FOS_5_0/config.ru:in `<main>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `eval'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `new_from_string'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:40:in `parse_file'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/server.rb:199:in `app'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/commands/server.rb:48:in `app'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/server.rb:314:in `wrapped_app'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/commands/server.rb:75:in `start'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/commands.rb:76:in `block in <top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/commands.rb:71:in `tap'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/commands.rb:71:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
cattr_accessor should be attr_accessor in the logger_silencer.rb file on line 16. Im pretty sure thats it, let use know if it's not.
Solution:
I update my Log4r because the old version I use was not compatible with the new rails. Now it works.
I am trying to deploy an existing heroku app to EC2 using Beanstalk.
So far I have all the Environment variables moved over and the database setup.. etc. It seems to work and deploy correct except for Puma.
The puma.log file has the following in it over and over;
/opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/pathname.rb:397:in `initialize': no implicit conversion of nil into String (TypeError)
from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/pathname.rb:397:in `new'
from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/pathname.rb:397:in `join'
from /var/app/current/config/initializers/cloudfront-signer.rb:2:in `block in <top (required)>'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/cloudfront-signer-2.2.0/lib/cloudfront-signer.rb:108:in `configure'
from /var/app/current/config/initializers/cloudfront-signer.rb:1:in `<top (required)>'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:420:in `block (2 levels) in each_strongly_connected_component_from'
from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:419:in `block in each_strongly_connected_component_from'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:413:in `call'
from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:413:in `each_strongly_connected_component_from'
from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
from /var/app/current/config/environment.rb:5:in `<top (required)>'
from config.ru:3:in `require'
from config.ru:3:in `block in <main>'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from config.ru:in `new'
from config.ru:in `<main>'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/puma-2.11.2/lib/puma/configuration.rb:102:in `load_rackup'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/puma-2.11.2/lib/puma/configuration.rb:69:in `app'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/puma-2.11.2/lib/puma/runner.rb:123:in `app'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/puma-2.11.2/lib/puma/runner.rb:130:in `start_server'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/puma-2.11.2/lib/puma/cluster.rb:213:in `worker'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/puma-2.11.2/lib/puma/cluster.rb:109:in `block (2 levels) in spawn_workers'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/puma-2.11.2/lib/puma/cluster.rb:109:in `fork'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/puma-2.11.2/lib/puma/cluster.rb:109:in `block in spawn_workers'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/puma-2.11.2/lib/puma/cluster.rb:105:in `times'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/puma-2.11.2/lib/puma/cluster.rb:105:in `spawn_workers'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/puma-2.11.2/lib/puma/cluster.rb:157:in `check_workers'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/puma-2.11.2/lib/puma/cluster.rb:421:in `run'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/puma-2.11.2/lib/puma/cli.rb:216:in `run'
from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/puma-2.11.2/bin/puma:10:in `<top (required)>'
from /opt/rubies/ruby-2.2.2/bin/puma:23:in `load'
from /opt/rubies/ruby-2.2.2/bin/puma:23:in `<main>'
I have no clue what this is or why its happening and am at a complete loss..
Line 5 of config/environment is Rails.application.initialize!
Line 3 of config.ru is run Rails.application
So does this mean that Rails.application hasn't been defined? I'm a tad confused.
Again this app works perfectly on Heroku.
Suggestions?
I have installed the Rspec and trying to run the first test for the models but I am getting this error
.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/uri/generic.rb:214:in `initialize': the scheme redis does not accept registry part: : (or bad hostname?) (URI::InvalidURIError)
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/uri/common.rb:218:in `new'
before the test starts running. I am using Redis and Sidekick in my project. Does anyone know how to get over this hump? Thanks
EDIT: full backtrace
ewamarciniak$ bundle exec rspec spec/models/message_spec.rb
/Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/bundler-1.7.2/lib/bundler/runtime.rb:222: warning: Insecure world writable dir /usr in PATH, mode 040777
/Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/bundler-1.7.2/lib/bundler/runtime.rb:222: warning: Insecure world writable dir /usr in PATH, mode 040777
/Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/uri/generic.rb:214:in `initialize': the scheme redis does not accept registry part: : (or bad hostname?) (URI::InvalidURIError)
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/uri/common.rb:218:in `new'
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/uri/common.rb:218:in `parse'
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/uri/common.rb:747:in `parse'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/redis_connection.rb:60:in `log_info'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/redis_connection.rb:19:in `create'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/sidekiq-3.3.0/lib/sidekiq.rb:83:in `redis='
from /Users/ewamarciniak/Documents/Projects/popdeem-server/config/initializers/sidekiq.rb:14:in `block in <top (required)>'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/sidekiq-3.3.0/lib/sidekiq.rb:63:in `configure_client'
from /Users/ewamarciniak/Documents/Projects/popdeem-server/config/initializers/sidekiq.rb:13:in `<top (required)>'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `load'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `block in load'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `load'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:648:in `block in load_config_initializer'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.1/lib/active_support/notifications.rb:161:in `instrument'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:647:in `load_config_initializer'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:611:in `each'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:611:in `block in <class:Engine>'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/railties-4.1.1/lib/rails/initializable.rb:44:in `each'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/railties-4.1.1/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `call'
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /Users/ewamarciniak/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/railties-4.1.1/lib/rails/railtie.rb:194:in `public_send'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/railties-4.1.1/lib/rails/railtie.rb:194:in `method_missing'
from /Users/ewamarciniak/Documents/Projects/popdeem-server/config/environment.rb:5:in `<top (required)>'
from /Users/ewamarciniak/Documents/Projects/popdeem-server/spec/rails_helper.rb:4:in `require'
from /Users/ewamarciniak/Documents/Projects/popdeem-server/spec/rails_helper.rb:4:in `<top (required)>'
from /Users/ewamarciniak/Documents/Projects/popdeem-server/spec/models/message_spec.rb:1:in `require'
from /Users/ewamarciniak/Documents/Projects/popdeem-server/spec/models/message_spec.rb:1:in `<top (required)>'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/rspec-core-3.2.1/lib/rspec/core/configuration.rb:1226:in `load'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/rspec-core-3.2.1/lib/rspec/core/configuration.rb:1226:in `block in load_spec_files'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/rspec-core-3.2.1/lib/rspec/core/configuration.rb:1224:in `each'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/rspec-core-3.2.1/lib/rspec/core/configuration.rb:1224:in `load_spec_files'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/rspec-core-3.2.1/lib/rspec/core/runner.rb:97:in `setup'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/rspec-core-3.2.1/lib/rspec/core/runner.rb:85:in `run'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/rspec-core-3.2.1/lib/rspec/core/runner.rb:70:in `run'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/rspec-core-3.2.1/lib/rspec/core/runner.rb:38:in `invoke'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/gems/rspec-core-3.2.1/exe/rspec:4:in `<top (required)>'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/bin/rspec:23:in `load'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/bin/rspec:23:in `<main>'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
from /Users/ewamarciniak/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
EDIT: config/initializers/sidekiq.rb
rails_root = Rails.root || File.dirname(__FILE__) + '/../..'
rails_env = Rails.env || 'development'
redis_config = YAML.load_file(rails_root.to_s + '/config/redis.yml')
redis_config.merge! redis_config.fetch(Rails.env, {})
redis_config.symbolize_keys!
Sidekiq.configure_server do |config|
config.redis = { :url => "redis://#{redis_config[:host]}:#{redis_config[:port]}/12", :namespace => 'Sidekiq' }
end
Sidekiq.configure_client do |config|
config.redis = { :url => "redis://#{redis_config[:host]}:#{redis_config[:port]}/12", :namespace => 'Sidekiq' }
end
redis_config[:host] and redis_config[:port] is nil or empty. Seems like these configuration options is undefined in your config/redis.yml.
Any got any idea why, on my production server I can't use nested concerns in model?
I have a model Landing
class Landing < ActiveRecord::Base
include Claimable
end
and concern
module Claimable
extend ActiveSupport::Concern
end
Everything is working fine, but Claimable is stricly Landing logic so I would like to put it a nested route
class Landing < ActiveRecord::Base
include Landing::Claimable
end
and
module Landing::Claimable
extend ActiveSupport::Concern
end
This is working on my developement machine (OSX Yosemite), but when I deploy to a Linux production server I receive error:
/home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:492:in `load_missing_constant': Circular dependency detected while autoloading constant Landing::Claimable (RuntimeError)
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/app/models/landing.rb:20:in `<class:Landing>'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/app/models/landing.rb:18:in `<top (required)>'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:360:in `require_or_load'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:494:in `load_missing_constant'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/app/models/concerns/landing/claimable.rb:1:in `<top (required)>'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:360:in `require_or_load'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:317:in `depend_on'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:233:in `require_dependency'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `each'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `block in eager_load!'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `each'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `eager_load!'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:346:in `eager_load!'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `each'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
from /home/app/app/current/config/environment.rb:5:in `<top (required)>'
from /home/app/app/current/config.ru:3:in `require'
from /home/app/app/current/config.ru:3:in `block in <main>'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `instance_eval'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `initialize'
from /home/app/app/current/config.ru:1:in `new'
from /home/app/app/current/config.ru:1:in `<main>'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/rack/adapter/loader.rb:33:in `eval'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/rack/adapter/loader.rb:33:in `load'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/rack/adapter/loader.rb:42:in `for'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/thin/controllers/controller.rb:170:in `load_adapter'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/thin/controllers/controller.rb:74:in `start'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/thin/runner.rb:200:in `run_command'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/lib/thin/runner.rb:156:in `run!'
from /home/app/app/releases/a34cd4a786d8f6c35179fb8eebc34469f471192a/vendor/bundle/ruby/2.1.0/gems/thin-1.6.3/bin/thin:6:in `<top (required)>'
from /home/app/app/releases/68f6492bb01f28373b95f26f34b609fdb99dc9cd/vendor/bundle/bin/thin:16:in `load'
from /home/app/app/releases/68f6492bb01f28373b95f26f34b609fdb99dc9cd/vendor/bundle/bin/thin:16:in `<main>'
This usually has to do with your config.eager_load settings on your application. You have a different setting in the production environment from the development one, which is perfectly normal and the intended use, but that's why you experience different behaviors from development to production.
As a possible solution, I suggest you avoid using the one-line namespaced class definition and change it to multiple lines instead.
Try changing:
module Landing::Claimable
end
to:
module Landing
module Claimable
end
end
I use devise and omniauth in my Rails 4 app. I did all actions from this page (from answer):
Devise, Omniauth and Facebook integration session error
After adding this :omniauthable into
this string
devise :database_authenticatable, :registerable, :confirmable,
:recoverable, :rememberable, :trackable, :validatable
, i'm getting error:
/home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:193:in `normalize_conditions!': You should not use the `match` method in your router without specifying an HTTP method. (RuntimeError)
If you want to expose your action to GET, use `get` in the router:
Instead of: match "controller#action"
Do: get "controller#action"
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:64:in `initialize'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:1425:in `new'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:1425:in `add_route'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:1404:in `decomposed_match'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:1386:in `block in match'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:1386:in `each'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:1386:in `match'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:365:in `devise_omniauth_callback'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:212:in `block (4 levels) in devise_for'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:212:in `each'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:212:in `block (3 levels) in devise_for'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:376:in `with_devise_exclusive_scope'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:211:in `block (2 levels) in devise_for'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:311:in `block in devise_scope'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:833:in `block in constraints'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:716:in `scope'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:833:in `constraints'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:310:in `devise_scope'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:209:in `block in devise_for'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:192:in `each'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:192:in `devise_for'
from /home/u164/nikita/projects/domain-inspect/config/routes.rb:2:in `block in <top (required)>'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/route_set.rb:320:in `instance_exec'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/route_set.rb:320:in `eval_block'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/route_set.rb:298:in `draw'
from /home/u164/nikita/projects/domain-inspect/config/routes.rb:1:in `<top (required)>'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:222:in `load'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:222:in `block in load'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:222:in `load'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/routes_reloader.rb:40:in `each'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/file_update_checker.rb:75:in `call'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/file_update_checker.rb:75:in `execute'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/routes_reloader.rb:27:in `updater'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:30:in `instance_exec'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:30:in `run'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/u164/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each'
from /home/u164/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /home/u164/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from'
from /home/u164/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component'
from /home/u164/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/tsort.rb:180:in `each'
from /home/u164/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component'
from /home/u164/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:54:in `run_initializers'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application.rb:213:in `initialize!'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/u164/nikita/projects/domain-inspect/config/environment.rb:5:in `<top (required)>'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:228:in `require'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:228:in `block in require'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:228:in `require'
from /home/u164/nikita/projects/domain-inspect/config.ru:3:in `block in <main>'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /home/u164/nikita/projects/domain-inspect/config.ru:in `new'
from /home/u164/nikita/projects/domain-inspect/config.ru:in `<main>'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/commands/server.rb:46:in `app'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/commands/server.rb:71:in `start'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/commands.rb:78:in `block in <top (required)>'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/commands.rb:73:in `tap'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
What should I do? Or there is now way to use devise in rail 4 apps?
UPD 1
Here is my routes.rb
DomainInspect::Application.routes.draw do
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" ,:registrations => "registrations" }
root :to => 'pages#main'
resources :users, only: [:show, :edit, :update]
resources :domains
end
Rails 4 isn't currently supported in the latest release of devise (v2.2.3 as of this writing). However there is currently an active pull request open.
So until this gets merged and released into the wild, you can point your Gemfile to use it with the following:
gem 'devise', :github => 'plataformatec/devise', :branch => 'rails4'