nomethoderror未定义的方法'configure'应用程序 [英] nomethoderror undefined method 'configure' application

查看:151
本文介绍了nomethoderror未定义的方法'configure'应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图推动我的应用程序做Heroku。我创建了heroku创建,并且顺利运行,并且在我的应用程序中显示在他们的网站上。当我运行git push heroku master时,我得到这个错误。我所看到的与ProjectOne :: Application相同的NoMethodError:未定义的方法`configure只是进入了development.rb文件夹,并具有这个ProjectOne :: Application.configure。

我被困在这里,找不到任何东西来帮助我。据我所知,没有方法错误是推送失败的地方,据我所知,我解决了这个问题。如果错误在代码中的其他位置,或者我误解了某些内容,请让我知道!感谢:)

  C:\ Users \Devin Miller\project_one> git push heroku master 
警告:将IP地址'50 .19.85.132'的RSA主机密钥永久添加到已知主机列表中。
初始化仓库,完成。
计数对象:63,完成。
使用多达8个线程的增量压缩。
压缩对象:100%(50/50),完成。
写作对象:100%(63/63),15.70 KiB | 0字节/秒,完成。
总计63(增量2),重用0(增量0)

-----> Ruby应用检测到
----->编译Ruby / Rails
----->使用Ruby版本:ruby-2.0.0
######警告:
删除`Gemfile.lock`,因为它是在Windows上生成的。
Bundler会做一个完整的解决方案,以便正确处理原生宝石。
这可能会导致应用程序使用意外的宝石版本。
在极少数情况下,Bundler可能无法在
全部解决您的依赖关系。
https://devcenter.heroku.com/articles/bundler-windows-gemfile

----->使用1.6.3
安装依赖项运行:bundle install --without development:test --path vendor / bundle -
-binstubs vendor / bundle / bin -j4
从https: //rubygems.org / .........
解析依赖...
安装minitest 4.7.5
安装i18n 0.6.11
安装rake 10.3。 2
安装multi_json 1.10.1
....
安装jquery-rails 3.0.4
安装sass-rails 4.0.3
安装turbolinks 1.1.1
安装pg 0.15.1
安装rails 4.0.8
您的软件包已完成!
没有安装群组开发和测试中的宝石。
它被安装到./vendor/bundle
从rdoc安装后的消息:
根据你的ruby版本,你可能需要安装ruby rdoc / ri d
ata :
<= 1.8.6:不支持
= 1.8.7:gem install rdoc-data; rdoc-data --install
= 1.9.1:gem install rdoc-data; rdoc-data --install
> = 1.9.2:无所事事!好极了!
Bundle完成(22.47s)
清理Bundler缓存。
----->编写config / database.yml以从DATABASE_URL读取
----->为Rails资产管道准备应用程序
运行:rake资产:预编译
rake中止!
NoMethodError:未定义的方法`configure'for#< ProjectOne :: Application
:0x007fb53995e890>
/ tmp / build_04896665-39bf-41ee-958e-1afab938608a / config / environments / produ
ction.rb:1:在< 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:在'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:在`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:在`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:在'require'中
/tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/
gems / railties-4.0.8 / lib / rails / engine.rb:591:在`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:在< 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:在`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:在`run'中
/tmp/build_04896665-39bf-41ee-958e-1afab938608a / vendor / bundle / ruby​​ / 2.0.0 /
gems / railties-4.0.8 / lib / rails / initializable.rb:55:在`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:在`each'
/tmp/build_04896665-39bf-41ee-958e-1afab938608a/vendor/bundle/ruby/2.0.0/
gems / railties-4.0.8 / lib / rails / initializable.rb:44:在`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:在` 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 :`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:在'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:在`请求块
uire'
/ tmp / build_04896665-39bf-41e e-958e-1afab938608a / vendor / bundle / ruby​​ / 2.0.0 /
gems / activesupport-4.0.8 / lib / active_support / dependencies.rb:214:在`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:在'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:在`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 =>环境
(通过使用--trace运行任务查看完整跟踪)

!预编译资产失败。


!推送被拒绝,未能编译Ruby应用程序

至git@heroku.com:morning-cliffs-5538.git
! [remote rejected] master - > master(pre-receive hook refused)
错误:未能将某些参考文献推送到'git@heroku.com:morning-cliffs-5538.git'


解决方案

我解决了这个问题,至少在我的情况下。要解决这个问题,请运行

  rake assets:precompile 

在这一点上,我承诺我的修改,然后终于可以

  git push heroku master 


I am trying to push my app do Heroku. I created ran "heroku create" and that ran through smooth, and it is showing up in my apps on their site. When I run "git push heroku master" I get this error. Everything I have seen pertaining to the same "NoMethodError: undefined method `configure' for ProjectOne::Application" is simply go into the development.rb folder and have this "ProjectOne::Application.configure do".

I am stuck here and can't find anything to help me. As far as I can tell, the no method error is where the push failed and to my knowledge so far, I fixed the problem. If the error is somewhere else in the code or I misunderstand something please let me know! THANKS :)

     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 git@heroku.com:morning-cliffs-5538.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:morning-cliffs-5538.git'

解决方案

I solved this problem, at least in my case. To fix this, run

rake assets:precompile

At this point I committed my changes and then finally was able to

git push heroku master

这篇关于nomethoderror未定义的方法'configure'应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆