Activeadmin gem error on heroku deploy during assets:precompile - ruby-on-rails-4

I had my application running on local. During deployment, I got several issues:
First, I wrapped relational objects in order to deploy, otherwise deploy gave no "tags" table error
if ActiveRecord::Base.connection.table_exists? 'tags'
filter :tags_keyword, :as => :check_boxes, :collection => Tag.all.collect {|o| [o.keyword, o.keyword]}
end
Then I run migrations and seeded the database. But this time, I had no assets working which made me realize heroku is not compiling assets during deployment.
I updated .gitignore to oversight manifest files so heroku would compile assets beforehand. But that operation gave me the following error;
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: NoMethodError: undefined method `<<' for true:TrueClass
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/vendor/bundle/ruby/2.2.0/gems/activeadmin-1.0.0.pre1/lib/active_admin/engine.rb:5:in `block (2 levels) in <class:Engine>'
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/vendor/bundle/ruby/2.2.0/gems/activeadmin-1.0.0.pre1/lib/active_admin/engine.rb:4:in `each'
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/vendor/bundle/ruby/2.2.0/gems/activeadmin-1.0.0.pre1/lib/active_admin/engine.rb:4:in `block in <class:Engine>'
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/vendor/bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/vendor/bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/vendor/bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/vendor/bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/vendor/bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/config/environment.rb:5:in `<top (required)>'
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/vendor/bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require_environment!
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/vendor/bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
remote: /tmp/build_392c42fc00109fc0ac97d8dd67521707/vendor/bundle/ruby/2.2.0/gems/sprockets-rails-2.3.2/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
remote: Tasks: TOP => environment
remote: (See full trace by running task with --trace)
remote: !
remote: ! Precompiling assets failed.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
This is the engine.rb file that error logs which is under the AA gem folder
module ActiveAdmin
class Engine < ::Rails::Engine
initializer "active_admin.precompile", group: :all do |app|
ActiveAdmin.application.stylesheets.each do |path, _|
app.config.assets.precompile << path
end
ActiveAdmin.application.javascripts.each do |path|
app.config.assets.precompile << path
end
end
initializer 'active_admin.routes' do
require 'active_admin/helpers/routes/url_helpers'
end
end
end
I run on ubuntu 15.04, with ruby -v '2.2.2p95', rails -v '4.2.1' and kind of stuck about what to do

I found the issue is my not using rails_12_factor gem and playing too much with depreciated rails environment variables. After several trials I managed to roll-back to default settings and it worked!

Related

Error while installing Rmagick gem on Heroku

I am trying to deploy Rails 4 app to heroku, but installing Rmackick gem fails.
Tried buildpacks, but lo luck.
got this error:
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:
remote: current directory:
remote: /tmp/build_16e2e594c459dbc294186d524bfe933a/vendor/bundle/ruby/2.3.0/gems/rmagick-2.13.2/ext/RMagick
remote: /tmp/build_16e2e594c459dbc294186d524bfe933a/vendor/ruby-2.3.0/bin/ruby -r
remote: ./siteconf20171214-20333-dbtx1i.rb extconf.rb
remote: checking for Ruby version >= 1.8.5... yes
remote: checking for gcc... yes
remote: checking for Magick-config... no
remote: Can't install RMagick 2.13.2. Can't find Magick-config in
remote: vendor/bundle/bin:vendor/bundle/ruby/2.3.0/bin:vendor/ruby-2.3.0/bin:/tmp/tmp.kJfUDQAIbQ/bin/:/usr/local/bin:/usr/bin:/bin:/tmp/codon/vendor/bin:bin:/usr/local/bin:/usr/bin:/bin
remote:
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote:
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_16e2e594c459dbc294186d524bfe933a/vendor/ruby-2.3.0/bin/$(RUBY_BASE_NAME)
tried:
How can I use the latest version of Imagemagick on Heroku?
https://github.com/ello/heroku-buildpack-imagemagick
https://github.com/thoughtbot/paperclip/wiki/Upgrade-Imagemagick-On-Heroku
heroku/ruby buildpack
gem 'carrierwave'
gem 'rmagick', require: 'RMagick'
gem 'fog'
used gem versions:
carrierwave (1.2.1)
rmagick (2.13.2)
updating version of rmagick fixed the issue, seems like 2.13.2 was incompatible with heroku stack. 2.16.0 - works

Rails: bundler/runtime.rb:in `block in setup': You have already activated activesupport

After bundle update (Deploy app), i had this problem at bottom,
I'm use rbenv and CentOS on Deploy Server.
And I have other project running whiteout problems.
I'm tried to run "bundle exec" and "bundle exec rails s" and "bundle exec puma" but the problem stay.
Update 1: "bundle install --binstubs" running fine but not solved the problem.
Update 2: "In your deployed env, delete Gemfile.lock file and do bundle install that would fix your install" not worked.
Uptade 3: Child problem: Rails: rubygems/dependency.rb:318:in `to_specs': Could not find 'activesupport'
Update 4: "You can try to update the version of activesupport that your application is using to resolve this." not worked.
Update 5: After rollback the project to old git hash the problem not occurred, but at last commit the problem still.
Looks like your app's ./bin/rails is a stub that was generated by Bundler.
In Rails 4, your app's bin/ directory contains executables that are versioned
like any other source code, rather than stubs that are generated on demand.
Here's how to upgrade:
bundle config --delete bin # Turn off Bundler's stub generator
rake rails:update:bin # Use the new Rails 4 executables
git add bin # Add bin/ to source control
You may need to remove bin/ from your .gitignore as well.
When you install a gem whose executable you want to use in your app,
generate it and add it to source control:
bundle binstubs some-gem-name
git add bin/new-executable
WARN: Unresolved specs during Gem::Specification.reset:
json (>= 1.7.7, ~> 1.7)
minitest (~> 5.1)
rack (>= 1.0, ~> 1.6)
loofah (~> 2.0)
rails-dom-testing (>= 1.0.5, ~> 1.0)
thor (< 2.0, >= 0.18.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/home/rails/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:34:in `block in setup': You have already activated activesupport 4.2.1, but your Gemfile requires activesupport 4.2.0. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
from /home/rails/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:19:in `setup'
from /home/rails/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:92:in `setup'
from /home/rails/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/setup.rb:8:in `<top (required)>'
from /home/rails/.rbenv/versions/2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:126:in `require'
from /home/rails/.rbenv/versions/2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:126:in `rescue in require'
from /home/rails/.rbenv/versions/2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from /var/www/html/zadmin/config/boot.rb:3:in `<top (required)>'
from /home/rails/.rbenv/versions/2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:119:in `require'
from /home/rails/.rbenv/versions/2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:119:in `require'
from /home/rails/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/app_rails_loader.rb:44:in `block in exec_app_rails'
from /home/rails/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/app_rails_loader.rb:34:in `loop'
from /home/rails/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/app_rails_loader.rb:34:in `exec_app_rails'
from /home/rails/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/cli.rb:5:in `<top (required)>'
from /home/rails/.rbenv/versions/2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:67:in `require'
from /home/rails/.rbenv/versions/2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:67:in `require'
from /home/rails/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/bin/rails:9:in `<top (required)>'
from /home/rails/.rbenv/versions/2.2.1/bin/rails:23:in `load'
from /home/rails/.rbenv/versions/2.2.1/bin/rails:23:in `<main>'
Thanks!
You can try to update the version of activesupport that your application is using to resolve this.
It sounds like your system has activesupport v4.2.1 while your Gemfile.lock specifies v4.2.0. To update the version of activesupport that your Gemfile.lock is specifying, try running the following:
bundle update activesupport
Additionally, you can try to delete your system activesupport gem via gem uninstall activesupport and then reinstall it via bundle install.

github-pages won't run locally

When I try and run github-pages (bundle exec jekyll build) it fails with:
bundle exec jekyll build
/usr/local/rvm/gems/ruby-2.2.4/gems/commander-4.1.5/lib/commander/runner.rb:365:in `block in require_program': program version required (Commander::Runner::CommandError)
from /usr/local/rvm/gems/ruby-2.2.4/gems/commander-4.1.5/lib/commander/runner.rb:364:in `each'
from /usr/local/rvm/gems/ruby-2.2.4/gems/commander-4.1.5/lib/commander/runner.rb:364:in `require_program'
from /usr/local/rvm/gems/ruby-2.2.4/gems/commander-4.1.5/lib/commander/runner.rb:52:in `run!'
from /usr/local/rvm/gems/ruby-2.2.4/gems/commander-4.1.5/lib/commander/delegates.rb:7:in `run!'
from /usr/local/rvm/gems/ruby-2.2.4/gems/commander-4.1.5/lib/commander/import.rb:10:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.2.4/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:43:in `<module:SafeYAML>': undefined method `tagged_classes' for Psych:Module (NoMethodError)
from /usr/local/rvm/gems/ruby-2.2.4/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:26:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.2.4/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:1:in `require'
from /usr/local/rvm/gems/ruby-2.2.4/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.2.4/gems/jekyll-1.5.1/lib/jekyll.rb:21:in `require'
from /usr/local/rvm/gems/ruby-2.2.4/gems/jekyll-1.5.1/lib/jekyll.rb:21:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.2.4/gems/jekyll-1.5.1/bin/jekyll:7:in `require'
from /usr/local/rvm/gems/ruby-2.2.4/gems/jekyll-1.5.1/bin/jekyll:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.2.4/bin/jekyll:23:in `load'
from /usr/local/rvm/gems/ruby-2.2.4/bin/jekyll:23:in `<main>'
from /usr/local/rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `eval'
from /usr/local/rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `<main>'
The Gemfile is:
source 'https://rubygems.org'
gem 'github-pages'
gem 'guard-jekyll-plus'
Any idea what might be going wrong? I've installed (bundle install) many times on my Mac. This is on Ubuntu.
Thanks in advance,
Ian
Ok, I figured this out with thanks to Virtua Creative, and this post: https://github.com/sstephenson/execjs/issues/154
I needed to uninstall jekyll and github-pages, then reinstall, and after reinstalling I also had to update, so:
gem uninstall jekyll
gem uninstall github-pages
bundle install
bundle update
Then I found that I had no javascript environment, so I had to modify my Gemfile:
source 'https://rubygems.org'
gem 'github-pages'
gem 'therubyracer'
And install again
bundle install
Now it's all good.
Ian

heroku precompiling asserts failed: Sass::SyntaxError: Undefined variable

I develop an app based on M. Hartls tutorial. When I try to push my sample-app on heroku, the precomiling of the assets fails with the error:
Sass::SyntaxError: Undefined variable: "$gray-lighter"
In none of my files I mention a "gray-lighter".
My application.css.scss contains only:
/*
*= require_tree .
*= require_self
*/
#import "bootstrap-sprockets";
#import "bootstrap";
Has anyone an idea how I could solve this problem?
Besides the error code - do you need more information?
$ git push heroku master -f
Counting objects: 168, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (154/154), done.
Writing objects: 100% (168/168), 40.30 KiB | 0 bytes/s, done.
Total 168 (delta 32), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.4
remote: ###### WARNING:
remote: Removing `Gemfile.lock` because it was generated on Windows.
remote: Bundler will do a full resolve so native gems are handled properly.
remote: This may result in unexpected gem versions being used in your app.
remote: In rare occasions Bundler may not be able to resolve your dependencies at all.
remote: https://devcenter.heroku.com/articles/bundler-windows-gemfile
remote:
remote: -----> Installing dependencies using bundler 1.9.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Resolving dependencies....
remote: Installing i18n 0.7.0
remote: Installing rake 10.5.0
remote: Installing minitest 5.8.4
remote: Installing thread_safe 0.3.5
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.0.0
remote: Installing rack 1.6.4
remote: Installing json 1.8.3
remote: Installing mime-types 2.99
remote: Installing arel 6.0.3
remote: Installing execjs 2.6.0
remote: Using bundler 1.9.7
remote: Installing coffee-script-source 1.10.0
remote: Installing sass 3.4.21
remote: Installing thor 0.19.1
remote: Installing concurrent-ruby 1.0.0
remote: Installing multi_json 1.11.2
remote: Installing bcrypt 3.1.10
remote: Installing libv8 3.16.14.13
remote: Installing rails_serve_static_assets 0.0.5
remote: Installing rails_stdout_logging 0.0.4
remote: Installing ref 2.0.0
remote: Installing tilt 2.0.2
remote: Installing tzinfo 1.2.2
remote: Installing rack-test 0.6.3
remote: Installing pg 0.17.1
remote: Installing mail 2.6.3
remote: Installing autoprefixer-rails 6.3.1
remote: Installing puma 2.11.1
remote: Installing uglifier 2.7.2
remote: Installing coffee-script 2.4.1
remote: Installing bootstrap-sass 3.2.0.2
remote: Installing sprockets 3.5.2
remote: Installing rails_12factor 0.0.2
remote: Installing activesupport 4.2.5
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing globalid 0.3.6
remote: Installing activemodel 4.2.5
remote: Installing jbuilder 2.4.0
remote: Installing activejob 4.2.5
remote: Installing activerecord 4.2.5
remote: Installing nokogiri 1.6.7.2
remote: Installing rails-dom-testing 1.0.7
remote: Installing loofah 2.0.3
remote: Installing rails-html-sanitizer 1.0.3
remote: Installing actionview 4.2.5
remote: Installing actionpack 4.2.5
remote: Installing actionmailer 4.2.5
remote: Installing railties 4.2.5
remote: Installing coffee-rails 4.1.1
remote: Installing sprockets-rails 3.0.1
remote: Installing jquery-rails 4.1.0
remote: Installing turbolinks 2.5.3
remote: Installing rails 4.2.5
remote: Installing sass-rails 5.0.4
remote: Installing therubyracer 0.12.2
remote: Bundle complete! 23 Gemfile dependencies, 57 gems now installed.
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into ./vendor/bundle.
remote: Bundle completed (33.06s)
remote: Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: I, [2016-02-05T18:12:00.582969 #1174] INFO -- : Writing /tmp/build_f90401fc14a7fa141740de8ac82224af/public/assets/application-5caa7ce0a1e3d41955b9f91ccab3418d4f098eee350d3d8dcd9698c5fe32ca66.js
remote: I, [2016-02-05T18:12:00.583759 #1174] INFO -- : Writing /tmp/build_f90401fc14a7fa141740de8ac82224af/public/assets/application-5caa7ce0a1e3d41955b9f91ccab3418d4f098eee350d3d8dcd9698c5fe32ca66.js.gz
remote: rake aborted!
remote: Sass::SyntaxError: Undefined variable: "$gray-lighter".
remote: (sass):73
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/script/tree/variable.rb:49:in `_perform'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/script/tree/node.rb:50:in `perform'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/script/tree/list_literal.rb:63:in `block in _perform'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/script/tree/list_literal.rb:63:in `map'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/script/tree/list_literal.rb:63:in `_perform'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/script/tree/node.rb:50:in `perform'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:395:in `visit_prop'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/base.rb:36:in `visit'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/stack.rb:79:in `block in with_base'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/stack.rb:115:in `with_frame'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/stack.rb:79:in `with_base'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:158:in `visit'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:431:in `block (2 levels) in visit_rule'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:431:in `map'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:431:in `block in visit_rule'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:179:in `with_environment'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:429:in `visit_rule'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/base.rb:36:in `visit'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/stack.rb:79:in `block in with_base'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/stack.rb:115:in `with_frame'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/stack.rb:79:in `with_base'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:158:in `visit'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:431:in `block (2 levels) in visit_rule'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:431:in `map'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:431:in `block in visit_rule'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:179:in `with_environment'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:429:in `visit_rule'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/base.rb:36:in `visit'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/stack.rb:79:in `block in with_base'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/stack.rb:115:in `with_frame'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/stack.rb:79:in `with_base'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:158:in `visit'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/base.rb:52:in `map'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/base.rb:52:in `visit_children'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:167:in `block in visit_children'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:179:in `with_environment'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:166:in `visit_children'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/base.rb:36:in `block in visit'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:186:in `visit_root'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/base.rb:36:in `visit'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:157:in `visit'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/visitors/perform.rb:8:in `visit'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/root_node.rb:36:in `css_tree'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/tree/root_node.rb:20:in `render'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sass-3.4.21/lib/sass/engine.rb:278:in `render'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/sass_compressor.rb:48:in `call'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/sass_compressor.rb:28:in `call'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/loader.rb:60:in `block in load'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/loader.rb:318:in `fetch_asset_from_dependency_cache'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/loader.rb:44:in `load'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/cached_environment.rb:47:in `yield'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/cached_environment.rb:47:in `load'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/base.rb:66:in `find_asset'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/manifest.rb:142:in `block in find'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/path_utils.rb:225:in `block in stat_tree'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/path_utils.rb:209:in `block in stat_directory'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/path_utils.rb:206:in `each'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/path_utils.rb:206:in `stat_directory'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/path_utils.rb:224:in `stat_tree'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/legacy.rb:105:in `each'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/legacy.rb:104:in `each'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/legacy.rb:104:in `logical_paths'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/manifest.rb:140:in `find'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/sprockets/manifest.rb:168:in `compile'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-rails-3.0.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-3.5.2/lib/rake/sprocketstask.rb:147:in `with_logger'
remote: /tmp/build_f90401fc14a7fa141740de8ac82224af/vendor/bundle/ruby/2.2.0/gems/sprockets-rails-3.0.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
remote: Tasks: TOP => assets:precompile
remote: (See full trace by running task with --trace)
remote: !
remote: ! Precompiling assets failed.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to myapp-30998.
remote:
To https://git.heroku.com/myapp-30998.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/myapp-30998.git'

Asset precompilation fails after rails upgrade

I just upgraded from Rails 4.0.4 to 4.1.8, and when I push to our staging server on Heroku, I get the following error
Removing jquery-rails (3.0.4)
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
NoMethodError: undefined method `[]=' for nil:NilClass
/tmp/build_6e5605f8ccbbe1dcb495bb63b761220d/config/initializers/puma_database_connection.rb:7:in `block (2 levels) in <top (required)>'
/tmp/build_6e5605f8ccbbe1dcb495bb63b761220d/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/tmp/build_6e5605f8ccbbe1dcb495bb63b761220d/vendor/bundle/ruby/2.0.0/gems/activesupport
/tmp/build_6e5605f8ccbbe1dcb495bb63b761220d/vendor/bundle/ruby/2.0.0/gems/railties-
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
When I run assets:precompile RAILS_ENV=development, it works fine
Any advice?