Tag: heroku

Heroku生产错误:PG ::错误:错误:关系“用户”已存在错误

部署到Heroku通常像拔牙一样? 我已经尝试了一个星期,错误后出错了。 我已经联系了Heroku支持,他们建议我尝试stackoverflow。 所以这就是它。 我刚刚按照指南将我的Devise升级到2.0架构: https : //github.com/plataformatec/devise/wiki/How-To :-Upgrade-to-Devise-2.0-migration-schema-style。 请参阅此处的代码库:www.github.com/apane/blogit_blog 我现在有以下错误(这应该是em的最后一个’) — create_table(:users) NOTICE: CREATE TABLE will create implicit sequence “users_id_seq1” for serial column “users.id” rake aborted! An error has occurred, this and all later migrations canceled: PG::Error: ERROR: relation “users” already exists : CREATE TABLE “users” (“id” serial primary key, “email” character varying(255) DEFAULT […]

Heroku + Rails错误ActiveRecord :: StatementInvalid

我在这里遇到了一些困境。 我有一个评论脚手架和一个电影脚手架 当去电影页面并创建新评论时,我去这里/ movies / 12 / comments / new(12是id) 并且做了我的控制器 def new @movie = Movie.find(params[:movie_id]) @comment = @movie.comments.new @search = Movie.search(params[:q]) respond_to do |format| format.html # new.html.erb format.json { render json: @comment } end end 但是当我启动到heroku时,我得到了这个错误 *Processing by CommentsController#new as HTML ActiveRecord::StatementInvalid (PG::Error: ERROR: invalid input syntax for integer: “movie_id” Completed 500 Internal Server […]

无法部署到Heroku,因为服务器拒绝连接

我想将我的本地Rails应用程序(完美地运行)部署到Heroku,但是收到以下错误消息: rake aborted! could not connect to server: Connection refused Is the server running on host “127.0.0.1” and accepting TCP/IP connections on port 5432? /tmp/build_21pkcz898c28o/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `initialize’ 其次是关于postgres_adapter的很多行。 我有点失望,因为我认为Heroku覆盖了config / database.yml,所以为什么它谈论在127.0.0.1上运行服务器(我不是在寻找远程数据库)? 谢谢, 更新 如果这有帮助,运行heroku config将提供以下内容: DATABASE_URL: xxx HEROKU_POSTGRESQL_GRAY_URL: xxx (the same xxx as above)

图像似乎被添加到桶中,无法在我的应用程序上查看它

我刚刚将回形针实现到我在heroku上托管的rails应用程序中。 该应用程序似乎连接并将图像上传到s3。 以下是我在应用程序上提交表单时的一些日志示例: 2013-06-01T17:52:45.112448+00:00 app[web.1]: Parameters: {“utf8″=>”✓”, “authenticity_token”=>”2/vRFLrAnBnokNwohVfMhG74d3HN0/GTwype2jGJm9w=”, “illustration”=>{“name”=>”Test”, “illustrator”=>”Test”, “image”=>#<ActionDispatch::Http::UploadedFile:0x000000050d9a58 @original_filename="DEISIGN_Cover_Illustration.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"illustration[image]\"; filename=\"DEISIGN_Cover_Illustration.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#>, “edition_id”=>”17”, “tag_list”=>”Test”, “description”=>”Test”}, “commit”=>”Update Illustration”, “id”=>”199″} 2013-06-01T17:52:45.113280+00:00 app[web.1]: [AWS S3 200 0.424977 0 retries] head_object(:bucket_name=>”haggard”,:key=>”illustrations/images/000/000/199/original/DEISIGN_Cover_Illustration.jpg”) 2013-06-01T17:52:45.113496+00:00 app[web.1]: 2013-06-01T17:52:45.113496+00:00 app[web.1]: [AWS S3 200 0.085094 0 retries] head_object(:bucket_name=>”haggard”,:key=>”illustrations/images/000/000/199/thumb/DEISIGN_Cover_Illustration.jpg”) 2013-06-01T17:52:45.113496+00:00 app[web.1]: 2013-06-01T17:52:45.624956+00:00 app[web.1]: [AWS S3 204 0.099689 0 retries] […]

Config Tire与Bonsai ElasticSearch Heroku附加组件一起使用

所以我有一个rails 3.2 app。 我创建了一个索引。 我按照本指南: https ://gist.github.com/nz/2041121在config/initializers/bonsai.rb创建一个bonsai.rb文件它看起来像这样: ENV[‘ELASTICSEARCH_URL’] = ENV[‘BONSAI_URL’] # Optional, but recommended: use a single index per application per environment. # Caveat: This convention not be entirely supported throughout Tire’s API. app_name = Rails.application.class.parent_name.underscore.dasherize app_env = Rails.env INDEX_NAME = “#{app_name}-#{app_env}” 但是我的工作,这个来自heroku日志的外包: 2013-03-06T17:04:54+00:00 app[web.1]: Processing by SchoolsController#index as HTML 2013-03-06T17:04:54+00:00 app[web.1]: Started GET “/trafikskola?utf8=%E2%9C%93&query=Malm%C3%B6” […]

部署到heroku时Bundler gem兼容性问题。

部署到heroku时收到以下错误消息: Bundler could not find compatible version for gem “railties”: In Gemfile: rails (= 4.0.0) ruby depends on railties (= 4.0.0) ruby coffee-rails (= 4.0.0) ruby depends on railties (4.0.1.rc1) Failed to install gems via Bundler 的Gemfile source ‘https://rubygems.org’ ruby ‘1.9.3’ gem ‘rails’, ‘4.0.0’ gem ‘bcrypt-ruby’, ‘3.0.1’ gem ‘faker’, ‘1.1.2’ gem ‘will_paginate’, ‘3.0.4’ gem ‘will_paginate-bootstrap’ […]

在Heroku上托管的ROR中,在2个站点上显示一个具有不同前端但相同后端的应用程序

我在rails中有一个应用程序,并在Heroku上托管。 现在,我想要的是可以从2个不同的域访问应用程序,当从假设a.com访问应用程序它应该有一个特定的前端,并且当从b.com访问时它应该显示一些其他前端。 两者的后端应该相同。 为了达到这个目的,我想我只有一种方法,就是让两个不同的应用程序使用相同的支持代码和相同的数据库(我正在使用PostgreSQL)。 我需要一些帮助,如何实现这一点,如果没有,那么其他一些替代方案。

如何从使用Heroku PG备份的备份中恢复三个项目?

我在Heroku上运行了一个Rails应用程序并安装了免费的pgbackups插件。 我想从备份中恢复三条记录。 根据Heroku docs进行还原时,它会还原整个数据库。 如何恢复这三个记录?

在Heroku上可以实现像websocket一样的实时行为吗?

我正在考虑在Rails中创建一个国际象棋应用程序,其中需要异步地将服务器从服务器推送到客户端浏览器(理想情况下使用websockets)。 但是,从我做过的很少的研究来看,Heroku似乎不支持websockets。 但是有一种替代方法可以使用socket.io配置为使用长轮询而不是websockets。 国际象棋的5分钟闪电战游戏是否足以实现延迟轮询?

根域无法正常工作

我使用Heroku说明在我的Heroku应用程序中设置了Zerigo DNS插件,用于添加自定义域。 打开www.spotty.rs时它可以正常工作。 我还在Heroku面板中添加了spotty.rs作为域,并在Zerigo中添加了REDIRECT记录(重定向到www.spotty.rs)。 当我在浏览器中键入spotty.rs时,它有时会将我重定向到www.spotty.rs,有时我会遇到Application错误。 在控制台中,heroku log命令显示H70错误,该错误指出未正确设置DNS记录。 知道为什么会这样吗? 我两天前做了这个改变。 是否可能需要时间来传播DNS更改?!