Tag: heroku

exception_notification gem仅在Heroku生产模式下引发ActionView :: Template :: Error(未找到代码转换器(UTF-8到UTF-16))

我创建了部署在Heroku上的rails app。 此外,启用了exception_notification gem。 当它在开发设置ActionMailer到Gmail时,一切正常,并从Gmail地址发送通知。 但是当涉及到Heroku上的生产环境时,我在服务器尝试发送电子邮件时遇到以下错误。 ActionView::Template::Error (code converter not found (UTF-8 to UTF-16)) 谁能告诉我这里发生了什么?

在Heroku上,“PGError:致命:由于管理员命令终止连接”的原因是什么?

我在heroku上有一个用户登录的rails应用程序。 我定期得到这个例外: UserSessionsController#(ActiveRecord :: StatementInvalid)“PGError:FATAL:由于管理员命令而终止连接\ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n \ n意外关闭连接\ n \ t这可能意味着服务器exception终止\ n \ t \ n … … url POST http://secure.huckberry.com/user_sessions 这有什么可能的原因? 我很感激任何帮助。

推送到Heroku时无法从远程存储库中读取(Rails教程5)

我将Sample_App的第5章版本推送到git,然后当我’git push heroku’时,我得到: warning: push.default is unset; its implicit value is changing in Git 2.0 from ‘matching’ to ‘simple’. To squelch this message and maintain the current behavior after the default changes, use: git config –global push.default matching To squelch this message and adopt the new behavior now, use: git config –global push.default simple See […]

如何调整在Heroku上运行的Ruby on Rails应用程序,它使用生产级Heroku Postgres?

我工作的公司决定将他们的整个堆栈移动到Heroku。 它的主要动机是易用性:没有sysAdmin,没有哭。 但我仍然有一些问题…… 我正在应用程序平台和Postgres服务上进行一些负载和压力测试。 我正在使用blitz作为Heroku的插件。 我用1到250之间的用户数攻击网站。我得到了一些非常有趣的结果,我需要帮助评估它们。 测试堆栈: 应用规格 它没有任何特别的东西。 Rails 4.0.4 独角兽 database.yml设置为连接到Heroku postgres。 不使用缓存。 数据库 这是一个标准天狗 (Heroku的命名惯例会杀了我一天:)正确连接到应用程序。 Heroku配置 我在unicorn.rb应用了所有内容,如“ 使用Unicorn部署Rails应用程序 ”一文中所述。 我有2个常规的网络动态。 WEB_CONCURRENCY : 2 DB_POOL : 5 数据 episodes表数100.000~ episode_urls表计数300.000~ episode_images表计数episode_images ~ 码 episodes_controller.rb def index @episodes = Episode.joins(:program).where(programs: {channel_id: 1}).limit(100).includes(:episode_image, :episode_urls) end episodes/index.html.erb 场景#1: Web dynos : 2 Duration : 30 seconds […]

使用Taglib-Ruby为Web应用程序构建自定义Heroku Ruby / Rails Buildpack

我使用Rails 3.2构建了一个使用taglib-ruby gem的应用程序。 我需要将此应用程序上传到Heroku,但它无法成功构建taglib-ruby gem,因为需要在计算机上安装关联的C ++ taglib库。 Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb checking for main() in -lstdc++… yes checking for main() in -ltag… no You must have taglib installed in order to use taglib-ruby. Debian/Ubuntu: sudo apt-get install libtag1-dev Fedora/RHEL: sudo yum install taglib-devel Brew: brew install taglib MacPorts: sudo […]

Heroku推送拒绝:在源代码中找不到jquery-rails-2.0.0

我正在尝试将一个Enki gem博客推向Heroku,我收到了一个错误 Could not find jquery-rails-2.0.0 in any of the sources 但是,在Gemfile中我有 `gem ‘jquery-rails’` 我以前从来没有遇到过使用此设置推送Enki博客的问题。 这是完整的错误消息 Running: bundle install –without development:test –path vendor/bundle –binstubs bin/ –deployment Fetching gem metadata from https://rubygems.org/……. Could not find jquery-rails-2.0.0 in any of the sources ! ! Failed to install gems via Bundler. ! ! Heroku push rejected, failed to […]

嵌入式字体渲染然后消失

我有一个网站加载一些typekit字体和嵌入式图标字体。 它们似乎都适合所有浏览器。 但是,如果浏览器窗口在一段时间内处于非活动状态,它们将消失,系统字体将在其位置呈现。 重新调整浏览器大小似乎可以解决问题并重新出现嵌入字体。 这个问题很难重新创建,因为它似乎不会一直发生,但它确实会在很多时候发生。 到目前为止,我只看到它发生在Chrome中。 其他细节:该网站托管在Heroku,Rails 4,Turbolinks关闭。 字体嵌入图标字体: @font-face { font-family: ‘icomoon’; src:url(‘../fonts/icomoon.eot’); src:url(‘../fonts/icomoon.eot?#iefix’) format(’embedded-opentype’), url(‘../fonts/icomoon.woff’) format(‘woff’), url(‘../fonts/icomoon.ttf’) format(‘truetype’), url(‘../fonts/icomoon.svg#icomoon’) format(‘svg’); font-weight: normal; font-style: normal; -webkit-font-smoothing: antialiased; } Typekit标头 try{Typekit.load();}catch(e){} 有任何想法吗?

在Heroku上运行连续运行的工作进程

在Heroku上运行连续工作进程的最佳方法是什么? 我的应用程序需要这个过程全天候运行,所以delayed_job或其他队列似乎有点矫枉过正。 我可以通过Heroku控制台手动触发该过程,我可以分离它自己运行。 最好,我想将这个单一方法调用分配给一个dyno,这样当我的应用程序启动时,它会启动额外的worker-dyno,然后调用我的单个方法并开始哼唱。 但不确定如何分配该方法调用? 我可以使用延迟的工作,它可以解决所有问题,但似乎我需要的是一个直接(当被调用)而没有安排的单一活动。 但也许这是唯一的方法。

安装sqlite3(1.3.7)时发生错误,Bundler无法继续

当我使用命令git push heroku master时,我收到此错误。 $ git push heroku master Counting objects: 126, done. Delta compression using up to 8 threads. Compressing objects: 100% (110/110), done. Writing objects: 100% (126/126), 36.61 KiB, done. Total 126 (delta 19), reused 0 (delta 0) —–> Removing .DS_Store files —–> Ruby/Rails app detected —–> Installing dependencies using Bundler version 1.3.2 […]

为什么没有“heroku捆绑更新”?

我不明白为什么我必须更新我的gems localy并将其推送到heroku,以获得它们的更新版本? 为什么没有heroku bundle update命令?