2015-09-14 7 views
0

через несколько часов и часов исследований, может кто-то помочь мне для этой проблемы:Heroku запустить грабли БД: мигрировать не работает

Когда я поставил команду Heroku запустить грабли БД: мигрировать, у меня этот вопрос :

$ heroku run rake db:migrate 
Your version of git is 1.9.4.. Which has serious security vulnerabilities. 
More information here: https://blog.heroku.com/archives/2014/12/23/update_your_git_clients_on_windows_and_os_x 
Running `rake db:migrate` attached to terminal... up, run.1875 rake aborted! 
NameError: uninitialized constant Pinteresting 
/app/config/environments/production.rb:1:in `<top (required)>' 
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>' 
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `each' 
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `block in <class:Engine>' 
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec' 
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run' 
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers' 
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each' 
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child' 
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers' 
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!' 
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing' 
/app/config/environment.rb:5:in `<top (required)>' 
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!' 
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:250:in `block in run_tasks_blocks' 
Tasks: TOP => db:migrate => environment 
(See full trace by running task with --trace) 

Мой GitHub: github.com/Nolwen38/pinteresting Контекст: Я только что зарегистрировался, чтобы aws.amazon и поставить информацию моей амазонки на githash настройки. У меня есть окна 7 32bit Спасибо за помощь! BR Nolwen

+0

Похоже, есть проблема с файлом production.rb – margo

+0

Похоже, что есть проблема в production.rb, но я не понимаю, что это значит: /production.rb:1:in ' ' Я внес некоторые изменения в этот файл, чтобы создать базу данных aws.amazon. Может быть, проблема исходит отсюда ... Thanks Nolwen –

+0

Его линия выше - ему не нравится линия, в которой есть Pinteresting. Возможно, опубликуйте этот файл и файл application.rb – margo

ответ

0

production.rb

Pinteresting::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  = false 
    config.action_controller.perform_caching = true 

    # 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 = false 

    # 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 

    # Use default logging formatter so that PID and timestamp are not suppressed. 
    config.log_formatter = ::Logger::Formatter.new 

    # Required for Heroku 
    # Note to set this to your actual host 
    config.action_mailer.default_url_options = { :host => 'omr-pinteresting.com' } 

    # Sets Paperclip to upload images to Amazon S3 
    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'] 
    } 
    } 
end 

Application.rb

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(:default, Rails.env) 

module HelloWorld 
    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 

    # Required for Heroku 
    config.assets.initialize_on_precompile = false 
    end 
end 

BR

Смежные вопросы