Невозможно получить доступ к приложению после нажатия на Heroku

Я перенес свое приложение в heroku после некоторого маневрирования в файле gemfile и config/application.rb

я имею config.assets.initialize_on_precompile = false в моем файле application.rb выше моего Bundler.require.

Вот гемфайл.

source 'https://rubygems.org'
ruby '2.1.0'

gem 'rails', '4.0.5'

group :development, :test do
    gem 'sqlite3'
end

group :production do
    gem 'pg'
end

gem 'sass-rails', '~> 4.0.2'

gem 'uglifier', '>= 1.3.0'

gem 'coffee-rails', '~> 4.0.0'

gem 'jquery-rails'

gem 'turbolinks'

gem 'jbuilder', '~> 1.2'

group :doc do
  gem 'sdoc', require: false
end

 gem 'bcrypt', '~> 3.1.7'

group :test, :development do
  gem "rspec-rails", "2.13.1"
end

group :test do
  gem "capybara", "2.1.0"
end

group :development do
    gem 'pry-rails'
    gem 'nokogiri', '1.6.3.1'
end

Когда я пытаюсь получить доступ к приложению на героку, я получаю:

Ошибка приложения В приложении произошла ошибка, и ваша страница не может быть обработана. Пожалуйста, попробуйте снова через пару минут.

Если вы являетесь владельцем приложения, проверьте подробности в своих журналах.'

Есть идеи?

РЕДАКТИРОВАТЬ: Application.rb размещены ниже в соответствии с просьбой:

require File.expand_path('../boot', __FILE__)

require 'rails/all'

config.assets.initialize_on_precompile = false

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module Planner
  class Application < Rails::Application
    # Settings in config/environments/* take precedence over those specified here.
    # Application configuration should go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded.

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
    # config.time_zone = 'Central Time (US & Canada)'

    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
    # config.i18n.default_locale = :de
  end
end

1 ответ

Решение

Он жалуется на оператор config, который находится в строке 5. Это должно быть внутри определения класса Application, например:

require File.expand_path('../boot', __FILE__)

require 'rails/all'

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module Planner
  class Application < Rails::Application
    # Settings in config/environments/* take precedence over those specified here.
    # Application configuration should go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded.

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
    # config.time_zone = 'Central Time (US & Canada)'

    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
    # config.i18n.default_locale = :de

    config.assets.initialize_on_precompile = false
  end
end
Другие вопросы по тегам