I'm trying to deploy my API to Heroku but it keeps giving me this error
NameError: uninitialized constant Rack::Cors
Here is my cors.rb file
Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
resource '*',
headers: :any,
methods: %i[get post put patch delete options head]
end
end
and here is Hroku build log
-----> Building on the Heroku-20 stack
-----> Using buildpacks:
1. heroku/nodejs
2. heroku/ruby
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
USE_YARN_CACHE=true
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
engines.yarn (package.json): unspecified (use default)
Resolving node version 16.x...
Downloading and installing node 16.15.1...
Using default npm version: 8.11.0
Resolving yarn version 1.22.x...
Downloading and installing yarn (1.22.19)
Installed yarn 1.22.19
-----> Installing dependencies
Installing node modules (yarn.lock)
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 14.52s.
-----> Build
-----> Pruning devDependencies
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
warning Ignored scripts due to flag.
Done in 2.82s.
-----> Caching build
- yarn cache
-----> Build succeeded!
-----> Ruby app detected
-----> Installing bundler 2.3.10
-----> Removing BUNDLED WITH version in the Gemfile.lock
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.7.5
-----> Installing dependencies using bundler 2.3.10
Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
Your Gemfile lists the gem devise (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
Your Gemfile lists the gem devise-jwt (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
Your Gemfile lists the gem rack-cors (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
Fetching gem metadata from https://rubygems.org/.........
Fetching rake 13.0.6
Installing rake 13.0.6
Fetching concurrent-ruby 1.1.9
Fetching minitest 5.15.0
Fetching builder 3.2.4
Fetching zeitwerk 2.5.4
Installing zeitwerk 2.5.4
Installing concurrent-ruby 1.1.9
Installing minitest 5.15.0
Installing builder 3.2.4
Fetching erubi 1.10.0
Fetching mini_portile2 2.7.1
Installing erubi 1.10.0
Fetching racc 1.6.0
Installing mini_portile2 2.7.1
Fetching crass 1.0.6
Installing racc 1.6.0 with native extensions
Installing crass 1.0.6
Fetching rack 2.2.3
Fetching nio4r 2.5.8
Installing nio4r 2.5.8 with native extensions
Installing rack 2.2.3
Fetching marcel 1.0.2
Fetching websocket-extensions 0.1.5
Installing websocket-extensions 0.1.5
Installing marcel 1.0.2
Fetching mini_mime 1.1.2
Fetching msgpack 1.4.4
Installing mini_mime 1.1.2
Installing msgpack 1.4.4 with native extensions
Using bundler 2.3.10
Fetching ffi 1.15.5
Installing ffi 1.15.5 with native extensions
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching pg 1.3.1
Installing pg 1.3.1 with native extensions
Fetching thor 1.2.1
Installing thor 1.2.1
Fetching tilt 2.0.10
Installing tilt 2.0.10
Fetching semantic_range 3.0.0
Installing semantic_range 3.0.0
Fetching turbolinks-source 5.2.0
Installing turbolinks-source 5.2.0
Fetching i18n 1.9.1
Installing i18n 1.9.1
Fetching tzinfo 2.0.4
Installing tzinfo 2.0.4
Fetching rack-test 1.1.0
Installing rack-test 1.1.0
Fetching rack-proxy 0.7.2
Installing rack-proxy 0.7.2
Fetching sprockets 4.0.2
Installing sprockets 4.0.2
Fetching websocket-driver 0.7.5
Installing websocket-driver 0.7.5 with native extensions
Fetching mail 2.7.1
Installing mail 2.7.1
Fetching nokogiri 1.13.1 (x86_64-linux)
Installing nokogiri 1.13.1 (x86_64-linux)
Fetching puma 5.6.1
Installing puma 5.6.1 with native extensions
Fetching turbolinks 5.2.1
Installing turbolinks 5.2.1
Fetching activesupport 6.1.4.4
Installing activesupport 6.1.4.4
Fetching bootsnap 1.10.3
Installing bootsnap 1.10.3 with native extensions
Fetching loofah 2.13.0
Installing loofah 2.13.0
Fetching sassc 2.4.0
Installing sassc 2.4.0 with native extensions
Fetching rails-dom-testing 2.0.3
Installing rails-dom-testing 2.0.3
Fetching globalid 1.0.0
Installing globalid 1.0.0
Fetching activemodel 6.1.4.4
Installing activemodel 6.1.4.4
Fetching rails-html-sanitizer 1.4.2
Installing rails-html-sanitizer 1.4.2
Fetching activejob 6.1.4.4
Installing activejob 6.1.4.4
Fetching activerecord 6.1.4.4
Installing activerecord 6.1.4.4
Fetching actionview 6.1.4.4
Installing actionview 6.1.4.4
Fetching actionpack 6.1.4.4
Installing actionpack 6.1.4.4
Fetching jbuilder 2.11.5
Installing jbuilder 2.11.5
Fetching actioncable 6.1.4.4
Installing actioncable 6.1.4.4
Fetching activestorage 6.1.4.4
Installing activestorage 6.1.4.4
Fetching actionmailer 6.1.4.4
Installing actionmailer 6.1.4.4
Fetching railties 6.1.4.4
Installing railties 6.1.4.4
Fetching sprockets-rails 3.4.2
Installing sprockets-rails 3.4.2
Fetching actionmailbox 6.1.4.4
Installing actionmailbox 6.1.4.4
Fetching actiontext 6.1.4.4
Installing actiontext 6.1.4.4
Fetching webpacker 5.4.3
Installing webpacker 5.4.3
Fetching rails 6.1.4.4
Installing rails 6.1.4.4
Fetching sassc-rails 2.1.2
Installing sassc-rails 2.1.2
Fetching sass-rails 6.0.0
Installing sass-rails 6.0.0
Bundle complete! 28 Gemfile dependencies, 57 gems now installed.
Gems in the groups 'development' and 'test' were not installed.
Bundled gems are installed into `./vendor/bundle`
Bundle completed (182.45s)
Cleaning up the bundler cache.
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
NameError: uninitialized constant Rack::Cors
/tmp/build_6c572622/config/initializers/cors.rb:1:in `<main>'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `load'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.4/lib/rails/engine.rb:681:in `block in load_config_initializer'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.4/lib/active_support/notifications.rb:205:in `instrument'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.4/lib/rails/engine.rb:680:in `load_config_initializer'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.4/lib/rails/engine.rb:634:in `block (2 levels) in <class:Engine>'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.4/lib/rails/engine.rb:633:in `each'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.4/lib/rails/engine.rb:633:in `block in <class:Engine>'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:32:in `instance_exec'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:32:in `run'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:61:in `block in run_initializers'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:50:in `each'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:50:in `tsort_each_child'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:60:in `run_initializers'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.4/lib/rails/application.rb:391:in `initialize!'
/tmp/build_6c572622/config/environment.rb:5:in `<main>'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.4/lib/rails/application.rb:367:in `require_environment!'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.4/lib/rails/application.rb:533:in `block in run_tasks_blocks'
/tmp/build_6c572622/vendor/bundle/ruby/2.7.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/task.rb:61:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app.
! Push failed
Anyone could help please?
Thanks in advance
Okay, I solved the issue guys, in the build logs you can see the following:
Gems in the groups 'development' and 'test' were not installed. so I created a group for production gems
group :production do
# Add the gems you need on production here
end
and when I re-deployed, it worked fine.
Related
I recently made a rails app and i've been trying to get it deployed on Heroku. I'm not sure what preventing me from doing so. I have Heroku linked with my Github and am manually deploying from there.
The Github repo is up to date, and the rails app is able to run when I type in
rails s
I tried also deploying manually from my computer as well. I have been following this guide :
https://www.codecademy.com/articles/deploy-rails-to-heroku
Here is the error logs:
! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
Detected buildpacks: Ruby,Node.js
See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.5.5
###### WARNING:
Removing `Gemfile.lock` because it was generated on Windows.
Bundler will do a full resolve so native gems are handled properly.
This may result in unexpected gem versions being used in your app.
In rare occasions Bundler may not be able to resolve your dependencies at all.
https://devcenter.heroku.com/articles/bundler-windows-gemfile
-----> Installing dependencies using bundler 2.0.1
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.....
Fetching rake 12.3.2
Installing rake 12.3.2
Fetching concurrent-ruby 1.1.5
Fetching minitest 5.11.3
Fetching thread_safe 0.3.6
Installing minitest 5.11.3
Installing thread_safe 0.3.6
Installing concurrent-ruby 1.1.5
Fetching builder 3.2.3
Installing builder 3.2.3
Fetching erubi 1.8.0
Installing erubi 1.8.0
Fetching mini_portile2 2.4.0
Fetching crass 1.0.4
Installing mini_portile2 2.4.0
Installing crass 1.0.4
Fetching rack 2.0.7
Installing rack 2.0.7
Fetching nio4r 2.3.1
Installing nio4r 2.3.1 with native extensions
Fetching websocket-extensions 0.1.3
Installing websocket-extensions 0.1.3
Fetching mini_mime 1.0.1
Installing mini_mime 1.0.1
Fetching arel 9.0.0
Installing arel 9.0.0
Fetching mimemagic 0.3.3
Fetching bcrypt 3.1.12
Installing bcrypt 3.1.12 with native extensions
Installing mimemagic 0.3.3
Fetching msgpack 1.2.10
Installing msgpack 1.2.10 with native extensions
Fetching rb-fsevent 0.10.3
Installing rb-fsevent 0.10.3
Fetching ffi 1.10.0
Installing ffi 1.10.0 with native extensions
Fetching thor 0.20.3
Installing thor 0.20.3
Using bundler 2.0.1
Fetching method_source 0.9.2
Installing method_source 0.9.2
Fetching coffee-script-source 1.12.2
Installing coffee-script-source 1.12.2
Fetching execjs 2.7.0
Installing execjs 2.7.0
Fetching duktape 2.0.1.0
Installing duktape 2.0.1.0 with native extensions
Fetching multipart-post 2.1.0
Installing multipart-post 2.1.0
Fetching multi_json 1.13.1
Installing multi_json 1.13.1
Fetching jwt 2.1.0
Installing jwt 2.1.0
Fetching pg 0.18.1
Installing pg 0.18.1 with native extensions
Fetching puma 3.12.1
Installing puma 3.12.1 with native extensions
Fetching rails_serve_static_assets 0.0.5
Installing rails_serve_static_assets 0.0.5
Fetching rails_stdout_logging 0.0.5
Installing rails_stdout_logging 0.0.5
Fetching tilt 2.0.9
Installing tilt 2.0.9
Fetching turbolinks-source 5.2.0
Installing turbolinks-source 5.2.0
Fetching tzinfo 1.2.5
Installing tzinfo 1.2.5
Fetching nokogiri 1.10.3
Installing nokogiri 1.10.3 with native extensions
Fetching i18n 1.6.0
Installing i18n 1.6.0
Fetching websocket-driver 0.7.0
Installing websocket-driver 0.7.0 with native extensions
Fetching mail 2.7.1
Installing mail 2.7.1
Fetching rack-test 1.1.0
Installing rack-test 1.1.0
Fetching sprockets 3.7.2
Installing sprockets 3.7.2
Fetching marcel 0.3.3
Installing marcel 0.3.3
Fetching coffee-script 2.4.1
Installing coffee-script 2.4.1
Fetching uglifier 4.1.20
Installing uglifier 4.1.20
Fetching bootsnap 1.4.4
Installing bootsnap 1.4.4 with native extensions
Fetching faraday 0.15.4
Installing faraday 0.15.4
Fetching rb-inotify 0.10.0
Installing rb-inotify 0.10.0
Fetching rails_12factor 0.0.3
Installing rails_12factor 0.0.3
Fetching turbolinks 5.2.0
Installing turbolinks 5.2.0
Fetching activesupport 5.2.3
Installing activesupport 5.2.3
Fetching loofah 2.2.3
Installing loofah 2.2.3
Fetching twilio-ruby 5.22.3
Installing twilio-ruby 5.22.3
Fetching sass-listen 4.0.0
Installing sass-listen 4.0.0
Fetching rails-html-sanitizer 1.0.4
Installing rails-html-sanitizer 1.0.4
Fetching rails-dom-testing 2.0.3
Installing rails-dom-testing 2.0.3
Fetching globalid 0.4.2
Fetching activemodel 5.2.3
Installing globalid 0.4.2
Installing activemodel 5.2.3
Fetching jbuilder 2.8.0
Installing jbuilder 2.8.0
Fetching sass 3.7.4
Fetching actionview 5.2.3
Installing sass 3.7.4
Installing actionview 5.2.3
Fetching activejob 5.2.3
Installing activejob 5.2.3
Fetching activerecord 5.2.3
Fetching email_validator 1.6.0
Installing email_validator 1.6.0
Installing activerecord 5.2.3
Fetching actionpack 5.2.3
Installing actionpack 5.2.3
Fetching bourbon 5.1.0
Installing bourbon 5.1.0
Fetching actioncable 5.2.3
Installing actioncable 5.2.3
Fetching actionmailer 5.2.3
Installing actionmailer 5.2.3
Fetching railties 5.2.3
Fetching sprockets-rails 3.2.1
Installing sprockets-rails 3.2.1
Installing railties 5.2.3
Fetching activestorage 5.2.3
Installing activestorage 5.2.3
Fetching coffee-rails 4.2.2
Fetching clearance 1.17.0
Fetching rails 5.2.3
Installing rails 5.2.3
Installing coffee-rails 4.2.2
Installing clearance 1.17.0
Fetching sass-rails 5.0.7
Installing sass-rails 5.0.7
Bundle complete! 22 Gemfile dependencies, 73 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into `./vendor/bundle`
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from sass:
Ruby Sass has reached end-of-life and should no longer be used.
* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
primary implementation: https://sass-lang.com/install
* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
sassc gem: https://github.com/sass/sassc-ruby#readme
* For more details, please refer to the Sass blog:
https://sass-lang.com/blog/posts/7828841
Bundle completed (69.29s)
Cleaning up the bundler cache.
-----> Installing node-v10.14.1-linux-x64
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
Yarn executable was not detected in the system.
Download Yarn at https://yarnpkg.com/en/docs/install
rake aborted!
Uglifier::Error: Unexpected token: name (Chat). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true).
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.20/lib/uglifier.rb:234:in `parse_result'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.20/lib/uglifier.rb:216:in `run_uglifyjs'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.20/lib/uglifier.rb:168:in `compile'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:53:in `call'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:28:in `call'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/tmp/build_009829cc03f1e07b3bba9f3f29879621/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app.
! Push failed
The issue already have a solution in the error description itself
To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true)
Solution:
To fix the issue replace the following in config/environments/production.rb
config.assets.js_compressor = :uglifier
with
config.assets.js_compressor = Uglifier.new(harmony: true)
Refer, this issue raised in uglifier https://github.com/lautis/uglifier/issues/127
You could try to precompile the assets before uploading to heroku, with the following command:
RAILS_ENV=production bundle exec rake assets:precompile
And create a new commit and push
git add .
git commit -m "precompile"
git push
Also worth checking: https://devcenter.heroku.com/articles/rails-asset-pipeline
I'm pushing my rails app to heroku and It fails and I don't know what is the problem, here's the heroku log, knowing that I'm still a beginner
! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
Detected buildpacks: Ruby,Node.js
See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.5.1
-----> Installing dependencies using bundler 1.15.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Your Gemfile lists the gem bootstrap-sass (= 3.3.7) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of one of them later.
Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Fetching rake 12.3.1
Fetching concurrent-ruby 1.0.5
Fetching minitest 5.10.3
Installing minitest 5.10.3
Installing rake 12.3.1
Installing concurrent-ruby 1.0.5
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching builder 3.2.3
Installing builder 3.2.3
Fetching erubi 1.7.1
Installing erubi 1.7.1
Fetching mini_portile2 2.3.0
Installing mini_portile2 2.3.0
Fetching crass 1.0.4
Installing crass 1.0.4
Fetching rack 2.0.5
Installing rack 2.0.5
Fetching nio4r 2.3.1
Installing nio4r 2.3.1 with native extensions
Fetching websocket-extensions 0.1.3
Installing websocket-extensions 0.1.3
Fetching mini_mime 1.0.1
Installing mini_mime 1.0.1
Fetching coffee-script-source 1.12.2
Installing coffee-script-source 1.12.2
Fetching execjs 2.7.0
Installing execjs 2.7.0
Fetching method_source 0.9.0
Installing method_source 0.9.0
Fetching thor 0.20.0
Installing thor 0.20.0
Fetching formtastic_i18n 0.6.0
Installing formtastic_i18n 0.6.0
Fetching kaminari-core 1.1.1
Fetching arel 9.0.0
Installing kaminari-core 1.1.1
Installing arel 9.0.0
Fetching rb-fsevent 0.10.3
Installing rb-fsevent 0.10.3
Fetching ffi 1.9.25
Fetching mimemagic 0.3.2
Installing mimemagic 0.3.2
Installing ffi 1.9.25 with native extensions
Fetching bcrypt 3.1.12
Installing bcrypt 3.1.12 with native extensions
Fetching msgpack 1.2.4
Installing msgpack 1.2.4 with native extensions
Using bundler 1.15.2
Using json 2.1.0
Fetching mime-types-data 3.2018.0812
Installing mime-types-data 3.2018.0812
Fetching orm_adapter 0.5.0
Installing orm_adapter 0.5.0
Fetching multi_json 1.13.1
Installing multi_json 1.13.1
Fetching pg 0.18.4
Installing pg 0.18.4 with native extensions
Fetching puma 3.12.0
Installing puma 3.12.0 with native extensions
Fetching tilt 2.0.8
Installing tilt 2.0.8
Fetching tzinfo 1.2.5
Installing tzinfo 1.2.5
Fetching i18n 0.9.5
Installing i18n 0.9.5
Fetching nokogiri 1.8.4
Installing nokogiri 1.8.4 with native extensions
Fetching websocket-driver 0.7.0
Installing websocket-driver 0.7.0 with native extensions
Fetching mail 2.7.0
Installing mail 2.7.0
Fetching coffee-script 2.4.1
Installing coffee-script 2.4.1
Fetching autoprefixer-rails 9.1.3
Installing autoprefixer-rails 9.1.3
Fetching uglifier 4.1.18
Installing uglifier 4.1.18
Fetching rack-test 1.1.0
Installing rack-test 1.1.0
Fetching sprockets 3.7.2
Installing sprockets 3.7.2
Fetching warden 1.2.7
Installing warden 1.2.7
Fetching marcel 0.3.2
Installing marcel 0.3.2
Fetching mime-types 3.2.2
Installing mime-types 3.2.2
Fetching rb-inotify 0.9.10
Installing rb-inotify 0.9.10
Fetching bootsnap 1.3.1
Installing bootsnap 1.3.1 with native extensions
Fetching activesupport 5.2.1
Installing activesupport 5.2.1
Fetching faker 1.7.3
Fetching sass-listen 4.0.0
Installing sass-listen 4.0.0
Installing faker 1.7.3
Fetching loofah 2.2.2
Installing loofah 2.2.2
Fetching rails-dom-testing 2.0.3
Fetching globalid 0.4.1
Installing rails-dom-testing 2.0.3
Installing globalid 0.4.1
Fetching arbre 1.1.1
Installing arbre 1.1.1
Fetching activemodel 5.2.1
Installing activemodel 5.2.1
Fetching jbuilder 2.7.0
Fetching sass 3.5.7
Fetching rails-html-sanitizer 1.0.4
Installing jbuilder 2.7.0
Installing rails-html-sanitizer 1.0.4
Installing sass 3.5.7
Fetching activejob 5.2.1
Installing activejob 5.2.1
Fetching activerecord 5.2.1
Installing activerecord 5.2.1
Fetching carrierwave 0.11.2
Installing carrierwave 0.11.2
Fetching actionview 5.2.1
Installing actionview 5.2.1
Fetching actionpack 5.2.1
Installing actionpack 5.2.1
Fetching kaminari-actionview 1.1.1
Installing kaminari-actionview 1.1.1
Fetching bootstrap-sass 3.3.7
Fetching kaminari-activerecord 1.1.1
Installing kaminari-activerecord 1.1.1
Installing bootstrap-sass 3.3.7
Fetching kaminari 1.1.1
Installing kaminari 1.1.1
Fetching actioncable 5.2.1
Fetching actionmailer 5.2.1
Installing actioncable 5.2.1
Installing actionmailer 5.2.1
Fetching railties 5.2.1
Installing railties 5.2.1
Fetching formtastic 3.1.5
Installing formtastic 3.1.5
Fetching has_scope 0.7.2
Installing has_scope 0.7.2
Fetching ransack 2.0.1
Installing ransack 2.0.1
Fetching activestorage 5.2.1
Installing activestorage 5.2.1
Fetching sprockets-rails 3.2.1
Installing sprockets-rails 3.2.1
Fetching responders 2.4.0
Fetching coffee-rails 4.2.2
Fetching jquery-rails 4.3.1
Installing coffee-rails 4.2.2
Installing responders 2.4.0
Installing jquery-rails 4.3.1
Fetching rails 5.2.1
Installing rails 5.2.1
Fetching sass-rails 5.0.7
Fetching inherited_resources 1.9.0
Installing sass-rails 5.0.7
Installing inherited_resources 1.9.0
Fetching devise 4.5.0
Fetching activeadmin 1.3.1
Installing activeadmin 1.3.1
Installing devise 4.5.0
Bundle complete! 29 Gemfile dependencies, 83 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
Post-install message from sass:
Ruby Sass is deprecated and will be unmaintained as of 26 March 2019.
* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
primary implementation: https://sass-lang.com/install
* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
sassc gem: https://github.com/sass/sassc-ruby#readme
* For more details, please refer to the Sass blog:
http://sass.logdown.com/posts/7081811
Bundle completed (80.77s)
Cleaning up the bundler cache.
Your Gemfile lists the gem bootstrap-sass (= 3.3.7) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of one of them later.
Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
-----> Installing node-v8.10.0-linux-x64
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
Yarn executable was not detected in the system.
Download Yarn at https://yarnpkg.com/en/docs/install
I, [2018-09-08T19:25:07.734693 #1679] INFO -- : Writing /tmp/build_c75357820f68f58674096bc8758f9029/public/assets/active_admin-2f0c629fec336846acce347e83766ca452d7cd2476c4982b2754ee82f9ec07d2.css
I, [2018-09-08T19:25:07.735467 #1679] INFO -- : Writing /tmp/build_c75357820f68f58674096bc8758f9029/public/assets/active_admin-2f0c629fec336846acce347e83766ca452d7cd2476c4982b2754ee82f9ec07d2.css.gz
I, [2018-09-08T19:25:07.736190 #1679] INFO -- : Writing /tmp/build_c75357820f68f58674096bc8758f9029/public/assets/active_admin/nested_menu_arrow-15084d93c65c1964d7077700ea748bd2d70cfa2d4c19707c58a9c64e232dd442.gif
I, [2018-09-08T19:25:07.737492 #1679] INFO -- : Writing /tmp/build_c75357820f68f58674096bc8758f9029/public/assets/active_admin/nested_menu_arrow_dark-7c43b8e0a5f8823875f49a093c9d7a6b374f885b6f9cc248ae9cd7e6e9b29034.gif
I, [2018-09-08T19:25:07.738714 #1679] INFO -- : Writing /tmp/build_c75357820f68f58674096bc8758f9029/public/assets/active_admin/orderable-29374dbb55b0012d78a37c614d573bb3474f0779849b478a147d0f1845ca6617.png
I, [2018-09-08T19:25:07.922270 #1679] INFO -- : Writing /tmp/build_c75357820f68f58674096bc8758f9029/public/assets/active_admin/print-cf99cbf27fb92065a9eacd28e6fad48fa72cadaf6e0918790e8d35b11d8f99f6.css
I, [2018-09-08T19:25:07.922488 #1679] INFO -- : Writing /tmp/build_c75357820f68f58674096bc8758f9029/public/assets/active_admin/print-cf99cbf27fb92065a9eacd28e6fad48fa72cadaf6e0918790e8d35b11d8f99f6.css.gz
I, [2018-09-08T19:25:16.019597 #1679] INFO -- : Writing /tmp/build_c75357820f68f58674096bc8758f9029/public/assets/active_admin-f23692a0f65604671f6920cdddfccfc6a2b48230d03d594e317a335f8f821854.js
I, [2018-09-08T19:25:16.020503 #1679] INFO -- : Writing /tmp/build_c75357820f68f58674096bc8758f9029/public/assets/active_admin-f23692a0f65604671f6920cdddfccfc6a2b48230d03d594e317a335f8f821854.js.gz
I, [2018-09-08T19:25:16.024346 #1679] INFO -- : Writing /tmp/build_c75357820f68f58674096bc8758f9029/public/assets/eseed-03cb614c50858ccb77604c8880c5e2e161a53bd3e4e1581d1b9db920771bcab9.jpg
rake aborted!
Uglifier::Error: Unexpected character '#'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.18/lib/uglifier.rb:234:in `parse_result'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.18/lib/uglifier.rb:216:in `run_uglifyjs'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.18/lib/uglifier.rb:168:in `compile'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:53:in `call'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:28:in `call'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/tmp/build_c75357820f68f58674096bc8758f9029/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app.
! Push failed
Notes: tried to fix the uglifier by changing production.rb using this answer, but it's not working though
Syntax error when deploying Rails app to Heroku: ExecJS::RuntimeError: SyntaxError: Unexpected character
Solution:
remove the comment line which is start with "#" from any of your .js file
source of answer: ExecJS::ProgramError: Unexpected character '#'
You would use bundle update, to update the version of gem, run gem install bundler
Your application must be up to date because is rely on gems that have deprecated features and about update gems
see here
I'm creating a new rails app in order to use it for practicing adding a front-end theme to it and makes it work, so I created a new rails application (totally new app), after that I just edited the rails app gemfile to add all the gems I added for my older projects, after that I created a new heroku repo, and tried to push my new project to heroku, but It want work and it failed, here are my gemfile and my heroku logs knowing that I'm totally newbie
my gemfile
source 'https://rubygems.org'
ruby "2.5.1"
gem 'rails', '5.1.4'
gem 'devise', '~> 4.4', '>= 4.4.3'
gem 'activeadmin', '~> 1.3' #for admin dashboard
gem "paperclip", "~> 6.0.0" #for uploading photos
gem 'bootstrap-sass', '3.3.7'
gem 'country_select'
gem 'bcrypt', '3.1.12'
gem 'faker', '1.7.3'
gem 'puma', '3.9.1'
gem 'sass-rails', '5.0.6'
gem 'uglifier', '3.2.0'
gem 'coffee-rails', '4.2.2'
gem 'jquery-rails', '4.3.1'
gem 'jbuilder', '2.7.0'
gem 'carrierwave', '~> 0.11.2'
group :development, :test do
gem 'sqlite3', '1.3.13'
gem 'byebug', '9.0.6', platform: :mri #for checking and debugging the code
gem 'awesome_print' #for awesome printing the results in the rails console
end
group :development do
gem 'web-console', '3.5.1'
gem 'listen', '3.1.5'
gem 'spring', '2.0.2'
gem 'spring-watcher-listen', '2.0.1'
end
group :test do
gem 'rails-controller-testing', '1.0.2'
gem 'minitest', '5.10.3'
gem 'minitest-reporters', '1.1.14'
gem 'guard', '2.13.0'
gem 'guard-minitest', '2.4.4'
end
group :production do
gem 'pg', '0.18.4'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
my heroku logs
! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
Detected buildpacks: Ruby,Node.js
See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.5.1
-----> Installing dependencies using bundler 1.15.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Fetching rake 12.3.1
Fetching concurrent-ruby 1.0.5
Fetching minitest 5.10.3
Installing rake 12.3.1
Installing minitest 5.10.3
Installing concurrent-ruby 1.0.5
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching builder 3.2.3
Installing builder 3.2.3
Fetching erubi 1.7.1
Installing erubi 1.7.1
Fetching mini_portile2 2.3.0
Fetching crass 1.0.4
Installing mini_portile2 2.3.0
Installing crass 1.0.4
Fetching rack 2.0.5
Installing rack 2.0.5
Fetching nio4r 2.3.1
Installing nio4r 2.3.1 with native extensions
Fetching websocket-extensions 0.1.3
Installing websocket-extensions 0.1.3
Fetching mini_mime 1.0.0
Installing mini_mime 1.0.0
Fetching coffee-script-source 1.12.2
Installing coffee-script-source 1.12.2
Fetching execjs 2.7.0
Installing execjs 2.7.0
Fetching method_source 0.9.0
Installing method_source 0.9.0
Fetching thor 0.20.0
Fetching formtastic_i18n 0.6.0
Installing formtastic_i18n 0.6.0
Installing thor 0.20.0
Fetching kaminari-core 1.1.1
Installing kaminari-core 1.1.1
Fetching arel 8.0.0
Installing arel 8.0.0
Fetching rb-fsevent 0.10.3
Installing rb-fsevent 0.10.3
Fetching ffi 1.9.25
Fetching bcrypt 3.1.12
Installing bcrypt 3.1.12 with native extensions
Installing ffi 1.9.25 with native extensions
Using bundler 1.15.2
Using json 2.1.0
Fetching mime-types-data 3.2016.0521
Installing mime-types-data 3.2016.0521
Fetching mimemagic 0.3.2
Installing mimemagic 0.3.2
Fetching climate_control 0.2.0
Installing climate_control 0.2.0
Fetching i18n_data 0.8.0
Installing i18n_data 0.8.0
Fetching sixarm_ruby_unaccent 1.2.0
Installing sixarm_ruby_unaccent 1.2.0
Fetching unicode_utils 1.4.0
Installing unicode_utils 1.4.0
Fetching orm_adapter 0.5.0
Installing orm_adapter 0.5.0
Fetching multi_json 1.13.1
Installing multi_json 1.13.1
Fetching pg 0.18.4
Installing pg 0.18.4 with native extensions
Fetching puma 3.9.1
Installing puma 3.9.1 with native extensions
Fetching tilt 2.0.8
Installing tilt 2.0.8
Fetching tzinfo 1.2.5
Installing tzinfo 1.2.5
Fetching i18n 0.9.5
Installing i18n 0.9.5
Fetching nokogiri 1.8.4
Installing nokogiri 1.8.4 with native extensions
Fetching websocket-driver 0.6.5
Installing websocket-driver 0.6.5 with native extensions
Fetching mail 2.7.0
Installing mail 2.7.0
Fetching coffee-script 2.4.1
Installing coffee-script 2.4.1
Fetching autoprefixer-rails 9.0.0
Installing autoprefixer-rails 9.0.0
Fetching uglifier 3.2.0
Installing uglifier 3.2.0
Fetching rack-test 1.0.0
Installing rack-test 1.0.0
Fetching sprockets 3.7.2
Installing sprockets 3.7.2
Fetching warden 1.2.7
Installing warden 1.2.7
Fetching mime-types 3.1
Installing mime-types 3.1
Fetching terrapin 0.6.0
Installing terrapin 0.6.0
Fetching sort_alphabetical 1.1.0
Installing sort_alphabetical 1.1.0
Fetching rb-inotify 0.9.10
Installing rb-inotify 0.9.10
Fetching activesupport 5.1.4
Installing activesupport 5.1.4
Fetching money 6.12.0
Installing money 6.12.0
Fetching faker 1.7.3
Installing faker 1.7.3
Fetching sass-listen 4.0.0
Installing sass-listen 4.0.0
Fetching globalid 0.4.1
Installing globalid 0.4.1
Fetching arbre 1.1.1
Installing arbre 1.1.1
Fetching activemodel 5.1.4
Installing activemodel 5.1.4
Fetching jbuilder 2.7.0
Installing jbuilder 2.7.0
Fetching countries 2.1.4
Installing countries 2.1.4
Fetching sass 3.5.7
Installing sass 3.5.7
Fetching activejob 5.1.4
Installing activejob 5.1.4
Fetching activerecord 5.1.4
Installing activerecord 5.1.4
Fetching carrierwave 0.11.2
Installing carrierwave 0.11.2
Fetching paperclip 6.0.0
Installing paperclip 6.0.0
Fetching country_select 3.1.1
Installing country_select 3.1.1
Fetching bootstrap-sass 3.3.7
Installing bootstrap-sass 3.3.7
Fetching kaminari-activerecord 1.1.1
Installing kaminari-activerecord 1.1.1
Fetching polyamorous 1.3.3
Installing polyamorous 1.3.3
Fetching rails-dom-testing 2.0.3
Fetching loofah 2.2.2
Installing rails-dom-testing 2.0.3
Installing loofah 2.2.2
Fetching rails-html-sanitizer 1.0.4
Installing rails-html-sanitizer 1.0.4
Fetching actionview 5.1.4
Installing actionview 5.1.4
Fetching actionpack 5.1.4
Fetching kaminari-actionview 1.1.1
Installing kaminari-actionview 1.1.1
Installing actionpack 5.1.4
Fetching kaminari 1.1.1
Installing kaminari 1.1.1
Fetching actionmailer 5.1.4
Fetching railties 5.1.4
Fetching actioncable 5.1.4
Installing actionmailer 5.1.4
Installing actioncable 5.1.4
Installing railties 5.1.4
Fetching formtastic 3.1.5
Installing formtastic 3.1.5
Fetching has_scope 0.7.2
Installing has_scope 0.7.2
Fetching ransack 1.8.8
Installing ransack 1.8.8
Fetching sprockets-rails 3.2.1
Installing sprockets-rails 3.2.1
Fetching responders 2.4.0
Fetching coffee-rails 4.2.2
Fetching jquery-rails 4.3.1
Installing coffee-rails 4.2.2
Installing responders 2.4.0
Fetching rails 5.1.4
Installing jquery-rails 4.3.1
Installing rails 5.1.4
Fetching sass-rails 5.0.6
Fetching inherited_resources 1.8.0
Installing sass-rails 5.0.6
Installing inherited_resources 1.8.0
Fetching devise 4.4.3
Installing devise 4.4.3
Fetching activeadmin 1.3.0
Installing activeadmin 1.3.0
Bundle complete! 29 Gemfile dependencies, 90 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
Post-install message from sass:
Ruby Sass is deprecated and will be unmaintained as of 26 March 2019.
* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
primary implementation: https://sass-lang.com/install
* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
sassc gem: https://github.com/sass/sassc-ruby#readme
* For more details, please refer to the Sass blog:
http://sass.logdown.com/posts/7081811
Post-install message from paperclip:
##################################################
# NOTE FOR UPGRADING FROM 4.3.0 OR EARLIER #
##################################################
Paperclip is now compatible with aws-sdk >= 2.0.0.
If you are using S3 storage, aws-sdk >= 2.0.0 requires you to make a few small
changes:
* You must set the `s3_region`
* If you are explicitly setting permissions anywhere, such as in an initializer,
note that the format of the permissions changed from using an underscore to
using a hyphen. For example, `:public_read` needs to be changed to
`public-read`.
For a walkthrough of upgrading from 4 to 5 and aws-sdk >= 2.0 you can watch
http://rubythursday.com/episodes/ruby-snack-27-upgrade-paperclip-and-aws-sdk-in-prep-for-rails-5
Bundle completed (38.06s)
Cleaning up the bundler cache.
Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
The latest bundler is 1.16.3, but you are currently running 1.15.2.
To update, run `gem install bundler`
-----> Installing node-v8.10.0-linux-x64
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
Yarn executable was not detected in the system.
Download Yarn at https://yarnpkg.com/en/docs/install
rake aborted!
Sprockets::FileNotFound: couldn't find file 'turbolinks' with type 'application/javascript'
Checked in these paths:
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/app/assets/config
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/app/assets/images
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/app/assets/javascripts
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/app/assets/stylesheets
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/activeadmin-1.3.0/app/assets/images
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/activeadmin-1.3.0/app/assets/javascripts
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/activeadmin-1.3.0/app/assets/stylesheets
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/activeadmin-1.3.0/vendor/assets/javascripts
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/activeadmin-1.3.0/vendor/assets/stylesheets
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/coffee-rails-4.2.2/lib/assets/javascripts
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/jquery-rails-4.3.1/vendor/assets/javascripts
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/formtastic-3.1.5/app/assets/stylesheets
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/actioncable-5.1.4/lib/assets/compiled
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/actionview-5.1.4/lib/assets/compiled
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/node_modules
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/bootstrap-sass-3.3.7/assets/stylesheets
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/bootstrap-sass-3.3.7/assets/javascripts
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/bootstrap-sass-3.3.7/assets/fonts
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/bootstrap-sass-3.3.7/assets/images
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/app/assets/javascripts/application.js:14
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/resolve.rb:65:in `resolve!'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:399:in `resolve'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:207:in `process_require_directive'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:180:in `block in process_directives'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:178:in `each'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:178:in `process_directives'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:83:in `_call'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/directive_processor.rb:68:in `call'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:23:in `block in call'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/utils.rb:200:in `dfs'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:24:in `call'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/tmp/build_66540dbef9a5c6fa97bf6a74441a919d/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app.
! Push failed
As this lines says:
Sprockets::FileNotFound: couldn't find file 'turbolinks' with type 'application/javascript'.
turbolinks gem is missing in your gemfile, maybe including it in your gemfile solves the issue.
So I am a noob to coding. I know some html/css, but that is about it. Anyways, I am following the instructions in this poorly formatted ebook on Ruby on Rails. I have set up a container project on codeanywhere. So far I have fixed all errors up to this point through searching. It seems like a lot of people are having this problem, but I have not found a solution. I am trying to push to my Heroku account. Can anyone figure out what I am doing wrong by looking at the log? So far I have added config.assets.initialize_on_precompile = false to my application.rb file because that was one of the potential fixes. Otherwise, I'm lost.
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.4.4
-----> Installing dependencies using bundler 1.15.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Fetching rake 12.3.1
Fetching concurrent-ruby 1.0.5
Fetching json 1.8.6
Installing rake 12.3.1
Installing concurrent-ruby 1.0.5
Installing json 1.8.6 with native extensions
Fetching minitest 5.11.3
Installing minitest 5.11.3
Fetching thread_safe 0.3.6
Fetching builder 3.2.3
Installing thread_safe 0.3.6
Installing builder 3.2.3
Fetching erubis 2.7.0
Installing erubis 2.7.0
Fetching rack 1.5.5
Installing rack 1.5.5
Fetching mini_mime 1.0.0
Installing mini_mime 1.0.0
Fetching arel 5.0.1.20140414130214
Using bundler 1.15.2
Fetching coffee-script-source 1.12.2
Installing arel 5.0.1.20140414130214
Installing coffee-script-source 1.12.2
Fetching execjs 2.7.0
Installing execjs 2.7.0
Fetching thor 0.20.0
Installing thor 0.20.0
Fetching diff-lcs 1.3
Fetching hike 1.2.3
Installing hike 1.2.3
Installing diff-lcs 1.3
Fetching multi_json 1.13.1
Installing multi_json 1.13.1
Fetching mini_portile2 2.3.0
Fetching pg 0.17.1
Installing mini_portile2 2.3.0
Installing pg 0.17.1 with native extensions
Fetching tilt 1.4.1
Installing tilt 1.4.1
Fetching rails_serve_static_assets 0.0.5
Installing rails_serve_static_assets 0.0.5
Fetching rails_stdout_logging 0.0.5
Installing rails_stdout_logging 0.0.5
Fetching rdoc 4.3.0
Installing rdoc 4.3.0
Fetching rspec-support 3.8.0
Installing rspec-support 3.8.0
Fetching sass 3.2.19
Installing sass 3.2.19
Fetching turbolinks-source 5.1.0
Installing turbolinks-source 5.1.0
Fetching i18n 0.9.5
Installing i18n 0.9.5
Fetching tzinfo 1.2.5
Installing tzinfo 1.2.5
Fetching rack-test 0.6.3
Installing rack-test 0.6.3
Fetching mail 2.7.0
Installing mail 2.7.0
Fetching coffee-script 2.4.1
Installing coffee-script 2.4.1
Fetching uglifier 4.1.17
Installing uglifier 4.1.17
Fetching nokogiri 1.8.4
Installing nokogiri 1.8.4 with native extensions
Fetching sprockets 2.12.5
Installing sprockets 2.12.5
Fetching rails_12factor 0.0.2
Installing rails_12factor 0.0.2
Fetching rspec-core 3.8.0
Installing rspec-core 3.8.0
Fetching rspec-expectations 3.8.1
Installing rspec-expectations 3.8.1
Fetching rspec-mocks 3.8.0
Installing rspec-mocks 3.8.0
Fetching turbolinks 5.1.1
Installing turbolinks 5.1.1
Fetching rspec 3.8.0
Installing rspec 3.8.0
Fetching activesupport 4.1.6
Fetching sdoc 0.4.2
Installing sdoc 0.4.2
Installing activesupport 4.1.6
Fetching actionview 4.1.6
Fetching activemodel 4.1.6
Fetching jbuilder 2.6.4
Installing activemodel 4.1.6
Installing jbuilder 2.6.4
Installing actionview 4.1.6
Fetching activerecord 4.1.6
Installing activerecord 4.1.6
Fetching actionpack 4.1.6
Installing actionpack 4.1.6
Fetching actionmailer 4.1.6
Fetching railties 4.1.6
Fetching sprockets-rails 2.3.3
Installing actionmailer 4.1.6
Installing sprockets-rails 2.3.3
Installing railties 4.1.6
Fetching jquery-rails 3.1.5
Fetching rails 4.1.6
Fetching coffee-rails 4.0.1
Installing coffee-rails 4.0.1
Fetching sass-rails 4.0.5
Installing jquery-rails 3.1.5
Installing sass-rails 4.0.5
Installing rails 4.1.6
Bundle complete! 15 Gemfile dependencies, 54 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
Bundle completed (22.78s)
Cleaning up the bundler cache.
-----> Installing node-v8.10.0-linux-x64
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
/tmp/build_08716fff5e55005d68d2f9475e33fcff/vendor/bundle/ruby/2.4.0/gems/activesupport-4.1.6/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
/tmp/build_08716fff5e55005d68d2f9475e33fcff/vendor/bundle/ruby/2.4.0/gems/activesupport-4.1.6/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
Segmentation fault (core dumped)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app.
! Push failed
Type $ RAILS_ENV=production rake assets:precompile locally
Let me know if this does work?
I am a beginner at rails, trying to push my tiny app to heroku. Locally I have moved my database from mysql2 to postgresql, but unable to run my app on heroku. Locally everything is running as expected.
production:
adapter: postgresql
database: database_production
pool: 5
timeout: 5000
Running either heroku run rake db:create or heroku run rake db:migrate returns:
$ heroku run rake --trace db:create
Running `rake --trace db:create` attached to terminal... up, run.5709
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:create
Specified 'postgresql' for database adapter, but the gem is not loaded.
Add `gem 'pg'` to your Gemfile
(and ensure its version is at the minimum required by ActiveRecord).
I am able to do heroku run gem install pg multiple times
$ heroku run gem install pg
Running `gem install pg` attached to terminal... up, run.9322
Fetching: pg-0.18.1.gem (100%)
Building native extensions. This could take a while...
Successfully installed pg-0.18.1
invalid options: -f fivefish
(invalid options are ignored)
Parsing documentation for pg-0.18.1
Installing ri documentation for pg-0.18.1
Done installing documentation for pg after 3 seconds
1 gem installed
$ heroku run gem install pg
Running `gem install pg` attached to terminal... up, run.7925
Fetching: pg-0.18.1.gem (100%)
Building native extensions. This could take a while...
Successfully installed pg-0.18.1
invalid options: -f fivefish
(invalid options are ignored)
Parsing documentation for pg-0.18.1
Installing ri documentation for pg-0.18.1
Done installing documentation for pg after 4 seconds
1 gem installed
...
..etc
I also noticed something odd, but not sure if related. Running heroku run bundle install --no-deployment shows mysql2 being installed, but I have already removed it from the gemfile.
Running `bundle install --no-deployment` attached to terminal... up, run.1928
Fetching gem metadata from https://rubygems.org/.........
Installing i18n 0.7.0
Installing rake 10.4.2
Installing thread_safe 0.3.4
Installing minitest 5.5.1
Installing erubis 2.7.0
Installing builder 3.2.2
Installing mini_portile 0.6.2
Installing rack 1.6.0
Installing mime-types 2.4.3
Installing arel 6.0.0
Installing execjs 2.3.0
Installing sass 3.4.12
Installing json 1.8.2
Installing cancancan 1.10.1
Installing chunky_png 1.3.4
Installing coffee-script-source 1.9.1
Installing thor 0.19.1
Installing multi_json 1.10.1
Installing rb-fsevent 0.9.4
Installing hike 1.2.3
Installing tilt 1.4.1
Installing bcrypt 3.1.10
Using bundler 1.7.12
Installing tzinfo 1.2.2
Installing mysql2 0.3.18
Installing rack-test 0.6.3
Installing mail 2.6.3
Installing compass-import-once 1.0.5
Installing autoprefixer-rails 5.1.7
Installing rdoc 4.2.0
Installing uglifier 2.7.0
Installing coffee-script 2.3.0
Installing compass-core 1.0.3
Installing sprockets 2.12.3
Installing activesupport 4.2.0
Installing bootstrap-sass 3.3.3
Installing sdoc 0.4.1
Installing rails-deprecated_sanitizer 1.0.3
Installing globalid 0.3.3
Installing activemodel 4.2.0
Installing jbuilder 2.2.7
Installing activejob 4.2.0
Installing activerecord 4.2.0
Installing ffi 1.9.6
Installing rb-inotify 0.9.5
Installing compass 1.0.3
Installing compass-normalize 1.5
Installing nokogiri 1.6.6.2
Installing loofah 2.0.1
Installing rails-dom-testing 1.0.5
Installing rails-html-sanitizer 1.0.1
Installing actionview 4.2.0
Installing actionpack 4.2.0
Installing sprockets-rails 2.2.4
Installing railties 4.2.0
Installing coffee-rails 4.1.0
Installing sass-rails 5.0.1
Installing turbolinks 2.5.3
Installing jquery-rails 4.0.3
Installing compass-rails 2.0.4
Installing actionmailer 4.2.0
Installing rails 4.2.0
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
You must add the pg to your Gemfile and run bundle install instead of trying to install that gem manually on heroku. Add this to your application's Gemfile:
gem 'pg'
Hey guys I figured out my mistake. My gitbucket repo wasn't being updated correctly with the latest gemfile.lock, so when I did git push heroku master it used the wrong file to install - and hence it didn't install the gem 'pg' as it should. Below is after updating repo,
remote: Installing pg 0.18.1
RESULTS:
$ git push heroku master
Counting objects: 227, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (188/188), done.
Writing objects: 100% (196/196), 86.44 KiB | 0 bytes/s, done.
Total 196 (delta 116), 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.7.12
remote: Ruby version change detected. Clearing bundler cache.
remote: Old: ruby 2.0.0p598 (2014-11-13 revision 48408) [x86_64-linux]
remote: New: ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]
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: Installing rake 10.4.2
remote: Installing i18n 0.7.0
remote: Installing minitest 5.5.1
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile 0.6.2
remote: Installing rack 1.6.0
remote: Installing json 1.8.2
remote: Installing mime-types 2.4.3
remote: Installing arel 6.0.0
remote: Installing execjs 2.3.0
remote: Installing sass 3.4.12
remote: Installing cancancan 1.10.1
remote: Installing chunky_png 1.3.4
remote: Installing thread_safe 0.3.4
remote: Installing coffee-script-source 1.9.1
remote: Installing bcrypt 3.1.10
remote: Installing multi_json 1.10.1
remote: Installing thor 0.19.1
remote: Installing rb-fsevent 0.9.4
remote: Installing tilt 1.4.1
remote: Installing hike 1.2.3
remote: Installing jquery 0.0.1
remote: Using bundler 1.7.12
remote: Installing rails_serve_static_assets 0.0.4
remote: Installing rails_stdout_logging 0.0.3
remote: Installing pg 0.18.1
remote: Installing rack-test 0.6.3
remote: Installing nokogiri 1.6.6.2
remote: Installing rdoc 4.2.0
remote: Installing mail 2.6.3
remote: Installing autoprefixer-rails 5.1.7
remote: Installing puma 2.11.1
remote: Installing uglifier 2.7.0
remote: Installing compass-import-once 1.0.5
remote: Installing coffee-script 2.3.0
remote: Installing tzinfo 1.2.2
remote: Installing sprockets 2.12.3
remote: Installing compass-core 1.0.3
remote: Installing rails_12factor 0.0.2
remote: Installing loofah 2.0.1
remote: Installing sdoc 0.4.1
remote: Installing bootstrap-sass 3.3.3
remote: Installing activesupport 4.2.0
remote: Installing rails-html-sanitizer 1.0.1
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing globalid 0.3.3
remote: Installing activemodel 4.2.0
remote: Installing rails-dom-testing 1.0.5
remote: Installing jbuilder 2.2.8
remote: Installing activejob 4.2.0
remote: Installing activerecord 4.2.0
remote: Installing actionview 4.2.0
remote: Installing actionpack 4.2.0
remote: Installing railties 4.2.0
remote: Installing actionmailer 4.2.0
remote: Installing sprockets-rails 2.2.4
remote: Installing coffee-rails 4.1.0
remote: Installing sass-rails 5.0.1
remote: Installing jquery-rails 4.0.3
remote: Installing rails 4.2.0
remote: Installing turbolinks 2.5.3
remote: Installing ffi 1.9.6
remote: Installing rb-inotify 0.9.5
remote: Installing compass 1.0.3
remote: Installing compass-normalize 1.5
remote: Installing compass-rails 2.0.4
remote: Your bundle is complete!
remote: Gems in the groups development and test were not installed.
remote: It was 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: Post-install message from compass:
remote: Compass is charityware. If you love it, please donate on our behalf at http://umdf.org/compass Thanks!
remote: Bundle completed (53.27s)
remote: Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: I, [2015-02-22T12:12:37.186296 #3823] INFO -- : Writing /tmp/build_39c4ef560255ffc2b75041a3c43b0fe0/public/assets/application-3fbdcccb5f04a215dfa1c3b6cc3d3df5.js
remote: I, [2015-02-22T12:12:47.594119 #3823] INFO -- : Writing /tmp/build_39c4ef560255ffc2b75041a3c43b0fe0/public/assets/application-1aa5e71d1c1c4ad6b0fd474b04a30100.css
remote: Asset precompilation completed (18.56s)
remote: Cleaning assets
remote: Running: rake assets:clean
remote:
remote: ###### WARNING:
remote: No Procfile detected, using the default web server (webrick)
remote: https://devcenter.heroku.com/articles/ruby-default-web-server
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote: Default types for Ruby -> console, rake, web, worker
remote:
remote: -----> Compressing... done, 37.6MB
remote: -----> Launching... done, v7
remote: https://<app-name>.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy.... done.
Thanks for all the help, stupid mistake of mine.