我幾乎是全新的RoR等。爲什麼我會爲Heroku託管的全新應用程序獲取應用程序錯誤錯誤頁面?
我下面的視頻教程,以建立自己的基於Web的應用程序,我一到步: 混帳推Heroku的主
當混帳bash中,有人來了聲稱它是一個錯誤無法編譯紅寶石。現在,它表示它已啓動並已部署,但頁面上的應用仍存在相同的錯誤,http://infinite-mountain-6131.herokuapp.com/
任何想法?如果需要,我可以添加文件。
請求的文件(S):
應用程序/配置/從我的評論說,在我的錯誤中提到
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# config/application.rb
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 Myrubyblog
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
線6 application.rb中是我放在config.assets.initialize那裏有第5行建議解決我的問題。
這是當我運行該遷移的建議會發生什麼(Heroku的運行耙分貝:遷移)
Running 'rake db:migrate' attached to terminal... up, run.6274
rake aborted!
NameError: undefined local variable or method 'config' for main:Object
/app/config/application.rb:6:in '<top <required>>'
/app/Rakefile:4:in 'require'
/app/Rakefile:4:in '<top <required>'
<See full trace by running task with --trace>
能否請您複製了你的Heroku的日誌中,你看到的任何錯誤?並可能包含指向該教程的鏈接? – RSid
這裏有很多舊的東西,不再是讓Rails應用程序運行的正確方法。我強烈建議您按照Heroku https://devcenter.heroku.com/articles/getting-started-with-rails4中的「入門」步驟操作。這是第4版。谷歌的Rails 3版本,如果你使用的話。 – Gene
你運行migrations做'heroku運行rake db:migrate'嗎? –