我目前正試圖將我的Rails 3.2.17應用程序部署到Heroku的雪松-14堆棧。未定義的方法`資產'爲#<Rails :: Railtie ::配置:0x000000056ac200>
我收到運行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
提供了類似的輸出。我已經閱讀了幾篇與資產方法無關的類似帖子,但所有這些帖子似乎都涉及我沒有使用的寶石。
我的猜測是我的寶石和導軌之一存在兼容性問題。基於其他帖子,所討論的寶石似乎總是追蹤中的軌道之前的寶石。這會讓我相信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
非常感謝您的幫助。