应用程序错误:Heroku,Ruby on Rails 4,警告:Rails\u 12factor,供应商/捆绑包,无程序文件
我的RubyonRails4应用程序在Mac上运行良好 但是,当我试图将我的应用程序上载到Heroku时,伴随着警告消息,Heroku应用程序没有工作,在相应的网页上说应用程序错误:Heroku,Ruby on Rails 4,警告:Rails\u 12factor,供应商/捆绑包,无程序文件,ruby,ruby-on-rails-4,heroku,Ruby,Ruby On Rails 4,Heroku,我的RubyonRails4应用程序在Mac上运行良好 但是,当我试图将我的应用程序上载到Heroku时,伴随着警告消息,Heroku应用程序没有工作,在相应的网页上说应用程序错误 在这里,我放置了一个日志文件,其中包含非常神秘的术语,如rails\u 12factor和procfile: remote: ###### WARNING: remote: Include 'rails_12factor' gem to enable all platform features remo
应用程序错误
在这里,我放置了一个日志文件,其中包含非常神秘的术语,如rails\u 12factor
和procfile
:
remote: ###### WARNING:
remote: Include 'rails_12factor' gem to enable all platform features
remote: See https://devcenter.heroku.com/articles/rails-integration-gems for more information.
remote:
remote: ###### WARNING:
remote: Removing `vendor/bundle`.
remote: Checking in `vendor/bundle` is not supported. Please remove this directory
remote: and add it to your .gitignore. To vendor your gems with Bundler, use
remote: `bundle pack` instead.
remote:
remote: ###### WARNING:
remote: You have not declared a Ruby version in your Gemfile.
remote: To set your Ruby version add this line to your Gemfile:
remote: ruby '2.0.0'
remote: # See https://devcenter.heroku.com/articles/ruby-versions for more information.
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.0MB
remote: -----> Launching... done, v6
remote: https://ringlebeta.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
这是我的档案!我很想听到任何建议和意见:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.1'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'bootstrap-sass'
gem 'autoprefixer-rails'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
#Google Auth
gem "omniauth-google-oauth2", "~> 0.2.1"
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
gem 'sqlite3'
end
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
"Gemfile" 54L, 1596C
源代码'https://rubygems.org'
#捆绑边缘Rails:gem'Rails',github'Rails/Rails'
gem“rails”、“4.2.1”
#使用sqlite3作为活动记录的数据库
#gem'sqlite3'
#将SCS用于样式表
gem'sass-rails',“~>5.0”
#使用Uglifier作为JavaScript资产的压缩器
gem'uglifier','>=1.3.0'
#将CoffeeScript用于.coffee资产和视图
gem“咖啡轨”,“~>4.1.0”
#看https://github.com/rails/execjs#readme 获取更多受支持的运行时
#宝石“therubyracer”,平台::ruby
gem‘引导式sass’
gem“自动刷新器轨道”
#使用jquery作为JavaScript库
gem'jqueryrails'
#Turbolinks使web应用程序中的以下链接更快。阅读更多:https://github.com/rails/turbolinks
gem“涡轮链接”
#轻松构建JSON API。阅读更多:https://github.com/rails/jbuilder
gem'jbuilder',“~>2.0”
#bundle exec rake doc:rails在doc/API下生成API。
gem'sdoc','~>0.4.0',组::doc
#谷歌认证
gem“omniauth-google-oauth2”,“~>0.2.1”
#使用ActiveModel具有\u安全\u密码
#gem'bcrypt',“~>3.1.7”
#使用Unicorn作为应用程序服务器
#宝石“独角兽”
#使用Capistrano进行部署
#gem“capistrano rails”,集团::开发
小组:开发,:测试
#在代码中的任意位置调用“byebug”以停止执行并获得调试器控制台
宝石“比伯”
gem'sqlite3'
结束
#在异常页面上或通过在视图中使用访问IRB控制台
gem“web控制台”,“~>2.0”
#Spring通过让应用程序在后台运行来加速开发。阅读更多:https://github.com/rails/spring
“Gemfile”54L,1596C
Heroku集成以前依赖于使用Rails插件系统,该系统已从Rails 4中删除。要在Heroku上启用静态资产服务和登录等功能,请将rails\u 12factor gem添加到gem文件中
在文件末尾添加:
gem“rails\u 12factor”,集团::生产
然后运行:
捆绑安装,然后尝试部署:Heroku集成以前依赖于使用Rails插件系统,该系统已从Rails 4中删除。要在Heroku上启用静态资产服务和登录等功能,请将rails\u 12factor gem添加到gem文件中
source 'https://rubygems.org'
# ...
# Your Gemfile contents here
# ...
group :production do
gem 'pg' # If you plan to use PostgreSQL in your Heroku app
gem 'rails_12factor'
end
在文件末尾添加:
gem“rails\u 12factor”,集团::生产
然后运行:
捆绑安装,然后尝试部署:将此文件添加到GEM文件,然后尝试部署:
source 'https://rubygems.org'
# ...
# Your Gemfile contents here
# ...
group :production do
gem 'pg' # If you plan to use PostgreSQL in your Heroku app
gem 'rails_12factor'
end
rails\u 12factor
是Heroku提供的宝石。它支持在生产环境中为资产提供服务,并将记录器设置为标准输出,这两者都是在12因素提供商上运行Rails应用程序所必需的。将其添加到GEM文件中,然后尝试部署:
source 'https://rubygems.org'
# ...
# Your Gemfile contents here
# ...
group :production do
gem 'pg' # If you plan to use PostgreSQL in your Heroku app
gem 'rails_12factor'
end
rails\u 12factor
是Heroku提供的宝石。它支持在生产环境中为资产提供服务,并将记录器设置为标准输出,这两者都是在12因素提供商上运行Rails应用程序所必需的。尝试在根目录中创建Procfile。在Procfile中添加以下行:web:bundle exec unicorn-p$PORT-c./config/unicorn.rb
尝试在根目录中创建Procfile。在Procfile中添加以下行:web:bundle exec unicorn-p$PORT-c./config/unicorn.rb
当我命令“ruby-v”时,它说:ruby 2.2.2p95(2015-04-13修订版50295)[x86_64-darwin14]你说的“包括非常神秘的术语,如“rails\u 12factor”和Procfile”-然而,在每一个“神秘术语”之后有一个链接指向非常广泛的文档。你读过这些吗?当我命令“ruby-v”时,它说:ruby 2.2.2p95(2015-04-13修订版50295)[x86_64-darwin14]你说“包括非常神秘的术语,如“rails_12factor”和procfile”-但是,在每一个“神秘术语”之后都有一个指向非常广泛文档的链接。你读过这些吗?谢谢!尽管如此,我还是从Heroku那里得到了两个警告:vendor/bundle+No procfile。谢谢!尽管如此,我还是从Heroku那里得到了两个警告:vendor/bundle+No procfile。