- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
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_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:796:in `initialize'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:796:in `new'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:796:in `connect'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:513:in `initialize'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql_connection'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in `new_connection'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:450:in `checkout_new_connection'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in `acquire_connection'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:356:in `block in checkout'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in `checkout'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:546:in `retrieve_connection'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_handling.rb:79:in `retrieve_connection'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_handling.rb:53:in `connection'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/model_schema.rb:203:in `table_exists?'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/acts-as-taggable-on-2.4.1/lib/acts_as_taggable_on/acts_as_taggable_on/cache.rb:5:in `included'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/acts-as-taggable-on-2.4.1/lib/acts_as_taggable_on/taggable.rb:98:in `include'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/acts-as-taggable-on-2.4.1/lib/acts_as_taggable_on/taggable.rb:98:in `taggable_on'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/acts-as-taggable-on-2.4.1/lib/acts_as_taggable_on/taggable.rb:39:in `acts_as_taggable_on'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/acts-as-taggable-on-2.4.1/lib/acts_as_taggable_on/taggable.rb:15:in `acts_as_taggable'
/tmp/build_5h4sx2s7f96x/app/models/op.rb:37:in `<class:Op>'
/tmp/build_5h4sx2s7f96x/app/models/op.rb:20:in `<top (required)>'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc1/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc1/lib/active_support/dependencies.rb:228:in `block in require'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc1/lib/active_support/dependencies.rb:213:in `load_dependency'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc1/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc1/lib/active_support/dependencies.rb:329:in `require_or_load'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc1/lib/active_support/dependencies.rb:288:in `depend_on'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc1/lib/active_support/dependencies.rb:206:in `require_dependency'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/engine.rb:465:in `block (2 levels) in eager_load!'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/engine.rb:464:in `each'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/engine.rb:464:in `block in eager_load!'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/engine.rb:462:in `each'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/engine.rb:462:in `eager_load!'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/engine.rb:347:in `eager_load!'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/application/finisher.rb:56:in `each'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/initializable.rb:30:in `run'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/application.rb:214:in `initialize!'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/railtie/configurable.rb:30:in `method_missing'
/tmp/build_5h4sx2s7f96x/config/environment.rb:5:in `<top (required)>'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc1/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc1/lib/active_support/dependencies.rb:228:in `block in require'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc1/lib/active_support/dependencies.rb:213:in `load_dependency'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc1/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/application.rb:188:in `require_environment!'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc1/lib/rails/application.rb:248:in `block in run_tasks_blocks'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0.rc4/lib/sprockets/rails/task.rb:16:in `block (2 levels) in define'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:205:in `block in invoke_prerequisites'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:203:in `each'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:203:in `invoke_prerequisites'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:183:in `block in invoke_with_call_chain'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
Tasks: TOP => environment
(See full trace by running task with --trace)
NOTICE: Please install 'typhoeus' gem for optimal performance.
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby/Rails app
To git@heroku.com:bestofama.git
! [remote rejected] master -> master (pre-receive hook declined)
我不确定这是否是数据库连接问题?
https://github.com/andey/bestofama/blob/master/config/database.yml
但它认为 heroku 无论如何都会覆盖生产配置?
可能是 acts as taggable 的问题。但为什么?该应用程序在本地运行良好。顺便说一句:这是我第一次尝试部署 ruby 2.0.0 和 rails 4 升级。
最佳答案
Rails 正在 Assets 编译阶段尝试连接到您的数据库。这可以通过以下方式禁用:
配置/应用程序.rb
config.assets.initialize_on_precompile = false
您可以让heroku在 Assets 编译期间访问环境
heroku labs:enable user-env-compile
关于ruby-on-rails - Heroku Rails 4/Ruby 2.0.0 部署失败,生产数据库不可连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17016168/
我正在尝试将抓取的 xml 输出写入 json。由于项目不可序列化,抓取失败。 从这个问题来看,它建议您需要构建一个管道,未提供的答案超出了问题 SO scrapy serializer 的范围。 所
有没有一种方法可以通过重载函数来区分参数是在编译时可评估还是仅在运行时可评估? 假设我有以下功能: std::string lookup(int x) { return table::va
我正在使用 MVVM 模式编写一个应用程序。我通过将 View 的 DataContext 属性设置为 ViewModel 的实例来向 View 提供数据。一般来说,我只是从那里使用 Binding
对于一个项目,我正在使用带有简单 python module 的传感器收集多个红外命令。 . 我收到如下字节字符串: commando1= b'7g4770CQfwCTVT9bQDAzVEBMagGR
我有一个计算方法,可以在用户使用 Cartridge 作为我的商店框架结账时计算税费。 税 = 税 * 小数(str(settings.SHOP_DEFAULT_TAX_RATE)) 计算工作正常。然
我正在用 pygame 制作一个绘图程序,我想在其中为用户提供一个选项来保存程序的确切状态,然后在稍后重新加载它。在这一点上,我保存了我的全局字典的副本,然后遍历, pickle 每个对象。 pyga
在 C++11 之前,我可以使用它来使类不可复制: private: MyClass(const MyClass&); MyClass& operator=(const MyClass&); 使用 C
大家好 :) 我在我的 VC++ 项目中使用 1.5.4-all (2014-10-22)(适用于 x86 平台的 Microsoft Visual C++ 编译器 18.00.21005.1)。 我
我有一个 python 文件:analysis.py: def svm_analyze_AHE(file_name): # obtain abp file testdata = pd.
这个问题已经有答案了: How to serialize SqlAlchemy result to JSON? (37 个回答) 已关闭 4 年前。 我正在编写小查询来从 mysql 获取数据数据库,
我是 Python 初学者,我在 JSON 方面遇到了一些问题。在我正在使用的教程中有两个函数: def read_json(filename): data = [] if os.pa
我目前正在开发一个针对 iPad 的基于 HTML5 Canvas/JavaScript 的小型绘图应用程序。它在 Safari 中运行。到目前为止,除了一件事之外,一切都进展顺利。 如果我旋转设备,
以下代码无法使用 Visual Studio 2013 编译: #include struct X { X() = default; X(const X&) = delete;
嗨,我制作了一个文本分类分类器,我在其中使用了它,它返回一个数组,我想返回 jsonresponse,但最后一行代码给我错误 'array(['cycling'], dtype =object) 不可
我使用 Flask 和 Flask-Login 进行用户身份验证。 Flask-Sqlalchemy 将这些模型存储在 sqlite 数据库中: ROLE_USER = 0 ROLE_ADMIN =
如果您尝试发送不可 JSON 序列化的对象(列表、字典、整数等以外的任何对象),您会收到以下错误消息: "errorMessage": "Object of type set is not JSON
我在尝试 move std::vector 时遇到崩溃其中 T显然是不可 move 的(没有定义 move 构造函数/赋值运算符,它包含内部指针) 但为什么 vector 的 move 函数要调用 T
我尝试在用户成功登录后将 token 返回给他们,但不断收到以下错误: 类型错误:“字节”类型的对象不可 JSON 序列化 我该如何解决这个问题?这是我到目前为止的代码: if user:
我是一名优秀的程序员,十分优秀!