我正在开发基于狂欢的应用程序和几个插件。 使用heroku时,我收到HTTP / 1.1 500内部服务器错误。
undefined method `translations' for nil:NilClass
localhost上的开发环境正在运行。只有在推送到heroku后才会收到此错误。
heroku log(已编辑)
2013-10-09T16:04:14.572469+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2013-10-09T16:04:14.572469+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2013-10-09T16:04:14.572234+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/middleware/cookies.rb:486:in `call'
2013-10-09T16:04:14.572234+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activerecord-4.0.0/lib/active_record/query_cache.rb:36:in `call'
2013-10-09T16:04:14.572234+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
2013-10-09T16:04:14.572469+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2013-10-09T16:04:14.572469+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:373:in `_run__347425213395248139__call__callbacks'
2013-10-09T16:04:14.572469+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/rack/logger.rb:21:in `block in call'
2013-10-09T16:04:14.572469+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:67:in `block in tagged'
2013-10-09T16:04:14.572916+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:25:in `tagged'
2013-10-09T16:04:14.572916+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:67:in `tagged'
2013-10-09T16:04:14.572916+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/rack/logger.rb:21:in `call'
2013-10-09T16:04:14.572916+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2013-10-09T16:04:14.572916+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/application.rb:97:in `call'
2013-10-09T16:04:14.573291+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2013-10-09T16:04:14.573291+00:00 app[web.1]:
2013-10-09T16:04:14.604783+00:00 app[web.1]: Rendered vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_source.erb (1.0ms)
2013-10-09T16:04:14.573291+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2013-10-09T16:04:14.573291+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2013-10-09T16:04:14.604783+00:00 app[web.1]: Rendered vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_source.erb (1.0ms)
2013-10-09T16:04:14.573291+00:00 app[web.1]: vendor/ruby-1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
2013-10-09T16:04:14.573291+00:00 app[web.1]: vendor/ruby-1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
2013-10-09T16:04:14.573291+00:00 app[web.1]: vendor/ruby-1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
2013-10-09T16:04:14.573291+00:00 app[web.1]:
2013-10-09T16:04:14.739784+00:00 heroku[router]: at=info method=GET path=/ host=warm-tor-1570.herokuapp.com fwd="54.225.15.95" dyno=web.1 connect=1ms service=208ms status=500 bytes=21198
2013-10-09T16:04:14.535855+00:00 app[web.1]: Started GET "/" for 54.225.15.95 at 2013-10-09 16:04:14 +0000
2013-10-09T16:04:14.542105+00:00 app[web.1]: [1m[35mSpree::Page Load (1.6ms)[0m SELECT "spree_pages".* FROM "spree_pages" WHERE "spree_pages"."visible" = 't' AND (("spree_pages"."slug" IS NULL OR "spree_pages"."slug" = '/')) ORDER BY position ASC LIMIT 1
2013-10-09T16:04:14.544130+00:00 app[web.1]: [1m[36mCACHE (0.0ms)[0m [1mSELECT "spree_pages".* FROM "spree_pages" WHERE "spree_pages"."visible" = 't' AND (("spree_pages"."slug" IS NULL OR "spree_pages"."slug" = '/')) ORDER BY position ASC LIMIT 1[0m
2013-10-09T16:04:14.535855+00:00 app[web.1]: Started GET "/" for 54.225.15.95 at 2013-10-09 16:04:14 +0000
2013-10-09T16:04:14.545620+00:00 app[web.1]: [1m[35mCACHE (0.0ms)[0m SELECT "spree_pages".* FROM "spree_pages" WHERE "spree_pages"."visible" = 't' AND (("spree_pages"."slug" IS NULL OR "spree_pages"."slug" = '/')) ORDER BY position ASC LIMIT 1
2013-10-09T16:04:14.547785+00:00 app[web.1]: Processing by Spree::HomeController#index as */*
2013-10-09T16:04:14.544130+00:00 app[web.1]: [1m[36mCACHE (0.0ms)[0m [1mSELECT "spree_pages".* FROM "spree_pages" WHERE "spree_pages"."visible" = 't' AND (("spree_pages"."slug" IS NULL OR "spree_pages"."slug" = '/')) ORDER BY position ASC LIMIT 1[0m
2013-10-09T16:04:14.545777+00:00 app[web.1]: [1m[35mCACHE (0.0ms)[0m SELECT "spree_pages".* FROM "spree_pages" WHERE "spree_pages"."visible" = 't' AND (("spree_pages"."slug" IS NULL OR "spree_pages"."slug" = '/')) ORDER BY position ASC LIMIT 1
2013-10-09T16:04:14.542105+00:00 app[web.1]: [1m[35mSpree::Page Load (1.6ms)[0m SELECT "spree_pages".* FROM "spree_pages" WHERE "spree_pages"."visible" = 't' AND (("spree_pages"."slug" IS NULL OR "spree_pages"."slug" = '/')) ORDER BY position ASC LIMIT 1
2013-10-09T16:04:14.567247+00:00 app[web.1]:
2013-10-09T16:04:14.559828+00:00 app[web.1]: [1m[36mSQL (1.5ms)[0m [1mSELECT DISTINCT "spree_taxons".id, "spree_taxons"."id" AS alias_0 FROM "spree_taxons" LEFT OUTER JOIN "spree_taxon_translations" ON "spree_taxon_translations"."spree_taxon_id" = "spree_taxons"."id" WHERE "spree_taxon_translations"."name" = 'Slider' AND "spree_taxon_translations"."locale" = 'de' AND (spree_taxon_translations.name IS NOT NULL) ORDER BY "spree_taxons"."id" ASC LIMIT 1[0m
2013-10-09T16:04:14.567247+00:00 app[web.1]: NoMethodError (undefined method `translations' for nil:NilClass):
2013-10-09T16:04:14.561469+00:00 app[web.1]: Completed 500 Internal Server Error in 13ms
2013-10-09T16:04:14.567247+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/spree_fancy-3a8a1796e8ef/app/controllers/spree/home_controller_decorator.rb:4:in `index'
2013-10-09T16:04:14.567247+00:00 app[web.1]: (eval):2:in `first'
2013-10-09T16:04:14.567247+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
2013-10-09T16:04:14.567247+00:00 app[web.1]: (eval):2:in `tap'
2013-10-09T16:04:14.561325+00:00 app[web.1]: Completed 500 Internal Server Error in 13ms
2013-10-09T16:04:14.567453+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:493:in `_run__3801270098307990630__process_action__callbacks'
2013-10-09T16:04:14.567247+00:00 app[web.1]: (eval):4:in `block in first'
2013-10-09T16:04:14.567247+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
2013-10-09T16:04:14.567453+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/abstract_controller/callbacks.rb:17:in `process_action'
2013-10-09T16:04:14.567247+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_controller/metal/rendering.rb:10:in `process_action'
2013-10-09T16:04:14.568269+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
2013-10-09T16:04:14.568764+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'
2013-10-09T16:04:14.568764+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
2013-10-09T16:04:14.547612+00:00 app[web.1]: Processing by Spree::HomeController#index as */*
2013-10-09T16:04:14.568269+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
2013-10-09T16:04:14.568961+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:373:in `_run__347425213395248139__call__callbacks'
2013-10-09T16:04:14.568269+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:164:in `call'
2013-10-09T16:04:14.568764+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
2013-10-09T16:04:14.568961+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2013-10-09T16:04:14.570558+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bundler/gems/spree_fancy-3a8a1796e8ef/app/controllers/spree/home_controller_decorator.rb:4:in `index'
2013-10-09T16:04:14.568269+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
2013-10-09T16:04:14.559828+00:00 app[web.1]: [1m[36mSQL (1.5ms)[0m [1mSELECT DISTINCT "spree_taxons".id, "spree_taxons"."id" AS alias_0 FROM "spree_taxons" LEFT OUTER JOIN "spree_taxon_translations" ON "spree_taxon_translations"."spree_taxon_id" = "spree_taxons"."id" WHERE "spree_taxon_translations"."name" = 'Slider' AND "spree_taxon_translations"."locale" = 'de' AND (spree_taxon_translations.name IS NOT NULL) ORDER BY "spree_taxons"."id" ASC LIMIT 1[0m
2013-10-09T16:04:14.568764+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
2013-10-09T16:04:14.569436+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/engine.rb:511:in `call'
2013-10-09T16:04:14.567247+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/abstract_controller/base.rb:189:in `process_action'
2013-10-09T16:04:14.570558+00:00 app[web.1]: (eval):2:in `first'
2013-10-09T16:04:14.569651+00:00 app[web.1]: vendor/ruby-1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
2013-10-09T16:04:14.570558+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
2013-10-09T16:04:14.571568+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:59:in `each'
2013-10-09T16:04:14.570558+00:00 app[web.1]: NoMethodError (undefined method `translations' for nil:NilClass):
2013-10-09T16:04:14.571718+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:164:in `call'
2013-10-09T16:04:14.571568+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:655:in `call'
2013-10-09T16:04:14.571568+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:59:in `each'
2013-10-09T16:04:14.570558+00:00 app[web.1]:
2013-10-09T16:04:14.570942+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:48:in `call'
2013-10-09T16:04:14.571718+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
2013-10-09T16:04:14.569651+00:00 app[web.1]:
2013-10-09T16:04:14.571568+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:59:in `call'
2013-10-09T16:04:14.569651+00:00 app[web.1]:
2013-10-09T16:04:14.571718+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:184:in `call!'
2013-10-09T16:04:14.570768+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
2013-10-09T16:04:14.571568+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:184:in `call!'
2013-10-09T16:04:14.572469+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/rack/logger.rb:38:in `call_app'
2013-10-09T16:04:14.570768+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `instrument'
2013-10-09T16:04:14.572234+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
2013-10-09T16:04:14.570768+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2013-10-09T16:04:14.572916+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.0/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
2013-10-09T16:04:14.571718+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:164:in `call'
2013-10-09T16:04:14.571718+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:164:in `call'
2013-10-09T16:04:14.572916+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
2013-10-09T16:04:14.571718+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:184:in `call!'
2013-10-09T16:04:14.572916+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/middleware/static.rb:64:in `call'
2013-10-09T16:04:14.570558+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/abstract_controller/base.rb:189:in `process_action'
2013-10-09T16:04:14.572916+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-4.0.0/lib/rails/engine.rb:511:in `call'
2013-10-09T16:04:14.570942+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:71:in `block in call'
2013-10-09T16:04:14.572916+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
2013-10-09T16:04:14.736039+00:00 app[web.1]: Rendered vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (143.3ms)
2013-10-09T16:04:14.721602+00:00 app[web.1]: Rendered vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (4.7ms)
2013-10-09T16:04:14.735805+00:00 app[web.1]: Rendered vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.5ms)
2013-10-09T16:04:14.735805+00:00 app[web.1]: Rendered vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.5ms)
2013-10-09T16:04:14.721684+00:00 app[web.1]: Rendered vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (4.7ms)
2013-10-09T16:04:14.735924+00:00 app[web.1]: Rendered vendor/bundle/ruby/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (143.3ms)
2013-10-09T16:01:41.314983+00:00 heroku[web.1]: State changed from down to starting
Production.rb
Farmfood::Application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both thread web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
config.eager_load = true
# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = true #false
config.action_controller.perform_caching = false #true
#set host amazon
ActionController::Base.asset_host = "http://bucket.s3-eu-west-1.amazonaws.com"
# Enable Rack::Cache to put a simple HTTP cache in front of your application
# Add `rack-cache` to your Gemfile before enabling this.
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
# config.action_dispatch.rack_cache = true
# Disable Rails's static asset server (Apache or nginx will already do this).
config.serve_static_assets = false
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = true
# Generate digests for assets URLs.
config.assets.digest = true
# Version of your assets, change this if you want to expire all your assets.
config.assets.version = '1.0'
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# Set to :debug to see everything in the log.
config.log_level = :info
# Prepend all log lines with the following tags.
# config.log_tags = [ :subdomain, :uuid ]
# Use a different logger for distributed setups.
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# config.assets.precompile += %w( search.js )
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found).
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
# Disable automatic flushing of the log to improve performance.
# config.autoflush_log = false
# config/environments/production.rb
config.paperclip_defaults = {
:storage => :s3,
:s3_credentials => {
:bucket => ENV['AWS_BUCKET'],
:access_key_id => ENV['AWS_ACCESS_KEY_ID'],
:secret_access_key => ENV['AWS_SECRET_ACCESS_KEY']
}
}
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
end
的Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'
ruby '1.9.3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# database gem for convertion sqlite3 to postgresql
gem 'yaml_db'
gem 'pg'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
# Include amazon file upload
gem 'paperclip'
gem 'aws-sdk'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
#fix issue Undefined variable: "$c_green"
gem 'compass'
gem 'compass-rails'
#necessary for spree_i18n (translation tool)
gem 'globalize3', github: 'svenfuchs/globalize3', branch: 'rails4'
gem 'paper_trail', github: 'airblade/paper_trail', branch: 'master'
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
gem 'spree', '2.1.1'
gem "spree_social_products", :git => "git://github.com/spree/spree_social_products.git", :branch => '2-1-stable'
gem 'spree_gateway', :git => 'https://github.com/spree/spree_gateway.git', :branch => '2-1-stable'
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-1-stable'
gem 'spree_fancy', :github => 'spree/spree_fancy', :branch => '2-1-stable'
gem "spree_social", :git => "git://github.com/spree/spree_social.git", :branch => '2-1-stable'
gem 'spree_i18n', github: 'spree/spree_i18n', :branch => '2-1-stable'
gem 'spree_static_content', :github => 'spree/spree_static_content'
#group :development, :test do
# gem 'sqlite3'
#end
#fix heroku
gem 'rails_12factor'#, group: :production
#group :production do
# gem 'pg'
#end
答案 0 :(得分:1)
我遇到了同样的问题,并使用Ryan Big的修复方法修复了它:
gem 'spree', :github => 'radar/spree', :branch => '2-1-stable'
我希望很快就会在狂欢/狂欢库上提供修复程序。如果您想阅读有关此问题的整个讨论,请参阅this post。
答案 1 :(得分:0)
你在评估为零的东西上调用translations
。它可能在本地工作,因为当您尝试在heroku上访问它时,您依赖于会话或开发数据库中存在的某些内容。
编辑:我在您发布的日志中没有看到任何错误提及。还有它吗?您可能希望暂时将config.log_level
更改为:debug
,尝试重新加载页面,然后重新发布日志。
好的,我对Spree并不熟悉,但我认为问题出现在index
的{{1}}方法中。在那个方法中,你是在对象上调用home_controller_decorator.rb
吗?如果是这样,你确定那个对象没有办法是零吗?在这种情况下,我可能会使用像pry这样的东西来检验。
答案 2 :(得分:0)
稍微偏离主题,但这是我的错误中谷歌的第一个结果。
不要在控制器中使用“cookies”作为方法,因为它是为cookie使用保留的:)