manish#ubuntu:~/project/myapp$ heroku addons:open scheduler
Opening scheduler:standard for myapp... failed
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
Ruby version is too old
extconf failed, exit code 1
Gem files will remain installed in /home/gagan/.rvm/gems/ruby-2.1.5/gems/byebug-4.0.5 for inspection.
Results logged to /home/gagan/.rvm/gems/ruby-2.1.5/extensions/x86-linux/1.9.1/byebug-4.0.5/gem_make.out
(Gem::Ext::BuildError)
Backtrace: /usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:89:in `run'
/usr/local/lib/site_ruby/1.9.1/rubygems/ext/ext_conf_builder.rb:38:in `block in build'
/usr/lib/ruby/1.9.1/tempfile.rb:320:in `open'
/usr/local/lib/site_ruby/1.9.1/rubygems/ext/ext_conf_builder.rb:17:in `build'
/usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
/usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:160:in `chdir'
/usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:160:in `block in build_extension'
<internal:prelude>:10:in `synchronize'
/usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:159:in `build_extension'
/usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:198:in `block in build_extensions'
/usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:195:in `each'
/usr/local/lib/site_ruby/1.9.1/rubygems/ext/builder.rb:195:in `build_extensions'
/usr/local/lib/site_ruby/1.9.1/rubygems/specification.rb:1436:in `block in build_extensions'
/usr/local/lib/site_ruby/1.9.1/rubygems/user_interaction.rb:45:in `use_ui'
/usr/local/lib/site_ruby/1.9.1/rubygems/specification.rb:1434:in `build_extensions'
/usr/local/lib/site_ruby/1.9.1/rubygems/stub_specification.rb:60:in `build_extensions'
/usr/local/lib/site_ruby/1.9.1/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
/usr/local/lib/site_ruby/1.9.1/rubygems/specification.rb:925:in `block in find_inactive_by_path'
/usr/local/lib/site_ruby/1.9.1/rubygems/specification.rb:924:in `each'
/usr/local/lib/site_ruby/1.9.1/rubygems/specification.rb:924:in `find'
/usr/local/lib/site_ruby/1.9.1/rubygems/specification.rb:924:in `find_inactive_by_path'
/usr/local/lib/site_ruby/1.9.1/rubygems.rb:185:in `try_activate'
/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:144:in `require'
/usr/local/heroku/vendor/gems/addressable-2.3.2/lib/addressable/idna/native.rb:19:in `<top (required)>'
/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/heroku/vendor/gems/addressable-2.3.2/lib/addressable/idna.rb:20:in `<top (required)>'
/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/heroku/vendor/gems/addressable-2.3.2/lib/addressable/uri.rb:20:in `<top (required)>'
/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/heroku/vendor/gems/launchy-2.4.2/lib/launchy.rb:1:in `<top (required)>'
/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/heroku/lib/heroku/helpers.rb:327:in `block in launchy'
/usr/local/heroku/lib/heroku/helpers.rb:227:in `action'
/usr/local/heroku/lib/heroku/helpers.rb:326:in `launchy'
/usr/local/heroku/lib/heroku/command/addons.rb:179:in `open'
/usr/local/heroku/lib/heroku/command.rb:218:in `run'
/usr/local/heroku/lib/heroku/cli.rb:37:in `start'
/usr/bin/heroku:25:in `<main>'
Command: heroku addons:open scheduler
Version: heroku-toolbelt/3.9.0 (i686-linux) ruby/1.9.3
when i try heroku run ruby -v i get
ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]
when i try ruby -v on local i get this version of ruby
ruby 2.1.5p273 (2014-11-13 revision 48405) [i686-linux]
when i push code to heroku i get the below one
git push heroku master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 287 bytes | 0 bytes/s, done.
Total 3 (delta 2), 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.1.5
remote: -----> Installing dependencies using 1.9.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Using i18n 0.7.0
remote: Using json 1.8.2
remote: Using rake 10.4.2
remote: Using minitest 5.5.1
remote: Using thread_safe 0.3.5
remote: Using builder 3.2.2
remote: Using erubis 2.7.0
remote: Using mini_portile 0.6.2
remote: Using rack 1.6.0
remote: Using mime-types 2.4.3
remote: Using arel 6.0.0
remote: Using bcrypt 3.1.10
remote: Using chronic 0.10.2
remote: Using coffee-script-source 1.9.1.1
remote: Using execjs 2.4.0
remote: Using thor 0.19.1
remote: Using bundler 1.9.7
remote: Using hike 1.2.3
remote: Using multi_json 1.11.0
remote: Using tilt 1.4.1
remote: Using daemons 1.2.1
remote: Using orm_adapter 0.5.0
remote: Using eventmachine 1.0.7
remote: Using libv8 3.16.14.7
remote: Using mysql2 0.3.18
remote: Using pg 0.18.1
remote: Using rack-offline 0.6.4 from git://github.com/wycats/rack-offline.git (at master)
remote: Using rails_serve_static_assets 0.0.4
remote: Using rails_stdout_logging 0.0.3
remote: Using ref 1.0.5
remote: Using rubyzip 1.1.7
remote: Using will_paginate 3.0.7
remote: Using rdoc 4.2.0
remote: Using tzinfo 1.2.2
remote: Using nokogiri 1.6.6.2
remote: Using mail 2.6.3
remote: Using rack-test 0.6.3
remote: Using warden 1.2.3
remote: Using coffee-script 2.4.1
remote: Using uglifier 2.7.1
remote: Using figaro 1.1.0
remote: Using sprockets 2.12.3
remote: Using thin 1.6.3
remote: Using rails_12factor 0.0.3
remote: Using therubyracer 0.12.1
remote: Using activesupport 4.2.0
remote: Using loofah 2.0.1
remote: Using roo 2.0.1
remote: Using sdoc 0.4.1
remote: Using rails-deprecated_sanitizer 1.0.3
remote: Using globalid 0.3.3
remote: Using activemodel 4.2.0
remote: Using climate_control 0.0.3
remote: Using jbuilder 2.2.12
remote: Using whenever 0.9.2
remote: Using rails-html-sanitizer 1.0.2
remote: Using rails-dom-testing 1.0.6
remote: Using activejob 4.2.0
remote: Using cocaine 0.5.7
remote: Using activerecord 4.2.0
remote: Using carrierwave 0.10.0
remote: Using actionview 4.2.0
remote: Using friendly_id 5.0.5
remote: Using paperclip 4.2.1
remote: Using actionpack 4.2.0
remote: Using actionmailer 4.2.0
remote: Using railties 4.2.0
remote: Using sprockets-rails 2.2.4
remote: Using coffee-rails 4.1.0
remote: Using jquery-rails 4.0.3
remote: Using rails 4.2.0
remote: Using responders 2.1.0
remote: Using jquery-ui-rails 5.0.3
remote: Using rest_in_place 2.5.0
remote: Using colorbox-rails 0.1.2
remote: Using devise 3.4.1
remote: Bundle complete! 28 Gemfile dependencies, 76 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 (0.65s)
remote: Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: Asset precompilation completed (6.42s)
remote: Cleaning assets
remote: Running: rake assets:clean
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote: Default types for Ruby -> console, rake, worker
remote:
remote: -----> Compressing... done, 51.6MB
remote: -----> Launching... done, v234
remote: https://myapp.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy.... done.
The Ruby version you are using (1.9.1) is not supported by heroku anymore.
The Github profile states you need to use at least 1.9.3.
Are you using rvm? if not you should still be able to install ruby 1.9.3, but make sure you do not use any gems that are outdated and might break after upgrading ruby.
I have no experience using heroku. But following this link you must declare the ruby version you are using inside your Gemfile, is that the case?
Gemfile
source "https://rubygems.org"
ruby "2.1.5"
To work, it will probably require to recommit and push your app to heroku.
You should also check further down the page to see how you can specify the desired ruby version inside you environment.rb
Related
I was able to deploy successfully to Heroku previously, however, after installing the carrierwave-aws gem, I am getting the error listed in the title. I checked the logs on my end and see the error:
remote: Running: rake assets:precompile
remote: rake aborted!
remote: KeyError: key not found: "S3_BUCKET_NAME"
When I run my rails console, and run ENV.fetch('S3_BUCKET_NAME'), it shows the bucket. I do have dotenv-rails gem as well installed but not sure how to fix this error Heroku is getting. The aws credentials are on a .env file that's added to my gitignore, and the carrierwave.rb is fetching the credentials same way I tried in rails console. Any help would be appreciated!
I attempted to throw in a : config.assets.initialize_on_precompile = false to my application.rb file as suggested here here but that just gave a different error for "Failed to compile ruby app"
Here are the full server logs if needed:
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.5.1
remote: -----> Installing dependencies using bundler 1.15.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.17.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
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: Using rake 12.3.2
remote: Using concurrent-ruby 1.1.3
remote: Using minitest 5.11.3
remote: Using thread_safe 0.3.6
remote: Using builder 3.2.3
remote: Using erubi 1.7.1
remote: Using mini_portile2 2.3.0
remote: Using crass 1.0.4
remote: Using rack 2.0.6
remote: Using nio4r 2.3.1
remote: Using websocket-extensions 0.1.3
remote: Using mini_mime 1.0.1
remote: Using arel 9.0.0
remote: Using mimemagic 0.3.2
remote: Using execjs 2.7.0
remote: Fetching aws-eventstream 1.0.1
remote: Fetching aws-partitions 1.125.0
remote: Fetching aws-sigv4 1.0.3
remote: Installing aws-eventstream 1.0.1
remote: Installing aws-sigv4 1.0.3
remote: Installing aws-partitions 1.125.0
remote: Fetching jmespath 1.4.0
remote: Using bcrypt 3.1.12
remote: Using msgpack 1.2.4
remote: Using popper_js 1.14.5
remote: Using rb-fsevent 0.10.3
remote: Using ffi 1.9.25
remote: Using bundler 1.15.2
remote: Fetching mime-types-data 3.2018.0812
remote: Installing jmespath 1.4.0
remote: Installing mime-types-data 3.2018.0812
remote: Using coderay 1.1.2
remote: Using coffee-script-source 1.12.2
remote: Using method_source 0.9.2
remote: Using thor 0.20.3
remote: Using orm_adapter 0.5.0
remote: Fetching dotenv 2.5.0
remote: Installing dotenv 2.5.0
remote: Using multi_json 1.13.1
remote: Fetching mini_magick 4.9.2
remote: Using ostruct 0.1.0
remote: Using pg 1.1.3
remote: Using puma 3.12.0
remote: Using tilt 2.0.9
remote: Using sohel_view_tool 0.1.0
remote: Using turbolinks-source 5.2.0
remote: Using tzinfo 1.2.5
remote: Using nokogiri 1.8.5
remote: Using websocket-driver 0.7.0
remote: Using mail 2.7.1
remote: Using i18n 1.1.1
remote: Using rack-test 1.1.0
remote: Using warden 1.2.8
remote: Using sprockets 3.7.2
remote: Using marcel 0.3.3
remote: Using autoprefixer-rails 9.4.2
remote: Using uglifier 4.1.20
remote: Using bootsnap 1.3.2
remote: Using rb-inotify 0.9.10
remote: Installing mini_magick 4.9.2
remote: Using coffee-script 2.4.1
remote: Using pry 0.12.2
remote: Fetching aws-sdk-core 3.44.0
remote: Fetching mime-types 3.2.2
remote: Installing mime-types 3.2.2
remote: Installing aws-sdk-core 3.44.0
remote: Using turbolinks 5.2.0
remote: Using loofah 2.2.3
remote: Using activesupport 5.2.2
remote: Using sass-listen 4.0.0
remote: Using rails-html-sanitizer 1.0.4
remote: Using rails-dom-testing 2.0.3
remote: Using globalid 0.4.1
remote: Using activemodel 5.2.2
remote: Using jbuilder 2.8.0
remote: Using sass 3.7.2
remote: Using activejob 5.2.2
remote: Using activerecord 5.2.2
remote: Fetching carrierwave 1.2.3
remote: Using actionview 5.2.2
remote: Using friendly_id 5.2.4
remote: Using petergate 2.0.1
remote: Using bootstrap 4.1.3
remote: Using actionpack 5.2.2
remote: Using actioncable 5.2.2
remote: Using actionmailer 5.2.2
remote: Using activestorage 5.2.2
remote: Using railties 5.2.2
remote: Using sprockets-rails 3.2.1
remote: Using coffee-rails 4.2.2
remote: Using responders 2.4.0
remote: Fetching dotenv-rails 2.5.0
remote: Installing carrierwave 1.2.3
remote: Installing dotenv-rails 2.5.0
remote: Using jquery-rails 4.3.3
remote: Using jquery-ui-rails 5.0.5
remote: Using rails 5.2.2
remote: Using sass-rails 5.0.7
remote: Using devise 4.5.0
remote: Fetching aws-sdk-kms 1.13.0
remote: Installing aws-sdk-kms 1.13.0
remote: Fetching aws-sdk-s3 1.30.0
remote: Installing aws-sdk-s3 1.30.0
remote: Fetching carrierwave-aws 1.3.0
remote: Installing carrierwave-aws 1.3.0
remote: Bundle complete! 28 Gemfile dependencies, 91 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 (5.98s)
remote: Cleaning up the bundler cache.
remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.17.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: The latest bundler is 2.0.0.pre.2, but you are currently running 1.15.2.
remote: To update, run `gem install bundler --pre`
remote: -----> Installing node-v8.10.0-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: KeyError: key not found: "S3_BUCKET_NAME"
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/config/initializers/carrierwave.rb:3:in `fetch'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/config/initializers/carrierwave.rb:3:in `block in <main>'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/carrierwave-1.2.3/lib/carrierwave/uploader/configuration.rb:161:in `configure'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/carrierwave-1.2.3/lib/carrierwave.rb:14:in `configure'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/config/initializers/carrierwave.rb:1:in `<main>'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:285:in `block in load'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:285:in `load'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/engine.rb:657:in `block in load_config_initializer'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/notifications.rb:170:in `instrument'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/engine.rb:656:in `load_config_initializer'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/engine.rb:614:in `block (2 levels) in <class:Engine>'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/engine.rb:613:in `each'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/engine.rb:613:in `block in <class:Engine>'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:32:in `instance_exec'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:32:in `run'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:61:in `block in run_initializers'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:50:in `each'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:50:in `tsort_each_child'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:60:in `run_initializers'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/application.rb:361:in `initialize!'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/config/environment.rb:5:in `<main>'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/application.rb:337:in `require_environment!'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/application.rb:520:in `block in run_tasks_blocks'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
remote: /tmp/build_bed53da6969ae50aa98632527d1504c6/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
remote: Tasks: TOP => environment
remote: (See full trace by running task with --trace)
remote:
remote: !
remote: ! Precompiling assets failed.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to sohel-p-portfolio.
remote:
To https://git.heroku.com/sohel-p-portfolio.git
And the heroku logs last line:
2018-12-18T19:49:24.000000+00:00 app[api]: Build failed -- check your build logs
You can set the env variable manually on Heroku with...
$ heroku config:set S3_BUCKET_NAME=yourbucketname
I’m running Ruby v 2.3 on Ubuntu 14.04 Linux …
myusername#mymachine:~$ ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
Lately it seems that whenever I run “bundle install” from a remote script, I’m always asked to install the gems individually. This doesn’t happen when I develop locally on my Mac Sierra. Note the error message below
localhost:runtrax davea$ sh /opt/scripts/pushrt "Corrected processing with regards to RockNRoll site."
[master 0def218] Corrected processing with regards to RockNRoll site.
11 files changed, 108 insertions(+), 46 deletions(-)
Counting objects: 21, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (21/21), done.
Writing objects: 100% (21/21), 3.80 KiB | 0 bytes/s, done.
Total 21 (delta 18), reused 0 (delta 0)
To git#gitlab.com:myusername/myproject.git
891a010..0def218 master -> master
Counting objects: 21, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (21/21), done.
Writing objects: 100% (21/21), 3.80 KiB | 0 bytes/s, done.
Total 21 (delta 18), reused 0 (delta 0)
remote: Master ref received. Deploying master branch to production...
remote: Warning: the running version of Bundler (1.13.5) is older than the version that created the lockfile (1.13.6). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
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: Using rake 11.3.0
remote: Using Ascii85 1.0.2
remote: Using i18n 0.7.0
remote: Using json 1.8.3
remote: Using minitest 5.9.1
remote: Using thread_safe 0.3.5
remote: Using builder 3.2.2
remote: Using erubis 2.7.0
remote: Using mini_portile2 2.1.0
remote: Using rack 1.6.4
remote: Using mime-types-data 3.2016.0521
remote: Using arel 6.0.3
remote: Using addressable 2.4.0
remote: Using afm 0.2.2
remote: Using execjs 2.7.0
remote: Using sass 3.4.22
remote: Using byebug 9.0.6
remote: Using chronic 0.10.2
remote: Using chunky_png 1.3.7
remote: Using coffee-script-source 1.10.0
remote: Using thor 0.19.1
remote: Using multi_json 1.12.1
remote: Using rb-fsevent 0.9.7
remote: Using ffi 1.9.14
remote: Using concurrent-ruby 1.0.2
remote: Using tilt 2.0.5
remote: Using debug_inspector 0.0.2
remote: Using unf_ext 0.0.7.2
remote: Using multipart-post 2.0.0
remote: Using hashery 2.1.2
remote: Using hashie 3.4.6
remote: Using turbolinks-source 5.0.0
remote: Using jwt 1.5.6
remote: Using kgio 2.10.0
remote: Using net-http-digest_auth 1.4
remote: Using net-http-persistent 2.9.4
remote: Using ntlm-http 0.1.1
remote: Using webrobots 0.1.2
remote: Using multi_xml 0.5.5
remote: Using net-telnet 0.1.1
remote: Using oauth 0.5.1
remote: Using ruby-rc4 0.1.5
remote: Using ttfunk 1.4.0
remote: Using pg 0.19.0
remote: Using puma 3.6.0
remote: Using bundler 1.13.5
remote: Using raindrops 0.17.0
remote: Using rubyzip 1.2.0
remote: Using ruby-ole 1.2.12
remote: Using socksify 1.7.0
remote: Using tor 0.1.2
remote: Using will_paginate 3.1.5
remote: Using tzinfo 1.2.2
remote: Using nokogiri 1.6.8.1
remote: Using rack-test 0.6.3
remote: Using mime-types 3.1
remote: Using autoprefixer-rails 6.5.1
remote: Using uglifier 3.0.2
remote: Using compass-import-once 1.0.5
remote: Using whenever 0.9.7
remote: Using coffee-script 2.4.1
remote: Using compass-core 1.0.3
remote: Using rb-inotify 0.9.7
remote: Using sprockets 3.7.0
remote: Using unf 0.1.4
remote: Using faraday 0.9.2
remote: Using omniauth 1.3.1
remote: Using turbolinks 5.0.1
remote: Using pdf-reader 1.4.0
remote: Using postgresql 1.0.0
remote: Using unicorn 5.1.0
remote: Using spreadsheet 1.1.4
remote: Using tor_requests 0.6.0
remote: Using activesupport 4.2.7.1
remote: Using loofah 2.0.3
remote: sudo: no tty present and no askpass program specified
remote: Using w3c_validators 1.2
remote: Using mail 2.6.4
remote: Using bootstrap-sass 3.3.7
remote: Using compass 1.0.3
remote: Using listen 3.0.8
remote: Using domain_name 0.5.20160826
remote: Using oauth2 1.2.0
remote: Using omniauth-oauth 1.1.0
remote: Using rails-deprecated_sanitizer 1.0.3
remote: Using globalid 0.3.7
remote: Using activemodel 4.2.7.1
remote: Using jbuilder 2.6.0
remote: Using pundit 1.1.0
remote: Using spring 2.0.0
remote: Using rails-html-sanitizer 1.0.3
remote: Bundler::GemspecError: Could not read gem at
remote: /usr/local/rvm/gems/ruby-2.3.0/cache/roo-2.5.1.gem. It may be corrupted.
remote: An error occurred while installing roo (2.5.1), and Bundler cannot continue.
remote: Make sure that `gem install roo -v '2.5.1'` succeeds before bundling.
remote: rake aborted!
remote: Bundler::GemNotFound: Your bundle is locked to roo (2.5.1), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of roo (2.5.1) has removed it. You'll need to update your bundle to a different version of roo (2.5.1) that hasn't been removed in order to install.
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/definition.rb:179:in `rescue in specs'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/definition.rb:173:in `specs'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/definition.rb:233:in `specs_for'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/definition.rb:222:in `requested_specs'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:118:in `block in definition_method'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:19:in `setup'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler.rb:99:in `setup'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/setup.rb:20:in `<top (required)>'
remote: /home/rails/myproject/config/boot.rb:3:in `<top (required)>'
remote: /home/rails/myproject/config/application.rb:1:in `<top (required)>'
remote: /home/rails/myproject/Rakefile:4:in `<top (required)>'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
remote: /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
remote: /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
remote: Bundler::GemNotFound: Could not find roo-2.5.1 in any of the sources
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/spec_set.rb:95:in `block in materialize'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/spec_set.rb:88:in `map!
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/spec_set.rb:88:in `materialize'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/definition.rb:174:in `specs'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/definition.rb:233:in `specs_for'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/definition.rb:222:in `requested_specs'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:118:in `block in definition_method'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:19:in `setup'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler.rb:99:in `setup'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.5/lib/bundler/setup.rb:20:in `<top (required)>'
remote: /home/rails/myproject/config/boot.rb:3:in `<top (required)>'
remote: /home/rails/myproject/config/application.rb:1:in `<top (required)>'
remote: /home/rails/myproject/Rakefile:4:in `<top (required)>'
remote: /usr/local/rvm/gems/ruby-2.3.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
remote: /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
remote: /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
remote: (See full trace by running task with --trace)
What else do I need to configure so that “bundle install” just works, as it does on my local machine?
At the beginning it is telling you that the gemfile was created by an older version of bundler. Try updating bundler as it suggests:
gem install bundler
You are also having an issue with the roo gem. It says that it might be corrupted. Try and install it again:
gem install roo -v '2.5.1'
Then run bundle install again.
While trying to deploy my rails app to Heroku, I used
git push heroku master
It ran fine until the end. Here is the log:
Counting objects: 107, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (97/97), done.
Writing objects: 100% (107/107), 33.17 KiB | 0 bytes/s, done.
Total 107 (delta 9), 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.0.0
remote: -----> Installing dependencies using bundler 1.11.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
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: Rubygems 2.0.14.1 is not threadsafe, so your gems will be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
remote: Installing rake 11.1.2
remote: Installing i18n 0.7.0
remote: Installing json 1.8.3 with native extensions
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 rack 1.5.5
remote: Installing mime-types 1.25.1
remote: Installing polyglot 0.3.5
remote: Installing arel 5.0.1.20140414130214
remote: Installing sass 3.2.19
remote: Installing coffee-script-source 1.10.0
remote: Installing execjs 2.6.0
remote: Installing thor 0.19.1
remote: Installing hike 1.2.3
remote: Installing multi_json 1.11.2
remote: Installing pg 0.18.4 with native extensions
remote: Using bundler 1.11.2
remote: Installing tilt 1.4.1
remote: Installing rails_serve_static_assets 0.0.5
remote: Installing rails_stdout_logging 0.0.5
remote: Installing rdoc 4.2.2
remote: Installing tzinfo 1.2.2
remote: Installing rack-test 0.6.3
remote: Installing treetop 1.4.15
remote: Installing bootstrap-sass 3.0.3.0
remote: Installing coffee-script 2.4.1
remote: Installing uglifier 3.0.0
remote: Installing sprockets 2.12.4
remote: Installing rails_12factor 0.0.3
remote: Installing sdoc 0.4.1
remote: Installing activesupport 4.1.1
remote: Installing mail 2.5.4
remote: Installing actionview 4.1.1
remote: Installing activemodel 4.1.1
remote: Installing climate_control 0.0.3
remote: Installing jbuilder 1.5.3
remote: Installing actionpack 4.1.1
remote: Installing activerecord 4.1.1
remote: Installing cocaine 0.5.8
remote: Installing actionmailer 4.1.1
remote: Installing railties 4.1.1
remote: Installing sprockets-rails 2.3.3
remote: Installing paperclip 3.5.4
remote: Installing coffee-rails 4.0.1
remote: Installing jquery-rails 3.1.4
remote: Installing rails 4.1.1
remote: Installing sass-rails 4.0.5
remote: Installing turbolinks 2.5.3
remote: Bundle complete! 13 Gemfile dependencies, 50 gems now installed.
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into ./vendor/bundle.
remote: Post-install message from rdoc:
remote: Depending on your version of ruby, you may need to install ruby rdoc/ri data:
remote: <= 1.8.6 : unsupported
remote: = 1.8.7 : gem install rdoc-data; rdoc-data --install
remote: = 1.9.1 : gem install rdoc-data; rdoc-data --install
remote: >= 1.9.2 : nothing to do! Yay!
remote: Bundle completed (37.94s)
remote: Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: NoMethodError: undefined method `raise_in_transactional_callbacks=' for ActiveRecord::Base:Class
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/railtie.rb:110:in `block (3 levels) in <class:Railtie>'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/railtie.rb:109:in `each'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/railtie.rb:109:in `block (2 levels) in <class:Railtie>'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `each'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/railtie.rb:108:in `block in <class:Railtie>'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/config/environment.rb:5:in `<top (required)>'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/application.rb:264:in `require_environment!'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/application.rb:367:in `block in run_tasks_blocks'
remote: /tmp/build_7a890592e7261c6a314b269df7f376b2/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.3/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
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to sleepy-thicket-74065.
remote:
To https://git.heroku.com/sleepy-thicket-74065.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sleepy-thicket-74065.git'
Please ask if there are any other files that you want to see. I have checked a lot of the other questions with this problem, and none of the solutions are working.
My gem file was messed up, and I had the wrong version of Ruby defined.
I am having serious problems getting Heroku and github to work with me.
I notice that I do not get an authentication from Heroku once I put in my log in information:
heroku login
Enter your Heroku credentials.
Email: blank#gmail.com
Password (typing will be hidden):
Logged in as blank#gmail.com
I do not get an authentication message, something my instructor said was very important. I have no idea why. I have everything set up correctly, including the proper ssh key, which I got via:
heroku keys:add
Then
heroku create
This is where things start really going wrong. I never get
Git remote heroku added
Instead, I just get
Creating app... done, stack is cedar-14
https://agile-lake-38079.herokuapp.com/ | https://git.heroku.com/agilelake-38079.git
With no indication of anything added.
After
git push origin master
and
git push heroku master
I get this same error every single time:
'Counting objects: 66, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (55/55), done.
Writing objects: 100% (66/66), 16.44 KiB | 0 bytes/s, done.
Total 66 (delta 4), 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.0.0
remote: -----> Installing dependencies using bundler 1.9.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
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: Rubygems 2.0.14.1 is not threadsafe, so your gems must be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
remote: Installing rake 10.5.0
remote: Installing i18n 0.7.0
remote: Installing json 1.8.3
remote: Installing minitest 5.8.4
remote: Installing thread_safe 0.3.5
remote: Installing tzinfo 1.2.2
remote: Installing activesupport 4.1.0
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing actionview 4.1.0
remote: Installing rack 1.5.5
remote: Installing rack-test 0.6.3
remote: Installing actionpack 4.1.0
remote: Installing mime-types 1.25.1
remote: Installing polyglot 0.3.5
remote: Installing treetop 1.4.15
remote: Installing mail 2.5.4
remote: Installing actionmailer 4.1.0
remote: Installing activemodel 4.1.0
remote: Installing arel 5.0.1.20140414130214
remote: Installing activerecord 4.1.0
remote: Installing coffee-script-source 1.10.0
remote: Installing execjs 2.6.0
remote: Installing coffee-script 2.4.1
remote: Installing thor 0.19.1
remote: Installing railties 4.1.0
remote: Installing coffee-rails 4.0.1
remote: Installing hike 1.2.3
remote: Installing multi_json 1.11.2
remote: Installing jbuilder 2.0.0
remote: Installing jquery-rails 3.1.4
remote: Installing pg 0.18.4
remote: Using bundler 1.9.7
remote: Installing tilt 1.4.1
remote: Installing sprockets 2.11.0
remote: Installing sprockets-rails 2.3.3
remote: Installing rails 4.1.0
remote: Installing rails_serve_static_assets 0.0.4
remote: Installing rails_stdout_logging 0.0.4
remote: Installing rails_12factor 0.0.3
remote: Installing rdoc 4.2.1
remote: Installing sass 3.2.19
remote: Installing sass-rails 4.0.3
remote: Installing sdoc 0.4.0
remote: Installing turbolinks 2.5.3
remote: Installing uglifier 1.3.0
remote: Bundle complete! 14 Gemfile dependencies, 46 gems now installed.
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into ./vendor/bundle.
remote: Post-install message from rdoc:
remote: Depending on your version of ruby, you may need to install ruby rdoc/ri data:
remote: <= 1.8.6 : unsupported
remote: = 1.8.7 : gem install rdoc-data; rdoc-data --install
remote: = 1.9.1 : gem install rdoc-data; rdoc-data --install
remote: >= 1.9.2 : nothing to do! Yay!
remote: Bundle completed (40.23s)
remote: Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: NoMethodError: undefined method `raise_in_transactional_callbacks=' for ActiveRecord::Base:Class
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.0/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:110:in `block (3 levels) in <class:Railtie>'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:109:in `each'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:109:in `block (2 levels) in <class:Railtie>'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:27:in `each'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:108:in `block in <class:Railtie>'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `instance_exec'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `run'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:55:in `block in run_initializers'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:54:in `run_initializers'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/application.rb:288:in `initialize!'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/config/environment.rb:5:in `<top (required)>'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/application.rb:264:in `require_environment!'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/application.rb:367:in `block in run_tasks_blocks'
remote: /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.3/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
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to agile-lake-38079.
remote:
To https://git.heroku.com/agile-lake-38079.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/agile-lake-38079.git''
I have tried altering the application.rb file, just in case, and I have also tweaked my Gemfile to make sure it has:
group :production do
gem 'pg'
gem 'rails_12factor'
end
Neither have worked. Thanks to anyone who can help.
Your authentication is fine :)
When you push to Heroku, it creates a slug of your application — think of it like a compressed, production-ready and production-tuned package.
Your problem lies when Heroku tries to create this slug. Your log outputs this line:
remote: NoMethodError: undefined method `raise_in_transactional_callbacks=' for ActiveRecord::Base:Class
Models inherit from ActiveRecord::Base, so that should tell you that it's something (very likely) in your model code.
Locally, you can run rake assets:precompile RAILS_ENV=production to see how Heroku would treat app.
I am working on a Rails 4.
As a best practice recommended in Michael Hartl's Rails Tutorial, I try to deploy early and often to avoid compounded problems as development progresses.
Everything was working just fine until recently: I was running git push heroku master and the app was working in the same way, both locally and on Heroku.
However, now, when I try to push my code to Heroku, I get the following error:
Counting objects: 26, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (25/25), done.
Writing objects: 100% (26/26), 3.07 KiB | 0 bytes/s, done.
Total 26 (delta 14), 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.0.0
remote: -----> Installing dependencies using 1.9.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Rubygems 2.0.14 is not threadsafe, so your gems must be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
remote: Using rake 10.4.2
remote: Using i18n 0.7.0
remote: Using json 1.8.3
remote: Using minitest 5.8.0
remote: Using thread_safe 0.3.5
remote: Using tzinfo 1.2.2
remote: Using activesupport 4.2.2
remote: Using builder 3.2.2
remote: Using erubis 2.7.0
remote: Using mini_portile 0.6.2
remote: Using nokogiri 1.6.6.2
remote: Using rails-deprecated_sanitizer 1.0.3
remote: Using rails-dom-testing 1.0.7
remote: Using loofah 2.0.3
remote: Using rails-html-sanitizer 1.0.2
remote: Using actionview 4.2.2
remote: Using rack 1.6.4
remote: Using rack-test 0.6.3
remote: Using actionpack 4.2.2
remote: Using globalid 0.3.6
remote: Using activejob 4.2.2
remote: Using mime-types 2.6.1
remote: Using mail 2.6.3
remote: Using actionmailer 4.2.2
remote: Using activemodel 4.2.2
remote: Using arel 6.0.3
remote: Using activerecord 4.2.2
remote: Using execjs 2.6.0
remote: Using autoprefixer-rails 5.2.1.2
remote: Using bcrypt 3.1.10
remote: Using sass 3.4.18
remote: Using bootstrap-sass 3.3.5.1
remote: Using coffee-script-source 1.9.1.1
remote: Using coffee-script 2.4.1
remote: Using thor 0.19.1
remote: Using railties 4.2.2
remote: Using coffee-rails 4.1.0
remote: Using orm_adapter 0.5.0
remote: Using responders 2.1.0
remote: Using warden 1.2.3
remote: Using devise 3.5.2
remote: Using multi_json 1.11.2
remote: Using jbuilder 2.3.1
remote: Using jquery-rails 4.0.4
remote: Using turbolinks 2.5.3
remote: Using jquery-turbolinks 2.1.0
remote: Using pg 0.18.2
remote: Using puma 2.13.4
remote: Using bundler 1.9.7
remote: Using sprockets 3.3.3
remote: Using sprockets-rails 2.3.2
remote: Using rails 4.2.2
remote: Using rails_serve_static_assets 0.0.4
remote: Using rails_stdout_logging 0.0.4
remote: Using rails_12factor 0.0.3
remote: Using rdoc 4.2.0
remote: Using tilt 1.4.1
remote: Using sass-rails 5.0.3
remote: Using sdoc 0.4.1
remote: Using uglifier 2.7.1
remote: Bundle complete! 22 Gemfile dependencies, 60 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 (0.56s)
remote: Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: SyntaxError: /tmp/build_c8c1797d62ce933566e19803262e7a1d/config/environments/production.rb:95: syntax error, unexpected keyword_end, expecting '}'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `block in require'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:240:in `load_dependency'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/engine.rb:598:in `block (2 levels) in <class:Engine>'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/engine.rb:597:in `each'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/engine.rb:597:in `block in <class:Engine>'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:30:in `instance_exec'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:30:in `run'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:55:in `block in run_initializers'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:44:in `each'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:44:in `tsort_each_child'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:54:in `run_initializers'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/application.rb:352:in `initialize!'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/config/environment.rb:5:in `<top (required)>'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `block in require'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:240:in `load_dependency'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/application.rb:328:in `require_environment!'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/application.rb:457:in `block in run_tasks_blocks'
remote: /tmp/build_c8c1797d62ce933566e19803262e7a1d/vendor/bundle/ruby/2.0.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
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected to calendy.
remote:
To https://git.heroku.com/calendy.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/calendy.git'
I am not quite sure, but I believe this error started happening after I ran heroku run rake db:reset as I wanted to reset my Heroku databse.
Here are the solutions I tried before posting this question:
Run git pull heroku master and then run git push heroku master.
Run bundle install in case the issue was caused by the Gemfile.
Login to Heroku, link my GitHub account to Heroku and deploy manually.
None of the above worked.
There are two things here that I can't seem to understand:
What is going wrong and how I can fix it?
Why things stopped working in the first place?
Ok, I just understood my mistake.
There was a syntax error in my production.rb file, as mentioned in the terminal code I shared in the question:
remote: SyntaxError: /tmp/build_c8c1797d62ce933566e19803262e7a1d/config/environments/production.rb:95: syntax error, unexpected keyword_end, expecting '}'
I just had to:
fix this syntax error in the production.rb file — i.e. add the missing } to my code
run git add .
run git commit -m "Fix production.rb syntax error"
run git push origin master
and then git push heroku master started working again like a charm.