gpt4 book ai didi

ruby-on-rails - heroku 上传错误 Could not detect rake tasks

转载 作者:数据小太阳 更新时间:2023-10-29 09:03:14 26 4
gpt4 key购买 nike

我正在尝试将我的应用程序上传到 heroku,目前它只是纯粹的设计,不需要数据库连接。我在上传时不断收到此错误。

Your bundle is complete!
remote: Gems in the groups development and test were not installed.
remote: It was installed into ./vendor/bundle
remote: Bundle completed (1.06s)
remote: Cleaning up the bundler cache.
remote: Could not detect rake tasks
remote: ensure you can run `$ bundle exec rake -P` against your app with no environment variables present
remote: and using the production group of your Gemfile.
remote: rake aborted!
remote: URI::InvalidURIError: bad URI(is not URI?): ://user:pass@127.0.0.1/dbname
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/ruby-2.0.0/lib/ruby/2.0.0/uri/common.rb:176:in `split'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/ruby-2.0.0/lib/ruby/2.0.0/uri/common.rb:211:in `parse'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/ruby-2.0.0/lib/ruby/2.0.0/uri/common.rb:747:in `parse'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/connection_specification.rb:35:in `initialize'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/connection_specification.rb:279:in `new'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/connection_specification.rb:279:in `resolve_url_connection'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/connection_specification.rb:242:in `resolve_string_connection'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/connection_specification.rb:267:in `resolve_hash_connection'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/connection_specification.rb:228:in `resolve_connection'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/connection_specification.rb:152:in `resolve'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/connection_specification.rb:164:in `block in resolve_all'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/connection_specification.rb:163:in `each'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/connection_specification.rb:163:in `resolve_all'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/connection_handling.rb:69:in `resolve'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/core.rb:46:in `configurations='
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/core.rb:48:in `block in <module:Core>'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/concern.rb:120:in `class_eval'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/concern.rb:120:in `append_features'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/base.rb:297:in `include'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/base.rb:297:in `<class:Base>'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/base.rb:282:in `<module:ActiveRecord>'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/base.rb:23:in `<top (required)>'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/railtie.rb:39:in `require'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.4/lib/active_record/railtie.rb:39:in `block in <class:Railtie>'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/railtie.rb:237:in `instance_exec'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/railtie.rb:237:in `block in run_tasks_blocks'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/railtie.rb:245:in `each'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/railtie.rb:245:in `each_registered_block'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/railtie.rb:237:in `run_tasks_blocks'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/application.rb:373:in `block in run_tasks_blocks'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine/railties.rb:13:in `each'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine/railties.rb:13:in `each'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/application.rb:373:in `run_tasks_blocks'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:449:in `load_tasks'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/Rakefile:6:in `<top (required)>'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:689:in `raw_load_rakefile'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:94:in `block in load_rakefile'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
remote: /tmp/build_1f483b69aed84c97fc81983578b0b4e9/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
remote: vendor/bundle/bin/rake:16:in `load'
remote: vendor/bundle/bin/rake:16:in `<main>'
remote:
remote: ###### WARNING:
remote: No Procfile detected, using the default web server (webrick)
remote: https://devcenter.heroku.com/articles/ruby-default-web-server
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote: Default types for Ruby -> console, rake, web, worker
remote:
remote: -----> Compressing... done, 30.6MB
remote: -----> Launching... done, v14
remote: https://teknolohiya.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/teknolohiya.git
897dd11..5ac0b58 master -> master

它完成并说上传完成但是当尝试检查它显示的应用程序时应用程序错误应用程序发生错误,无法提供您的页面。请稍后重试。

如果您是应用程序所有者,请查看您的日志以了解详细信息。

路线.rb

Rails.application.routes.draw do  
#root
root 'home#index'

#welcome
get 'welcome' => 'welcome#index'

#about
get 'about' => 'about#index'

#contact
get 'contact' => 'contact#index'

end

最佳答案

我刚遇到这个问题,对你来说可能不是问题,但问题是 Heroku 正在尝试调用 DATABASE_URL。我提供了一个免费的 postgres 数据库(即使我们没有将它用于该项目)并且能够解决这个问题。

关于ruby-on-rails - heroku 上传错误 Could not detect rake tasks,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30271856/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com