- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我的 webapp 快要发布了,但是 jquery 不能像我想要的那样工作。
我在 heroku 上遇到了这个错误:
2014-02-03T00:53:41.347687+00:00 app[web.1]:ActionView::MissingTemplate (Missing template studcourses/new,application/new with {:locale=>[:en], :formats=>[:html],:handlers=>[:erb, :builder, :raw, :ruby, :jbuilder]}. Searched in: 2014-02-03T00:53:41.348378+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/abstract_controller/callbacks.rb:18:in `block in process_action' 2014-02-03T00:53:41.349292+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call' 2014-02-03T00:53:41.349292+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call' 2014-02-03T00:53:41.350044+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call' 2014-02-03T00:53:41.350044+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/cache/strategy/local_cache.rb:83:in `call' 2014-02-03T00:53:41.349292+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch' 2014-02-03T00:53:41.348914+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/abstract_controller/base.rb:136:in `process' 2014-02-03T00:53:41.348914+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:59:in `each' 2014-02-03T00:53:41.349292+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:59:in `call' 2014-02-03T00:53:41.348732+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_controller/metal/params_wrapper.rb:245:in `process_action' 2014-02-03T00:53:41.348732+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/railties/controller_runtime.rb:18:in `process_action' 2014-02-03T00:53:41.349476+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/query_cache.rb:36:in `call' 2014-02-03T00:53:41.349476+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context' 2014-02-03T00:53:41.349292+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/flash.rb:241:in `call' 2014-02-03T00:53:41.349476+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call' 2014-02-03T00:53:41.349292+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call' 2014-02-03T00:53:41.348914+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:71:in `block in call' 2014-02-03T00:53:41.349292+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call' 2014-02-03T00:53:41.349292+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/params_parser.rb:27:in `call' 2014-02-03T00:53:41.349292+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:655:in `call' 2014-02-03T00:53:41.348914+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:48:in `call' 2014-02-03T00:53:41.349864+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' 2014-02-03T00:53:41.349864+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call' 2014-02-03T00:53:41.349864+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/rack/logger.rb:38:in `call_app' 2014-02-03T00:53:41.349476+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/cookies.rb:486:in `call' 2014-02-03T00:53:41.349476+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/remote_ip.rb:76:in `call' 2014-02-03T00:53:41.349292+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call' 2014-02-03T00:53:41.349476+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' 2014-02-03T00:53:41.349476+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:373:in `_run__3128314251881795976__call__callbacks' 2014-02-03T00:53:41.349476+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:80:in `run_callbacks' 2014-02-03T00:53:41.349864+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call' 2014-02-03T00:53:41.349864+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:25:in `tagged' 2014-02-03T00:53:41.349864+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:67:in `tagged' 2014-02-03T00:53:41.349864+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/rack/logger.rb:21:in `call' 2014-02-03T00:53:41.349476+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/callbacks.rb:27:in `call' 2014-02-03T00:53:41.350044+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/static.rb:64:in `call' 2014-02-03T00:53:41.350044+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/ssl.rb:24:in `call' 2014-02-03T00:53:41.350044+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:511:in `call' 2014-02-03T00:53:41.350044+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:97:in `call' 2014-02-03T00:53:41.349864+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/request_id.rb:21:in `call' 2014-02-03T00:53:41.349864+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/rack/logger.rb:21:in `block in call' 2014-02-03T00:53:41.349476+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call' 2014-02-03T00:53:41.349864+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:67:in `block in tagged' 2014-02-03T00:53:41.350444+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread' 2014-02-03T00:53:41.350444+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
但在本地主机上它工作正常。 Heroku 不接受 new.js.erb...
我做了很多次
rake assets:precompile
RAILS_ENV=production bundle exec rake assets:precompile
或
rake assets:clean
RAILS_ENV=production bundle exec rake assets:clean
我的应用程序.js:
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require bootstrap
//= require jquery-1.10.2
//= require jquery
//= require jquery.min
//= require jquery.ui.effect.all
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//
Controller :
class StudcoursesController < ApplicationController
before_action :authenticate_student!
before_action :set_student, only: [:kurse]
def cfails
@courses = Course.all
end
def kurse
@cnames = Cname.all
#@studcourses = Studcourse.all
end
def new
@studcourse = Studcourse.new
end
def create
@studcourse = Studcourse.new(studcourse_params)
if !@studcourse.save
render action: 'error'
end
end
def show
if signed_in?
show_signed_in
else
show_not_signed_in
end
end
def show_signed_in
#add methods here
#@students = Student.find(params[:id])
#@studcourses = Studcourse.find(current_student.id)
end
private
# Use callbacks to share common setup or constraints between actions.
def set_student
@student = Student.find(current_student.id)
end
def studcourse_params
params.require(:studcourse).permit(:matrikel, :modulnrpg, :modulnr, :student_id)
end
end
studcourse/kurse.html.erb(第一 View ):
<% require 'open-uri'%>
<% require 'mechanize'%>
<% require 'nokogiri' %>
<%# Anzeigen von den selbst belegten Kursen %>
<%# TODO Info, dass Kurse nicht erfolgreich abgerufen wurden und das PW überprüft werden soll %>
<%# Nur Kurse abrufen, wenn es der erste Login ist %>
<%= link_to 'Neuer Kurs', new_studcourse_path, id: "new_link", remote: true, :class => "btn btn-success btn-sm" %>
</br>
<% if @student.erste_mal %>
....
studcourse/new.js.erb:
$('#new_link').hide().after('<%= j render("form") %>');
$('#new_studcourse').focus();
$('#cancel_button').clickCancelButton();
studcourse/_form.html.erb:
<%= form_for(@studcourse, remote: true, :html => {id: "new_studcourse"}) do |f| %>
<div class="row form-group">
<div class="col-xs-4">
<label class="control-label" for="studcourse_modulnrpg" id="error-message"></label>
<%= f.text_field :modulnrpg, class: "form-control" %>
</div>
<%#= f.hidden_field :modulnr, :value => .at(0..5)%>
<%= f.hidden_field :matrikel, :value => current_student.matrikel %>
<%= f.hidden_field :student_id, :value => current_student.id %>
<div class="col-xs-3 button-group">
<%= f.submit "Speichern", class: "btn btn-primary btn-sm" %>
<%= link_to 'Abbrechen', studcourses_kurse_path, id: "cancel_button", class: "btn btn-default btn-sm" %>
</div>
</div>
<% end %>
studcourse/create.js.erb:
$('#new_studcourse').remove();
$('#new_link').show();
$('tbody').append('<%= j render(@studcourse) %>');
$('#st_<%= @studcourse.id %>').effect("highlight");
the _studcourse.html.erb
<tr id="studcourse_<%= studcourse.id %>">
<td class="success"><%= studcourse.modulnrpg%></td>
<td><% Cname.where(modulnr: studcourse.modulnr).find do |cnn| %>
<%= cnn.modulname %>
<% end %></td>
<%#= link_to "Löschen", studcourse, :class => "btn btn-danger btn-sm", remote: true, method: :delete, data: { confirm: 'Willst du wirklich das Projekt löschen?' } %>
</tr>
studcourse/error.js.erb:
$(".form-group").addClass("has-error");
$("#error-message").html("<%= j @studcourse.errors.full_messages[0] %>");
$("#new_studcourse").effect("shake");
开发.rb
MyHWRWeb::Application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Do not eager load code on boot.
config.eager_load = false
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
# per SMTP mails verschicken
config.action_mailer.delivery_method = :smtp
# smtp einstellungen
config.action_mailer.smtp_settings = {:address => "localhost", :port => 1025}
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Raise an error on page load if there are pending migrations
config.active_record.migration_error = :page_load
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
#config.force_ssl = true
#config.assets.css_compressor = :yui
#config.assets.js_compressor = :uglify
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
end
生产.rb
MyHWRWeb::Application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both thread web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
config.eager_load = true
# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Enable Rack::Cache to put a simple HTTP cache in front of your application
# Add `rack-cache` to your Gemfile before enabling this.
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
# config.action_dispatch.rack_cache = true
# Disable Rails's static asset server (Apache or nginx will already do this).
config.serve_static_assets = true
#config.assets.paths << Rails.root.join("app", "assets", "fonts")
#config.assets.css_compressor = :yui
#config.assets.js_compressor = :uglify
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = true
# config.assets.precompile += %w(reset.css bootstrap.min.css bootstrap-responsive.min.css font-awesome.css fancybox.css)
# config.assets.precompile += %w(modernizr.js bootstrap.js)
# config.assets.initialize_on_precompile = false
# Generate digests for assets URLs.
config.assets.digest = true
# Version of your assets, change this if you want to expire all your assets.
config.assets.version = '1.0'
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = true
# Set to :debug to see everything in the log.
config.log_level = :info
# Prepend all log lines with the following tags.
# config.log_tags = [ :subdomain, :uuid ]
# Use a different logger for distributed setups.
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# config.assets.precompile += %w( search.js )
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = {:host => 'myhwr.herokuapp.com'}
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.smtp_settings = {
:authentication => :plain,
:address => "smtp.mailgun.org",
:port => 587,
:domain => "*",
:user_name => "*",
:password => "*"
}
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found).
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
# Disable automatic flushing of the log to improve performance.
# config.autoflush_log = false
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
end
路线:
MyHWRWeb::Application.routes.draw do
get "courses/index"
get "studcourses/kurse"
get "studcourses/cfails"
get "courses/impressum"
get "courses/tutorial"
get "courses/about"
get "studcourses/new"
resources :cnames, except: [:show]
get '/cnames/:id', to: 'cnames#index'
resources :courses, except: [:show]
resources :studcourses, except: [:show]
devise_for :students
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
root 'courses#index'
# Example of regular route:
# get 'products/:id' => 'catalog#view'
# Example of named route that can be invoked with purchase_url(id: product.id)
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
# Example resource route (maps HTTP verbs to controller actions automatically):
# resources :products
# Example resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end
# Example resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end
# Example resource route with more complex sub-resources:
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', on: :collection
# end
# end
# Example resource route with concerns:
# concern :toggleable do
# post 'toggle'
# end
# resources :posts, concerns: :toggleable
# resources :photos, concerns: :toggleable
# Example resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
end
应用.rb
require File.expand_path('../boot', __FILE__)
require 'rails/all'
require "sprockets/railtie"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)
module MyHWRWeb
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 = 'Berlin'
# 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
config.i18n.enforce_available_locales = true
end
end
最后是 gemfile:
source 'https://rubygems.org'
ruby '2.0.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'
# Use sqlite3 as the database for Active Record
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'
gem "twitter-bootstrap-rails"
end
#gem 'jquery-rails', '>= 1.0.12'
# Use SCSS for stylesheets
#gem 'sass-rails'
# Use Uglifier as compressor for JavaScript assets
#gem 'uglifier'
# Use CoffeeScript for .js.coffee assets and views
#gem 'coffee-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'nokogiri'
gem 'mechanize'
# 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', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
gem 'devise'
#PW Schlüssel lokal abspeichern über env
gem 'figaro'
# Verschlüsselung des Feldes pw in Students
gem 'attr_encrypted'
#gem 'twitter-bootstrap-rails'
#gem 'protected_attributes'
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
感谢您的帮助!
最佳答案
您还可以做的是在本地为生产模式预编译您的 Assets
RAILS_ENV=production bundle exec rake assets:precompile:all
或
RAILS_ENV=production bundle exec rake assets:precompile
然后提交更改并将代码推送到服务器。
希望对您有所帮助!
关于jquery - Rails jquery 适用于本地主机,但不适用于 heroku,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21518461/
我正在尝试使用 Heroku Scheduler 在已部署的 Heroku 应用程序中调用 HTTP 端点,它基本上以固定速率在 Heroku bash 上运行命令。 当我运行 $ heroku ru
我有一个在 Heroku 上运行的应用程序,其中有一些我想不时更改的设置,并且我想使用 Heroku 配置变量来存储这些设置,以便它们持久存在。 我知道我可以从 Heroku 仪表板或 Heroku
我从模板 reagent-frontend 创建了一个 ClojureScript Reagent 应用程序。如何将生产应用程序部署到 Heroku?在为生产构建后(lein package/lein
我正在尝试在 heroku 上添加信用卡,然后消息显示“无法验证您的卡,请稍后再试或联系您的金融机构寻求帮助” 最佳答案 这是因为您的银行拒绝付款。 检查您是否输入了所有正确的详细信息 查看您银行的最
首先为我的英语感到抱歉,因为它不是我的母语,我不习惯它,它可能很难理解。 我正在尝试将我的 spike 应用程序连接到 heroku 以获取长期葡萄糖数据。 我在没有“部署分支”步骤的情况下成功完成了
Ec2 实例小时按小时计算。如果你只是启动和关闭一个实例,它仍然算作一小时。 Heroku 如何处理这个?按分钟还是按小时? 让我们假设我的应用程序使用超过 750 免费 Dyno 小时限制 最佳答案
好奇 heroku 如何创建应用程序名称。应用程序名称通常是英文单词,例如bloom-peaks 或formal-trail。一家大公司的 IT 部门也是如此。是否有用于名称生成的 unix 库? 最
有没有人在 Heroku 上成功使用过 docsplit?它有许多二进制依赖项。我已经搜索过,但没有找到任何人这样做。教程会很棒,但我真的很好奇其他人是否成功。 最佳答案 我的搜索没有找到任何做过这件
我想将一个应用程序部署到需要能够生成加密安全随机数的 heroku。我可以使用哪些熵源? 最佳答案 你的 Heroku dyno 基本上是一个 Ubuntu 服务器虚拟机,所以你应该可以访问 /dev
Heroku 可以显示自定义维护页面: heroku config:set MAINTENANCE_PAGE_URL=http://some_server/my_page.html 这需要某些网站的存
我正在开始使用 Heroku,并担心它是否会因我犯的错误而向我收费。例如,填充数据库超过 5MB。 那么,有没有办法为 Heroku 或通知系统设置计费限制,以便在我超过价格限制时发送通知? 先感谢您
如何更新我的 Heroku ,我的 Windows 终端显示以下内容: » Warning: heroku update available from 7.47.7 to 7.52.0. 请帮忙
我在免费的 Dyno 上运行基于 NodeJS 的应用程序,连接到 mongohq-MongoDB。我想迁移它以使用爱好 Dyno,这样做的动机不仅是避免 sleep 时间,而且是为了实现更高的 HT
关闭。这个问题是off-topic .它目前不接受答案。 想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。 9年前关闭。 Improve this q
如何将我的生产数据库拉到 heroku 上的暂存服务器? 我有两个 Remote ,production 和 staging。 来自documentation看来我想运行 heroku pg:copy
我有一个域example.com,我想将它用于位于example.herokuapp.com 的rails-app,我很困惑如何去做。 Heroku says "Zone apex domains (
我有一个 sinatra 应用程序,其中有一个 yml 文件来设置环境变量,我使用此方法调用它们 module MyConfig def config environment = ENV["RA
根据各种因素,一整天中,我的应用程序的负载可能会出现非常极端的增加。 那时,我想自动增加测功机的数量。 我想增加加载时间。因此,如果加载页面需要X倍的时间,请增加测功力。否则,请往下走。 这样的东西存
我想知道使用heroku工具栏在heroku帐户之间进行切换的最佳方法是什么。 我曾经有一个个人的heroku帐户,它是我所有职业性的heroku应用程序的协作者。问题是当我想进行一些对财务有影响的更
是否可以停止部署到当前正在构建的 Heroku ( git push heroku )? 类似 heroku run stopit! 顺便提一句。成功部署后回滚不是我想要的。 最佳答案 首先,安装He
我是一名优秀的程序员,十分优秀!