Tag: heroku

Rit错误与git push heroku master错误

我正试图把我的git推到heroku上。 为此,我使用: $ git push heroku master 回报: remote: –without-sqlite3-lib=${sqlite3-dir}/ remote: remote: remote: Gem files will remain installed in /tmp/build_ae596310505cf83afbb45a2986208c96/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.11 for inspection. remote: Results logged to /tmp/build_ae596310505cf83afbb45a2986208c96/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.11/ext/sqlite3/gem_make.out remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot remote: continue. remote: Make sure that `gem install sqlite3 -v ‘1.3.11’` succeeds before bundling. remote: ! remote: […]

ActiveRecord :: StatementInvalid:PG ::错误:错误:无法在Heroku中的只读事务错误中执行UPDATE

我使用关注者在Heroku上创建了一个新数据库。 在它提交0后,我取消关注主数据库并将其作为默认值提升。 似乎工作正常,但看起来只读。 当我尝试从控制台中删除记录时,我看到了这个错误 ActiveRecord::StatementInvalid: PG::Error: ERROR: cannot execute UPDATE in a read-only transaction 知道怎么解决这个问题吗?

Heroku不显示SCSS背景图像

我有一个Rails应用程序,它使用style.css.scss文件中的背景图像。 我找到了多种方法让图像显示在localhost ,但没有办法让它们显示在Heroku上。 我已经看过很多关于SO的post,就像这样 ,以及其他像这样的网站,但到目前为止还没有任何工作。 这是我在style.css.scss的代码: .hero-000 { width: 102%; background: url(asset-path(“hero-000.jpg”)) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } 但是,我还尝试了在链接的SOpost中找到的background-image , image-url , asset-url和许多其他排列。 我在我的production.rb文件中有这个: config.serve_static_files = true config.action_dispatch.x_sendfile_header = ‘X-Accel-Redirect’ config.assets.compile = true config.assets.digest = true 这在我的application.html.erb文件中调用css表: true %> 正如其他post所建议的,我已将此添加到我的application.rb: config.assets.initialize_on_precompile = false 关于如何解决这个问题的任何想法都会很高兴收到! 附加信息 这是我的gemfile: source ‘https://rubygems.org’ […]

Heroku部署的应用程序错误

我正在Heroku上部署一个网站,但是当我尝试运行“heroku open”时,我收到了“应用程序错误”。 我相信我已成功将文件推送到Heroku,这是我的“git push heroku master”代码的一部分: —–> Ruby/Rails app detected —–> Using Ruby version: ruby-1.9.3 —–> Installing dependencies using Bundler version 1.3.2 Ruby version change detected. Clearing bundler cache. Old: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux] New: ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux] Running: bundle install –without development:test –path vendor/bundle –binstubs vendor/bundle/bin –deployment 当我运行“heroku config […]

在Heroku上运行Rails时如何获取应用程序名称?

这意味着app-name.heroku.com。 请注意,这与Rails.application.class.parent_name不同。 Rails.application.class.parent_name在应用程序中定义。 在Rails中工作3。

为Heroku安装PostgreSQL gem pq

这里的第一个问题,但我现在非常感谢你,因为stackoverflow在michael hartl tut的第一章中帮了我近15次。 现在我正在尝试使用此命令安装PostgreSQL(pg gem): ` group :production do gem ‘pg’, ‘0.15.1’ gem ‘rails_12factor’, ‘0.0.2’ end` 但它显示出错误 -bash: group: command not found 然后我尝试直接安装(?)gem gem install pg 但它显示了另一个错误 `Fetching: pg-0.17.1.gem (100%) Building native extensions. This could take a while… ERROR: Error installing pg: ERROR: Failed to build gem native extension. rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb checking for pg_config… no […]

heroku推送错误:“无法检测到rake任务”

我正在尝试部署一个基本的应用程序,但它不起作用。 运用 git push heroku master 我收到此错误消息: remote: ! Could not detect rake tasks remote: ! ensure you can run `$ bundle exec rake -P` against your app remote: ! and using the production group of your Gemfile. remote: ! rake aborted! remote: ! LoadError: cannot load such file — /tmp/build_a1cfcabff50107f84830d908386197b2/config/application remote: ! /tmp/build_a1cfcabff50107f84830d908386197b2/Rakefile:4:in `require’ […]

Heroku捆绑器不删除旧gem版本

我刚刚更新了几个gem,但是当我推送到heroku时,旧的仍然被复制到vendor / bundler中并且我有一条消息 Using bson (1.8.2) […] Would have removed bson (1.5.2) 实际上,在vendor / bundler中,旧的gem仍然被复制。 但是,如果我创建一个新的雪松应用程序并从头开始推送到Heroku,那么旧的gem不会被复制到vendor / bundle中,它会按预期工作。 旧的gem版本既不在Gemfile中也不在Gemfile.lock中,所以我不明白heroku bundler在哪里得到这个(过时的)信息。 任何提示? 谢谢,马可

Heroku + Rails 3.1:asset_path未定义?

我尝试将rails 3.1.3 app部署到heroku,但在浏览页面时不断收到以下错误: ActionView::Template::Error (undefined method `asset_path’ for #<#:0x00000002e52480>): 我使用heroku推荐的“雪松”堆栈。 知道为什么我会遇到这个问题吗? 我是否需要进行更多配置? 提前致谢! 编辑:再次工作。 我忘了在application.rb中添加“require’sprockets / railtie’”…

如何避免像没有dynos一样多次调用Rufus调度程序?

我在Heroku运行一个rails应用程序,我使用Rufus Scheduler 。 我的应用程序使用多个dyno并且调度程序在每个dyno上运行而不仅仅是一个,因此我的预定事件多次触发(每个dyno一次)。 我怎么能避免这个?