Tag: heroku

Heroku是否支持ActionController :: Live?

我有一个在Heroku上托管的Rails应用程序,我想添加Server Sent Eventsfunction,但我找不到任何特定于Heroku的文档或博客文章。 由于并非所有服务器(例如WEBrick)都支持ActionController :: Live,我想知道Heroku上的默认服务器是什么,以及是否可以配置环境(即更改服务器)以支持SSE。 关于服务器使用和如何配置的任何进一步建议将不胜感激。

发布在Heroku上validationRails应用程序的用户时区

我正在关注Ryan Bates关于为rails应用程序添加时区的教程。 http://railscasts.com/episodes/106-time-zones-revised (顺便说一下,这是一个很好的教程) 无论如何,Ryan说用Rails知道的提交时区来validation提交的时区是个好主意。 他把这个规则放到了用户的模型中: validates_inclusion_of :time_zone, in: ActiveSupport::TimeZone.zones_map(&:name) 这在开发中工作得很好。 但是,当我在Heroku上运行应用程序时,它不喜欢时区“墨尔本”(和许多其他人 – 我主要测试AU时区)。 在Heroku上,在用户模型中使用该规则,它将不接受“墨尔本”的时区。 那为什么会这样? time_zone_select视图助手返回“墨尔本” – 因此rails必须知道它。

无法在生产中实例化模块

我只是把我的程序推到了heroku上,我测试的角度加载了以下错误: 未捕获错误:[$ injector:modulerr]由于以下原因无法实例化模块diceAngularApp:错误:[$ injector:unpr]未知提供者:t 它在开发中工作得很好,所以我不确定问题是什么。 要查看错误,您可以访问www.firexion.com/dice页面 我不确定问题的确切位置,所以我不确定要分享哪些代码。 这是github的链接: https : //github.com/Firexion/hundred 我的猜测可能是在角度app.js可能吗?: ‘use strict’; angular .module(‘diceAngularApp’, [ ‘ngCookies’, ‘ngResource’, ‘ngSanitize’, ‘ngRoute’ ]) .config(function ($routeProvider) { $routeProvider .when(‘/dice’, { templateUrl: ‘../../views/dice/main.html’, controller: ‘DiceController’ }) .otherwise({ redirectTo: ‘/dice’ }); }); 或者我可能在我的rails应用程序javascript文件中包含错误,lumen.js: // Lumen // Bootswatch //= require jquery-2.1.0 //= require jquery_ujs //= require lumen/loader //= require lumen/bootswatch […]

Heroku在我的Ruby on Rails应用程序中找不到文件 – 即使它们就在那里?

当我尝试访问我的网站,然后检查我的Heroku日志,我看到这个错误: ActionView :: Template :: Error(无法找到文件’reset’2012-06-13T02:31:43 + 00:00 app [web.1] :(在/app/app/assets/stylesheets/application.css :4)): (application.css包含行* = require reset) 然后我想运行“heroku run bundle exec rake assets:precompile:all”但这会产生类似的错误: —–> Preparing app for Rails asset pipeline Running: rake assets:precompile rake aborted! couldn’t find file ‘main/first.js.coffee’ (in /tmp/build_3428u21sggsoc/app/assets/javascripts/application.js:1) Tasks: TOP => assets:precompile:primary (该文件是我的application.js中第一个需要的文件,其第一行是“// = require main / first.js.coffee”) 总结:我的应用程序在本地运行良好,但是当我部署到Heroku时,无法再找到这些文件。 有什么想法吗? 编辑:这是项目树。 (在应用程序之前还有一个目录,这是主项目目录,它还包含config,db,log等) 另一个编辑:.gitignore或.slugignore没有问题。

由于Gemfile.lock不存在,无法将redmine部署到HEROKU

在推送/部署到Heroku时我遇到了这个特殊错误 Counting objects: 92259, done. Delta compression using up to 4 threads. Compressing objects: 100% (19977/19977), done. Writing objects: 48% (45054/92259), 13.63 MiB | 103 KiB/s Writing objects: 100% (92259/92259), 23.82 MiB | 87 KiB/s, done. Total 92259 (delta 72165), reused 90569 (delta 70774) —–> Ruby/NoLockfile app detected ! ! Gemfile.lock required. Please check it […]

如何在Cloud9 IDE dev服务器中处理Twilio回发?

我正在Cloud9 IDE中构建Rails应用程序,部分应用程序涉及交互式语音响应。 最终用户调用Twilio电话号码,然后Twilio POST进入Rails应用程序。 在Heroku上部署时,该应用程序运行正常,但部署过程是一个额外的步骤。 我想直接指向Twilio在Cloud9中运行的应用程序,但它不起作用。 Cloud9要求登录以访问开发服务器URL,并且Twilio无法登录。 有没有办法告诉Cloud9不要求登录才能访问我的开发服务器? 我只想进行编辑,点击运行,拨打我的Twilio号码并进行测试。 就像现在一样,我必须在每次迭代时进行git提交并部署到Heroku。 救命! ;)

heroku运行db:migrate因rake中止而失败

在推送我的最新代码后,Heroku不会改变表格。 当我运行“heroku rake db:migrate”时,我得到了佣金中止! 它说语法错误,但我不知道哪里是错误 syntax error on line 4, col 586: ` state: [“σלקµ╡╖Θבף”,”Θ¥עµú«τ£ל”,”σ▓⌐µיכτ£ל”,”σ««σƒמτ£ל”,”τºכτפ░τ£ל”,”σ▒▒σ╜óτ£ל”,”τªןσ│╢τ£ל”,”Φל¿σƒמτ£ל”,”µáדµ£¿τ£ל”,”τ╛ñΘª¼τ£ל”,”σƒ╝τמיτ£ל”,”σםדΦסיτ£ל”,”µ¥▒Σ║¼Θד╜”,”τÑ₧σÑטσ╖¥τ£ל”,”µצ░µ╜ƒτ£ל”,”σ»לσ▒▒τ£ל”,”τƒ│σ╖¥τ£ל”,”τªןΣ║ץτ£ל”,”σ▒▒µó¿τ£ל”,”Θץ╖Θחמτ£ל”,”σ▓נΘר£τ£ל”,”Θ¥שσ▓íτ£ל”,”µה¢τƒÑτ£ל”,”Σ╕יΘחםτ£ל”,”µ╗כΦ│אτ£ל”,”Σ║¼Θד╜σ║£”,”σñºΘר¬σ║£”,”σו╡σ║½τ£ל”,”σÑטΦי»τ£ל”,”σעלµ¡לσ▒▒τ£ל”,”Θ│Ñσןצτ£ל”,”σ│╢µá╣τ£ל”,”σ▓íσ▒▒τ£ל”,”σ║דσ│╢τ£ל”,”σ▒▒σןúτ£ל”,”σ╛│σ│╢τ£ל”,”Θªשσ╖¥τ£ל”,”µה¢σ¬¢τ£ל”,”Θ½רτƒÑτ£ל”,”τªןσ▓íτ£ל”,”Σ╜נΦ│אτ£ל”,”Θץ╖σ┤מτ£ל”,”τזךµ£¼τ£ל”,”σñºσטזτ£ל”,”σ««σ┤מτ£ל”,”Θ╣┐σונσ│╢τ£ל”,”µ▓צτ╕הτ£ל”]’ /usr/local/lib/ruby/1.9.1/syck.rb:135:in `load’ /usr/local/lib/ruby/1.9.1/syck.rb:135:in `load’ /usr/local/lib/ruby/1.9.1/syck.rb:146:in `block in load_file’ /usr/local/lib/ruby/1.9.1/syck.rb:145:in `open’ /usr/local/lib/ruby/1.9.1/syck.rb:145:in `load_file’ /app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/base.rb:172:in `load_yml’ /app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/base.rb:157:in `load_file’ /app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/base.rb:15:in `block in load_translations’ /app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/base.rb:15:in `each’ /app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/base.rb:15:in `load_translations’ /app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/simple.rb:57:in `init_translations’ /app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/simple.rb:71:in `lookup’ /app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/base.rb:26:in `translate’ /app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/fallbacks.rb:44:in `block (2 levels) in translate’ /app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/fallbacks.rb:43:in `catch’ /app/vendor/bundle/ruby/1.9.1/gems/i18n-0.6.1/lib/i18n/backend/fallbacks.rb:43:in `block […]

Excon无法识别我的SSL路由

当推送到Heroku时,我的db:migrate在以下情况下失败: ! Heroku client internal error. Error: Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, or `Excon.defaults[:ssl_verify_peer] = false` (less secure). (Excon::Errors::SocketError) 所以,我将以下内容添加到我的production.rb文件的底部(我的证书在根文件中) Excon.defaults[:ssl_ca_path] = Rails.root 同样的错误。 所以我接着尝试了后备: Excon.defaults[:ssl_verify_peer] = false 同样的错误。 我很难过,并且已经绕圈数小时了。 有任何想法吗? 提前致谢

Heroku上的Rails应用程序无法写入PostgreSQL数据库,只能读取

我有一个Ruby on Rails应用程序,可以在本地使用sqlite3数据库,并且可以毫无问题地保存和检索记录。 当使用postgresql数据库在http://moviedata.herokuapp.com/上部署到Heroku时,记录不会保存,即使它看起来像日志说的那样。 从db精细读取的记录和数据按预期显示。 添加记录的尾标记日志是: 2012-08-21T19:51:31+00:00 app[web.1]: 2012-08-21T19:51:31+00:00 app[web.1]: 2012-08-21T19:51:31+00:00 app[web.1]: Started POST “/” for 50.53.6.156 at 2012-08-21 19:51:31 +0000 2012-08-21T19:51:31+00:00 app[web.1]: Parameters: {“utf8″=>”✓”, “authenticity_token”=>”+BYQLzhrfDkUVW8UaHikHpmtGHxpeQ/yF4VByHh9m1I=”, “movie”=>{“title”=>”The Running Man”, “description”=>”A documentary about a public execution game show.”, “year”=>”1987”, “genre”=>”science fiction”}, “commit”=>”Create Movie”} 2012-08-21T19:51:31+00:00 app[web.1]: Processing by MoviesController#index as HTML 2012-08-21T19:51:31+00:00 app[web.1]: Rendered movies/index.html.erb within layouts/application […]

Heroku安装sqlite3,即使它不是依赖

我正在尝试将我的应用程序部署到Heroku,但它继续被以下输出拒绝。 waitup$git push staging master Counting objects: 4184, done. Delta compression using up to 4 threads. Compressing objects: 100% (1033/1033), done. Writing objects: 100% (4184/4184), 1.11 MiB | 494 KiB/s, done. Total 4184 (delta 3069), reused 4184 (delta 3069) —–> Heroku receiving push —–> Ruby/Rails app detected —–> Installing dependencies using Bundler version 1.2.1 Running: […]