- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我目前正在尝试将我的 Rails 3.2.17 应用程序部署到 Heroku 的 cedar-14 堆栈。
我在运行 git push heroku master
时收到错误消息。这是相关的输出:
remote: Bundle completed (141.81s)
remote: Cleaning up the bundler cache.
remote: -----> Writing config/database.yml to read from DATABASE_URL
remote: Could not detect rake tasks
remote: ensure you can run `$ bundle exec rake -P` against your app with no environment variables present
remote: and using the production group of your Gemfile.
remote: rake aborted!
remote: NoMethodError: undefined method `assets' for #<Rails::Railtie::Configuration:0x007f1e3f3dd998>
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/railtie/configuration.rb:85:in `method_missing'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/gritter-1.2.0/lib/gritter/railtie.rb:7:in `<class:Railtie>'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/gritter-1.2.0/lib/gritter/railtie.rb:3:in `<module:Gritter>'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/gritter-1.2.0/lib/gritter/railtie.rb:2:in `<top (required)>'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/gritter-1.2.0/lib/gritter.rb:26:in `<top (required)>'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/config/application.rb:13:in `<top (required)>'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/Rakefile:5:in `require'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/Rakefile:5:in `<top (required)>'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:689:in `raw_load_rakefile'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:94:in `block in load_rakefile'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
remote: /tmp/build_9c69b395977c833063f1bf84ce228ae8/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
remote: vendor/bundle/bin/rake:16:in `load'
remote: vendor/bundle/bin/rake:16:in `<main>'
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote: Default types for Ruby -> console, rake, worker
remote:
remote: -----> Compressing... done, 58.6MB
remote: -----> Launching... done, v5
remote: https://alliance-billing-dev.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy.... done.
To https://git.heroku.com/alliance-billing-dev.git
* [new branch] master -> master
运行 bundle exec rake -P
提供类似的输出。我已经阅读了几篇与未找到 Assets 方法相关的类似帖子,但所有这些帖子似乎都与我没有使用的 gem 有关。
我的猜测是我的一个 gem 和 rails 存在兼容性问题。根据其他帖子,有问题的 gem 似乎总是在回溯中位于 rails 之前的 gem。这会让我相信 gritter-1.2.0 是罪魁祸首。但是,我不知道如何从那里开始,或者我的假设是否正确。
这是我的 Gemfile 的内容,以防万一可以帮助找到解决方案。
source 'https://rubygems.org'
ruby '2.1.7'
gem 'rails', '3.2.17'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
gem 'sendgrid'
gem 'newrelic_rpm'
gem 'unicorn'
gem 'money-rails'
gem 'rack-timeout'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'compass-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'activerecord-import'
gem 'bootstrap-sass'
gem 'cancan'
gem 'carrierwave'
gem 'chosen-rails'
gem 'chronic'
gem 'client_side_validations'
gem 'client_side_validations-simple_form'
gem 'date-input-rails'
gem 'default_value_for', git: 'git://github.com/malagoli/default_value_for.git', ref: '3d458733a2'
gem 'fog'
gem 'gritter'
gem 'haml'
gem 'heroku'
gem 'holidays', git: 'git://github.com/braintreeps/holidays.git'
gem 'jquery-rails'
gem 'kaminari'
gem 'less-rails'
gem 'paper_trail', '~> 3.0.0'
gem 'postgres-copy'
gem 'prawn', '~> 1.0.0rc2'
gem 'quiet_assets', :group => :development
gem 'rails-asset-jqueryui'
gem 'ransack', git: 'git://github.com/ernie/ransack.git'
gem 'simple_form'
gem 'sorcery'
gem 'strong_parameters'
gem 'tabs_on_rails', git: 'git://github.com/xn/tabs_on_rails.git'
gem 'therubyracer'
gem 'twitter-bootstrap-rails'
group :development do
gem 'taps', :require => false # has an sqlite dependency, which heroku hates\
gem 'sqlite3'
end
group :development, :test do
#gem 'capybara'
#gem 'cucumber-rails', :require => false
gem 'annotate'
gem 'factory_girl_rails'
gem 'haml-rails'
gem 'launchy'
gem 'pry-rails'
gem 'rspec-rails'
gem 'shoulda', :require => false
end
group :test do
#gem 'capybara-firebug', :require => false
gem 'database_cleaner'
end
group :production do
gem 'rails_12factor'
end
提前感谢您的帮助。
最佳答案
我确定原因是删除了我的 Gemfile.lock。在推送到 Heroku(并运行 bundle install)之前,我在对 gem(调试器 1.6.8)的安装进行故障排除时删除了我的 Gemfile.lock。
新的 Gemfile.lock 与原来的有很多不同之处,这肯定会导致错误。通过回滚并使用原始 Gemfile.lock 解决了问题。
关于ruby-on-rails - #<Rails::Railtie::Configuration:0x000000056ac200> 的未定义方法 `assets',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32389619/
我正在使用 Ubuntu 16.04。 当我更新时,我收到以下消息 $ sudo apt-get update .... E: dpkg was interrupted, you must manua
似乎有些autoconf项目使用configure.in文件生成configure脚本,有些使用configure.ac。 使用一种或另一种之间的区别/优势是什么? 最佳答案 这只是风格问题。历史上
我正在尝试按如下方式配置 logback,但它抛出了这个错误。配置文件如下: %d{ISO8601} %-5p [%c] %msg%n
从Miguel de Icaza: We use a library profile that is better suited for mobile devices, so we removed f
我有两个 .config 文件,我需要一个 System.Configuration.Configuration那是它们之间的部分合并? 我可以将文件读取为 XML 并轻松创建所需的合并,但它是一个字
我似乎无法理解这两个注释。我尝试阅读 javadocs 但仍然无法弄清楚。任何人都可以用简单的代码来解释这两个吗? 非常感谢。 最佳答案 您使用 @Configuration作为配置 Spring b
我正在为一个简单的问题而焦头烂额。我的 .NET Core 3 应用程序中有一些设置,我认为最好将其移至我的 appsettings.json 文件。我按照本指南这样做:https://www.c-s
我正在为一个简单的问题而焦头烂额。我的 .NET Core 3 应用程序中有一些设置,我认为最好将其移至我的 appsettings.json 文件。我按照本指南这样做:https://www.c-s
我有以下测试方法: [TestMethod] public void TestHarvestMethod() { HarvestTargetTimeRangeUTC time = new Ha
我的以下代码没有产生预期的输出: public static void main(String[] args) throws MalformedURLException { Configura
我知道要从源代码编译和安装某些东西,在 Unix 系统中,涉及的三个步骤是: 1) ./configure 2) make 3) make install 当我检查OpenCV from source
我有以下片段: static void Main(string[] args) { var container = new UnityContainer(); container.Re
我想好像 apache 的 commons-configuration 可能/支持从属性文件中获取属性作为 map 到目前为止,我已经设法使用以下代码片段间接地做到了这一点 Map map = ne
我正在寻找任何技巧来使用 CKEditor 配置中的参数配置我的插件。我必须传递一些只能在显示 View 时传递的参数。 我想要这样的东西(带有 jQuery 适配器的示例): jQuery('t
在我正在玩的代码中,我看到一些地方是 @Configuration 类除了定义静态类之外什么都不做。格式各不相同,但通常是这样的: @Configuration public class someAu
我们在带有 JRE 7 的 Windows 7 中安装了 Cassandra 2.0.6,我们更新了 cassandra.yaml 文件,如下所示: 数据文件目录:D:\cassandra_data\
我在启动类中收到“'Startup.Configuration' 和'Startup.Configuration' 之间的歧义”错误。我不知道我做了什么导致这个问题。我所做的只是创建了一个 DBCon
我已经安装了 Cygwin64,现在我想安装 extundelete . 所以我下载了它,解压了文件,但是当我运行 ./configure 时它说: $ ./configure Configuring
为什么需要做(在容器目录内): # cd /container/directory/ # ./configure 代替: # pwd /external/path # /container/direc
我正在尝试编译qucs-0.0.19但是当我放置./configure时,它给了我以下错误: checking Checking if admsXml is working... no config
我是一名优秀的程序员,十分优秀!