Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Version 0.1.3 breaks Namespaced routes in my app #23

Closed
ckuwanoe opened this issue Jun 10, 2014 · 1 comment
Closed

Version 0.1.3 breaks Namespaced routes in my app #23

ckuwanoe opened this issue Jun 10, 2014 · 1 comment

Comments

@ckuwanoe
Copy link

I'm new to using fastly and this is probably a super edge case, but I had an issue over the past few days that broke an app of mine. It's a rails 4.1 app that is multi-tenant using postgresql scemas.

I had a machine failure, so I needed to build my dev environment from scratch again and while restoring my dev environment I ran into several issues using this version 0.1.3 of the gem. When I first did bundle on the new machine, I was prompted that fastly 1.02 doesn't exist in any of the sources. So I ran bundle update --sources fastly-rails which then updated my gemfile to the latest fastly. This then manifested itself in two different ways:

  1. On my dev environment OSX 10.9.3 (on both my mac pro and macbook pro) any namespaced controller (including devise) throws a 'Uninitialized Constant error'. All other controllers seem to route just fine. Here's an example of the error
Started GET "/d/users/sign_in" for 127.0.0.1 at 2014-06-10 13:18:33 -0700

ActionController::RoutingError - uninitialized constant Devise::SessionsController:
  actionpack (4.1.0) lib/action_dispatch/routing/route_set.rb:69:in `rescue in controller'
  actionpack (4.1.0) lib/action_dispatch/routing/route_set.rb:64:in `controller'
  actionpack (4.1.0) lib/action_dispatch/routing/route_set.rb:44:in `call'
  actionpack (4.1.0) lib/action_dispatch/routing/mapper.rb:45:in `call'
  actionpack (4.1.0) lib/action_dispatch/journey/router.rb:71:in `block in call'
  actionpack (4.1.0) lib/action_dispatch/journey/router.rb:59:in `call'
  actionpack (4.1.0) lib/action_dispatch/routing/route_set.rb:676:in `call'
  meta_request (0.2.9) lib/meta_request/middlewares/app_request_handler.rb:13:in `call'
  rack-contrib (1.1.0) lib/rack/contrib/response_headers.rb:17:in `call'
  meta_request (0.2.9) lib/meta_request/middlewares/headers.rb:16:in `call'
  meta_request (0.2.9) lib/meta_request/middlewares/meta_request_handler.rb:13:in `call'
  bullet (4.8.0) lib/bullet/rack.rb:10:in `call'
  request_store (1.0.5) lib/request_store/middleware.rb:9:in `call'
  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.3) lib/warden/manager.rb:34:in `call'
  rack (1.5.2) lib/rack/etag.rb:23:in `call'
  rack (1.5.2) lib/rack/conditionalget.rb:25:in `call'
  rack (1.5.2) lib/rack/head.rb:11:in `call'
  remotipart (1.2.1) lib/remotipart/middleware.rb:27:in `call'
  actionpack (4.1.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  actionpack (4.1.0) lib/action_dispatch/middleware/flash.rb:254:in `call'
  rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
  rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
  actionpack (4.1.0) lib/action_dispatch/middleware/cookies.rb:560:in `call'
  activerecord (4.1.0) lib/active_record/query_cache.rb:36:in `call'
  activerecord (4.1.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
  activerecord (4.1.0) lib/active_record/migration.rb:380:in `call'
  actionpack (4.1.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (4.1.0) lib/active_support/callbacks.rb:82:in `run_callbacks'
  actionpack (4.1.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (4.1.0) lib/action_dispatch/middleware/reloader.rb:73:in `call'
  actionpack (4.1.0) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
  better_errors (1.1.0) lib/better_errors/middleware.rb:84:in `protected_app_call'
  better_errors (1.1.0) lib/better_errors/middleware.rb:79:in `better_errors_call'
  better_errors (1.1.0) lib/better_errors/middleware.rb:56:in `call'
  actionpack (4.1.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  actionpack (4.1.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.1.0) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.1.0) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.1.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.1.0) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.1.0) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.1.0) lib/rails/rack/logger.rb:20:in `call'
  quiet_assets (1.0.2) lib/quiet_assets.rb:18:in `call_with_quiet_assets'
  actionpack (4.1.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
  rack (1.5.2) lib/rack/runtime.rb:17:in `call'
  activesupport (4.1.0) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  actionpack (4.1.0) lib/action_dispatch/middleware/static.rb:64:in `call'
  rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
  rack-mini-profiler (0.9.1) lib/mini_profiler/profiler.rb:300:in `call'
  railties (4.1.0) lib/rails/engine.rb:514:in `call'
  railties (4.1.0) lib/rails/application.rb:144:in `call'
  /Users/eschalon/Library/Application Support/Pow/Versions/0.4.3/node_modules/nack/lib/nack/server.rb:155:in `handle'
  /Users/eschalon/Library/Application Support/Pow/Versions/0.4.3/node_modules/nack/lib/nack/server.rb:109:in `rescue in block (2 levels) in start'
  /Users/eschalon/Library/Application Support/Pow/Versions/0.4.3/node_modules/nack/lib/nack/server.rb:106:in `block (2 levels) in start'
  /Users/eschalon/Library/Application Support/Pow/Versions/0.4.3/node_modules/nack/lib/nack/server.rb:96:in `block in start'
  /Users/eschalon/Library/Application Support/Pow/Versions/0.4.3/node_modules/nack/lib/nack/server.rb:76:in `start'
  /Users/eschalon/Library/Application Support/Pow/Versions/0.4.3/node_modules/nack/lib/nack/server.rb:12:in `run'
  /Users/eschalon/Library/Application Support/Pow/Versions/0.4.3/node_modules/nack/bin/nack_worker:4:in `<main>'
  1. On my staging environment (Ubuntu 13.10) any namespaced controller throws a ActionView::MissingTemplate error like such
An ActionView::MissingTemplate occurred in sessions#new: 

Missing template users/sessions/new, devise::_sessions/new, devise/new, application/new with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee, :haml]}. Searched in: 
* "/home/deployer/apps/blocks/releases/20140609015205/app/views" 
* "/home/deployer/apps/blocks/shared/bundle/ruby/1.9.1/gems/the_sortable_tree-2.3.3/app/views" 
* "/home/deployer/apps/blocks/shared/bundle/ruby/1.9.1/bundler/gems/the_role_bootstrap3_ui-22e1797c0bad/app/views" 
* "/home/deployer/apps/blocks/shared/bundle/ruby/1.9.1/gems/devise-3.2.4/app/views" 
* "/home/deployer/apps/blocks/shared/bundle/ruby/1.9.1/bundler/gems/twitter-bootstrap-rails-cee3c805830b/app/views" 

app/models/tenant.rb:61:in `scope_schema' 

For now, I've commented out the fastly gem and my app is working again. I'd love to use it again, so if there's any other information you need from me to help track down the cause of this please let me know.

@ezkl
Copy link
Contributor

ezkl commented Jun 12, 2014

Sorry for the inconvenience. New versions of both gems have been released.

@ezkl ezkl closed this as completed Jun 12, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants