2014-10-09 88 views
0

我想推我的應用程序做Heroku。我創建了「heroku創建」,並且順利運行,並且在我的應用程序中顯示在他們的網站上。當我運行「git push heroku master」時,我得到這個錯誤。我所看到的與ProjectOne :: Application相同的「NoMethodError:未定義的方法`configure」只是進入了development.rb文件夾,並具有這個「ProjectOne :: Application.configure」。nomethoderror未定義的方法「配置」應用程序

我被困在這裏,找不到任何東西來幫助我。據我所知,沒有方法錯誤是推送失敗的地方,據我所知,我解決了這個問題。如果錯誤在代碼中的其他位置,或者我誤解了某些內容,請讓我知道!謝謝:)

 C:\Users\Devin Miller\project_one>git push heroku master 
    Warning: Permanently added the RSA host key for IP address '50.19.85.132' to the list of  known hosts. 
    Initializing repository, done. 
    Counting objects: 63, done. 
    Delta compression using up to 8 threads. 
    Compressing objects: 100% (50/50), done. 
    Writing objects: 100% (63/63), 15.70 KiB | 0 bytes/s, done. 
    Total 63 (delta 2), reused 0 (delta 0) 

-----> Ruby app detected 
-----> Compiling Ruby/Rails 
-----> Using Ruby version: ruby-2.0.0 
###### WARNING: 
     Removing `Gemfile.lock` because it was generated on Windows. 
     Bundler will do a full resolve so native gems are handled properly. 
     This may result in unexpected gem versions being used in your app. 
     In rare occasions Bundler may not be able to resolve your dependencies at 
all. 
     https://devcenter.heroku.com/articles/bundler-windows-gemfile 

-----> Installing dependencies using 1.6.3 
     Running: bundle install --without development:test --path vendor/bundle - 
-binstubs vendor/bundle/bin -j4 
     Fetching gem metadata from https://rubygems.org/......... 
     Resolving dependencies... 
     Installing minitest 4.7.5 
     Installing i18n 0.6.11 
     Installing rake 10.3.2 
     Installing multi_json 1.10.1 
     .... 
     Installing jquery-rails 3.0.4 
     Installing sass-rails 4.0.3 
     Installing turbolinks 1.1.1 
     Installing pg 0.15.1 
     Installing rails 4.0.8 
     Your bundle is complete! 
     Gems in the groups development and test were not installed. 
     It was installed into ./vendor/bundle 
     Post-install message from rdoc: 
     Depending on your version of ruby, you may need to install ruby rdoc/ri d 
ata: 
     <= 1.8.6 : unsupported 
     = 1.8.7 : gem install rdoc-data; rdoc-data --install 
     = 1.9.1 : gem install rdoc-data; rdoc-data --install 
     >= 1.9.2 : nothing to do! Yay! 
     Bundle completed (22.47s) 
     Cleaning up the bundler cache. 
-----> Writing config/database.yml to read from DATABASE_URL 
-----> Preparing app for Rails asset pipeline 
     Running: rake assets:precompile 
     rake aborted! 
     NoMethodError: undefined method `configure' for #<ProjectOne::Application 
:0x007fb53995e890> 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/config/environments/produ 
ction.rb:1:in `<top (required)>' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in req 
uire' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_depende 
ncy' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/railties-4.0.8/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engin 
e>' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/railties-4.0.8/lib/rails/engine.rb:590:in `each' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/railties-4.0.8/lib/rails/engine.rb:590:in `block in <class:Engine>' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/railties-4.0.8/lib/rails/initializable.rb:30:in `instance_exec' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/railties-4.0.8/lib/rails/initializable.rb:30:in `run' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/railties-4.0.8/lib/rails/initializable.rb:55:in `block in run_initializers' 

     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/railties-4.0.8/lib/rails/initializable.rb:44:in `each' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/railties-4.0.8/lib/rails/initializable.rb:44:in `tsort_each_child' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/railties-4.0.8/lib/rails/initializable.rb:54:in `run_initializers' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/railties-4.0.8/lib/rails/application.rb:215:in `initialize!' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/config/environment.rb:5:i 
n `<top (required)>' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in req 
uire' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_depende 
ncy' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/railties-4.0.8/lib/rails/application.rb:189:in `require_environment!' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/railties-4.0.8/lib/rails/application.rb:250:in `block in run_tasks_blocks' 
     /tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/ 
gems/sprockets-rails-2.1.4/lib/sprockets/rails/task.rb:64:in `block (2 levels) i 
n define' 
     Tasks: TOP => environment 
     (See full trace by running task with --trace) 
! 
!  Precompiling assets failed. 
! 

!  Push rejected, failed to compile Ruby app 

To [email protected]:morning-cliffs-5538.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to '[email protected]:morning-cliffs-5538.git' 

回答

1

我解決了這個問題,至少在我的情況下。爲了解決這個問題,運行

rake assets:precompile 

在這一點上我犯了我的變化,然後終於能夠

git push heroku master 
0

嘗試改變production.rb頂線

Rails.application.configure do 

或者,也許只是downcasing應用程序可以正常工作。

相關問題