Deploying app to Heroku: 'NameError: uninitialized constant Devise' - ruby-on-rails

I want to deploy my Rails app to Heroku. Of course I have some additional gems included like 'devise' or 'rails_admin'. I have followed strictly Rails Girls' tutorial (http://guides.railsgirls.com/heroku/). I have faced some really annoying problem when running git push heroku master.
Counting objects: 220, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (198/198), done.
Writing objects: 100% (220/220), 94.69 KiB | 0 bytes/s, done.
Total 220 (delta 21), 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.7.12
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 i18n 0.7.0
remote: Installing rake 10.4.2
remote: Installing minitest 5.5.1
remote: Installing thread_safe 0.3.4
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile 0.6.2
remote: Installing mime-types 2.4.3
remote: Installing rack 1.6.0
remote: Installing arel 6.0.0
remote: Installing coffee-script-source 1.8.0
remote: Installing execjs 2.2.2
remote: Installing thor 0.19.1
remote: Installing hike 1.2.3
remote: Installing multi_json 1.10.1
remote: Using bundler 1.7.12
remote: Installing tilt 1.4.1
remote: Installing rails_serve_static_assets 0.0.4
remote: Installing rails_stdout_logging 0.0.3
remote: Installing sass 3.4.10
remote: Installing tzinfo 1.2.2
remote: Installing json 1.8.2
remote: Installing mail 2.6.3
remote: Installing rack-test 0.6.3
remote: Installing coffee-script 2.3.0
remote: Installing sprockets 2.12.3
remote: Installing rails_12factor 0.0.3
remote: Installing activesupport 4.2.0.rc3
remote: Installing rdoc 4.2.0
remote: Installing uglifier 2.7.0
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing globalid 0.3.0
remote: Installing activemodel 4.2.0.rc3
remote: Installing jbuilder 2.2.6
remote: Installing sdoc 0.4.1
remote: Installing activejob 4.2.0.rc3
remote: Installing activerecord 4.2.0.rc3
remote: Installing nokogiri 1.6.6.2
remote: Installing pg 0.18.1
remote: Installing loofah 2.0.1
remote: Installing rails-dom-testing 1.0.5
remote: Installing rails-html-sanitizer 1.0.1
remote: Installing actionview 4.2.0.rc3
remote: Installing actionpack 4.2.0.rc3
remote: Installing actionmailer 4.2.0.rc3
remote: Installing sprockets-rails 2.2.4
remote: Installing railties 4.2.0.rc3
remote: Installing coffee-rails 4.1.0
remote: Installing jquery-rails 4.0.1
remote: Installing rails 4.2.0.rc3
remote: Installing sass-rails 5.0.1
remote: Installing turbolinks 2.5.3
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: Bundle completed (35.01s)
remote: Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: NameError: uninitialized constant Devise
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/config/initializers/devise.rb:3:in '<top (required)>'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/engine.rb:652:in 'block in load_config_initializer'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.0.rc3/lib/active_support/notifications.rb:166:in 'instrument'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/engine.rb:651:in 'load_config_initializer'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/engine.rb:616:in 'block (2 levels) in <class:Engine>'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/engine.rb:615:in 'each'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/engine.rb:615:in 'block in <class:Engine>'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/initializable.rb:30:in 'instance_exec'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/initializable.rb:30:in 'run'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/initializable.rb:55:in 'block in run_initializers'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/initializable.rb:44:in 'each'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/initializable.rb:44:in 'tsort_each_child'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/initializable.rb:54:in 'run_initializers'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/application.rb:352:in 'initialize!'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/config/environment.rb:5:in '<top (required)>'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/application.rb:328:in 'require'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/application.rb:328:in 'require_environment!'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0.rc3/lib/rails/application.rb:443:in 'block in run_tasks_blocks'
remote: /tmp/build_8bd0cbc64dad003f3588b01ead189e3c/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.2.4/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 powerful-taiga-2060.
remote:
To https://git.heroku.com/powerful-taiga-2060.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/powerful-taiga-2060.git`
Here is my Gemfile:
source 'https://rubygems.org'
gem 'rails', '4.2.0.rc3'
group :development do
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :production, :test do
gem 'byebug'
gem 'web-console', '~> 2.0'
gem 'spring'
gem 'bootstrap-generators', '~> 3.3.1'
gem 'simple_form', :git => 'git://github.com/plataformatec/simple_form.git'
gem 'rails_admin'
gem 'mocha'
gem 'nifty-generators'
gem 'jquery-turbolinks'
gem 'devise'
end
The problem must be with rake assets:precompile.
Could anyone help me? The problem really slows down my Rails Adventure.

None of the gems in your
group :development, :production, :test do
were installed based on the Heroku logs. Try putting them outside the group.

Edit: Remove Devise from the ":development, :production, :test:" group as Heroku is not going to install anything in the development or test group:
gem 'devise'
After that, go to the root directory of your project and do
git add .
to put the changes in queue. Then run
git commit -m "adds devise to gemfile"
to add the changes to your commit logs. Then run
git push heroku master
And everything should work.

Related

Pushing a Rails app to Heroku - "Precompiling assets failed."

I am trying to push my Rails app to Heroku and am getting the below error:
Counting objects: 151, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (151/151), done.
Writing objects: 100% (151/151), 25.49 MiB | 844.00 KiB/s, done.
Total 151 (delta 94), 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.4.5
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.2). 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.4
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: Using msgpack 1.2.4
remote: Using ffi 1.9.25
remote: Using bundler 1.15.2
remote: Using multi_json 1.13.1
remote: Using method_source 0.9.2
remote: Using pg 0.21.0
remote: Using puma 3.12.0
remote: Using thor 0.20.3
remote: Using redis 4.1.0
remote: Using tilt 2.0.9
remote: Using i18n 1.2.0
remote: Using tzinfo 1.2.5
remote: Using nokogiri 1.8.5
remote: Using websocket-driver 0.7.0
remote: Using rack-test 1.1.0
remote: Using rack-proxy 0.6.5
remote: Using sprockets 3.7.2
remote: Using mail 2.7.1
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 sassc 2.0.0
remote: Using activesupport 5.2.1
remote: Using loofah 2.2.3
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.1
remote: Using jbuilder 2.8.0
remote: Using bootstrap-sass 3.4.0
remote: Using font-awesome-sass 5.5.0.1
remote: Using actionview 5.2.1
remote: Using activejob 5.2.1
remote: Using activerecord 5.2.1
remote: Using actionpack 5.2.1
remote: Using actioncable 5.2.1
remote: Using activestorage 5.2.1
remote: Using railties 5.2.1
remote: Using sprockets-rails 3.2.1
remote: Using simple_form 4.1.0
remote: Using actionmailer 5.2.1
remote: Using webpacker 3.5.5
remote: Using sassc-rails 2.0.0
remote: Using rails 5.2.1
remote: Bundle complete! 20 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 (2.94s)
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.2). 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: -----> Installing yarn-v1.5.1
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: yarn install v1.5.1
remote: [1/4] Resolving packages...
remote: [2/4] Fetching packages...
remote: info fsevents#1.2.4: The platform "linux" is incompatible with this module.
remote: info "fsevents#1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
remote: [3/4] Linking dependencies...
remote: warning "#rails/webpacker > postcss-cssnext#3.1.0" has unmet peer dependency "caniuse-lite#^1.0.30000697".
remote: warning " > webpack-dev-server#2.11.2" has unmet peer dependency "webpack#^2.2.0 || ^3.0.0".
remote: warning "webpack-dev-server > webpack-dev-middleware#1.12.2" has unmet peer dependency "webpack#^1.0.0 || ^2.0.0 || ^3.0.0".
remote: [4/4] Building fresh packages...
remote: Done in 20.00s.
remote: I, [2018-12-24T17:14:15.109116 #409] INFO -- : Writing /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/public/assets/Circle-0fced0bef25671945de87c22a37c75605efb7f48d86ed387c97894abc57fc305.png
remote: I, [2018-12-24T17:14:15.115329 #409] INFO -- : Writing /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/public/assets/architectural-design-architecture-bench-b3126997ea1f82ae64eb45638971e9a9852df31f03b2d80695bceabfedd0d789.jpg
remote: I, [2018-12-24T17:14:15.121854 #409] INFO -- : Writing /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/public/assets/architecture-boy-building-e4a11ead07ae2f196935970b9f6d1617ceff81e1519c02973f7a3a0728b57e44.jpg
remote: I, [2018-12-24T17:14:15.126914 #409] INFO -- : Writing /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/public/assets/architecture-bricks-buildings-52ba2f71d6d3c15c08fb7e526c88f8e4ba486f48490a8047824209fb7ed4beb3.jpg
remote: I, [2018-12-24T17:14:15.131626 #409] INFO -- : Writing /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/public/assets/architecture-building-building-site-377c0ddb71908bb0093d000e36223925eab2e584b6bb583811a47157e15387e1.jpg
remote: I, [2018-12-24T17:14:15.135486 #409] INFO -- : Writing /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/public/assets/asphalt-blur-bricks-9971516befa9aed81640a1be2daed94b2432e1aa8bda5c87e4d4de86981490de.jpg
remote: I, [2018-12-24T17:14:15.163513 #409] INFO -- : Writing /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/public/assets/b&wbricks-e5ad65e07ae90a3aafd45674c36925bc4ce37672a3b7781dec1bf354da53bf15.jpg
remote: I, [2018-12-24T17:14:15.339917 #409] INFO -- : Writing /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/public/assets/build-builder-builders-13272d04c77701847534e350ff582062d78773d79058f9ad13a0e714d1499f93.jpg
remote: I, [2018-12-24T17:14:15.349110 #409] INFO -- : Writing /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/public/assets/portfolio-534dc7c251be1e38e52ab2f31cac69db6955cd4e907c79665627943ab1283231.svg
remote: I, [2018-12-24T17:14:15.349283 #409] INFO -- : Writing /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/public/assets/portfolio-534dc7c251be1e38e52ab2f31cac69db6955cd4e907c79665627943ab1283231.svg.gz
remote: I, [2018-12-24T17:14:15.354135 #409] INFO -- : Writing /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/public/assets/skyline-contractors-3da17ace5fc02409a2b797a9bf60c5d71710c0da9c7aba834e133e89971b1a27.svg
remote: I, [2018-12-24T17:14:15.354300 #409] INFO -- : Writing /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/public/assets/skyline-contractors-3da17ace5fc02409a2b797a9bf60c5d71710c0da9c7aba834e133e89971b1a27.svg.gz
remote: rake aborted!
remote: Uglifier::Error: Unexpected token: name (anchorlinks). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true).
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/uglifier-4.1.20/lib/uglifier.rb:234:in `parse_result'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/uglifier-4.1.20/lib/uglifier.rb:216:in `run_uglifyjs'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/uglifier-4.1.20/lib/uglifier.rb:168:in `compile'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:53:in `call'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:28:in `call'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
remote: /tmp/build_c45535d8c2a0f6b2e090f551394cd52a/vendor/bundle/ruby/2.4.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
remote: Tasks: TOP => assets:precompile
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 skyline-contactors.
remote:
To https://git.heroku.com/skyline-contactors.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/skyline- contactors.git'
Before marking this as a duplicate, I have seen other threads with the same issue and have tried the following:
Uninstalling & reinstalling bundler (I've previously had bundler version issues),
Removing the Gemfile.lock,
Tried $rake assets:precompile,
Added "config.assets.initialize_on_precompile = false" to config/application.rb.
None of these have worked for me, unfortunately.
I recently changed the name of the Heroku file, but I don't think this will have any implications.
This is my Gemfile:
source 'https://rubygems.org'
ruby '2.4.5'
gem 'bootsnap', require: false
gem 'jbuilder', '~> 2.0'
gem 'pg', '~> 0.21'
gem 'puma'
gem 'rails', '5.2.1'
gem 'redis'
gem 'autoprefixer-rails'
gem 'bootstrap-sass', '~> 3.3'
gem 'font-awesome-sass', '~> 5.5.0'
gem 'sassc-rails'
gem 'simple_form'
gem 'uglifier'
gem 'webpacker'
group :development do
gem 'web-console', '>= 3.3.0'
end
group :development, :test do
gem 'pry-byebug'
gem 'pry-rails'
gem 'listen', '~> 3.0.5'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'dotenv-rails'
end
Apologies in advance if the question has indeed been answered on here before, but I think I have exhausted the existing resources. Please let me know if you see anything that I'm doing completely wrong; any feedback or assistance would be much appreciated, thank you.
The error is this part Uglifier::Error: Unexpected token: name (anchorlinks). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true). This should solve it.
config/environments/production.rb
config.assets.js_compressor = Uglifier.new(:harmony => true)

ruby on rails, heroku push error: "rake aborted", "Push rejected, failed to compile Ruby app."

I am new to ruby, and is following some guide on first deploy of a website. I find it difficult to follow exactly what the author said since it has been written for quite a while.
Here is what happens after I typed in git push heroku master
Counting objects: 68, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (57/57), done.
Writing objects: 100% (68/68), 17.29 KiB | 0 bytes/s, done.
Total 68 (delta 5), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.6
remote: -----> Installing dependencies using bundler 1.13.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.14.4). 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: Installing i18n 0.8.1
remote: Installing rake 12.0.0
remote: Installing json 1.8.6 with native extensions
remote: Installing minitest 5.10.1
remote: Installing thread_safe 0.3.6
remote: Installing builder 3.2.3
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.1.0
remote: Installing rack 1.6.5
remote: Installing arel 6.0.4
remote: Installing mime-types-data 3.2016.0521
remote: Installing execjs 2.7.0
remote: Installing coffee-script-source 1.12.2
remote: Installing thor 0.19.4
remote: Installing concurrent-ruby 1.0.5
remote: Installing multi_json 1.12.1
remote: Installing pg 0.20.0 with native extensions
remote: Using bundler 1.13.7
remote: Installing rails_serve_static_assets 0.0.5
remote: Installing rails_stdout_logging 0.0.5
remote: Installing rdoc 4.3.0
remote: Installing sass 3.4.23
remote: Installing tilt 1.4.1
remote: Installing turbolinks-source 5.0.0
remote: Installing tzinfo 1.2.3
remote: Installing nokogiri 1.7.1 with native extensions
remote: Installing rack-test 0.6.3
remote: Installing mime-types 3.1
remote: Installing coffee-script 2.4.1
remote: Installing uglifier 1.3.0
remote: Installing sprockets 3.7.1
remote: Installing rails_12factor 0.0.3
remote: Installing turbolinks 5.0.1
remote: Installing mail 2.6.4
remote: Installing loofah 2.0.3
remote: Installing rails-html-sanitizer 1.0.3
remote: Installing sdoc 0.4.0
remote: Installing activesupport 4.2.5
remote: Installing globalid 0.3.7
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing activemodel 4.2.5
remote: Installing jbuilder 2.0.0
remote: Installing activejob 4.2.5
remote: Installing rails-dom-testing 1.0.8
remote: Installing activerecord 4.2.5
remote: Installing actionview 4.2.5
remote: Installing actionpack 4.2.5
remote: Installing sprockets-rails 3.2.0
remote: Installing actionmailer 4.2.5
remote: Installing railties 4.2.5
remote: Installing coffee-rails 4.1.0
remote: Installing sass-rails 5.0.0
remote: Installing jquery-rails 4.3.1
remote: Installing rails 4.2.5
remote: Bundle complete! 14 Gemfile dependencies, 54 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 (23.25s)
remote: Cleaning up the bundler cache.
remote: -----> Installing node-v6.10.0-linux-x64
remote: -----> Detecting rake tasks
remote: sh: 1: Syntax error: word unexpected (expecting ")")
remote: sh: 1: Syntax error: word unexpected (expecting ")")
remote: !
remote: ! Could not detect rake tasks
remote: ! ensure you can run `$ bundle exec rake -P` against your app
remote: ! and using the production group of your Gemfile.
remote: ! rake aborted!
remote: ! Bundler::GemRequireError: There was an error while trying to load the gem 'sass-rails'.
remote: ! Gem Load Error is: uninitialized constant Sass::Script
remote: ! Backtrace for gem load error is:
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.0/lib/sass/rails/helpers.rb:11:in `<top (required)>'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.0/lib/sass/rails.rb:8:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.0/lib/sass/rails.rb:8:in `<top (required)>'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.0/lib/sass-rails.rb:1:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/sass-rails-5.0.0/lib/sass-rails.rb:1:in `<top (required)>'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in `each'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in `block in require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in `each'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler.rb:106:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/config/application.rb:7:in `<top (required)>'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/Rakefile:4:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/Rakefile:4:in `<top (required)>'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
remote: ! vendor/bundle/bin/rake:17:in `load'
remote: ! vendor/bundle/bin/rake:17:in `<main>'
remote: ! Bundler Error Backtrace:
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in `each'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in `block in require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in `each'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/bundler-1.13.7/lib/bundler.rb:106:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/config/application.rb:7:in `<top (required)>'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/Rakefile:4:in `require'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/Rakefile:4:in `<top (required)>'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
remote: ! /tmp/build_58ad731988b51b7dabe8f6a61971228c/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
......
remote: from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:16:in `instrument'
remote: from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/lib/language_pack/instrument.rb:35:in `trace'
remote: from /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/bin/ruby_compile:11:in `<main>'
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy....
remote:
remote: ! Push rejected to hidden-eyrie-90646.
remote:
To https://git.heroku.com/hidden-eyrie-90646.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/hidden-eyrie-90646.git'
But when I typed in the command `$ bundle install --without production`
It seems alright:
`Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Using rake 12.0.0
Using i18n 0.8.1
Using json 1.8.6
Using minitest 5.10.1
Using thread_safe 0.3.6
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using rack 1.6.5
Using mime-types-data 3.2016.0521
Using arel 6.0.4
Using coffee-script-source 1.12.2
Using execjs 2.7.0
Using thor 0.19.4
Using concurrent-ruby 1.0.5
Using multi_json 1.12.1
Using rack-timeout 0.3.2
Using bundler 1.14.4
Using rdoc 4.3.0
Using sass 3.4.23
Using tilt 1.4.1
Using sqlite3 1.3.13
Using turbolinks-source 5.0.0
Using tzinfo 1.2.3
Using nokogiri 1.7.1
Using rack-test 0.6.3
Using mime-types 3.1
Using coffee-script 2.4.1
Using sprockets 3.7.1
Using uglifier 1.3.0
Using sdoc 0.4.0
Using turbolinks 5.0.1
Using activesupport 4.2.5
Using loofah 2.0.3
Using mail 2.6.4
Using rails-deprecated_sanitizer 1.0.3
Using globalid 0.3.7
Using activemodel 4.2.5
Using jbuilder 2.0.0
Using spring 2.0.1
Using rails-html-sanitizer 1.0.3
Using rails-dom-testing 1.0.8
Using activejob 4.2.5
Using activerecord 4.2.5
Using actionview 4.2.5
Using actionpack 4.2.5
Using actionmailer 4.2.5
Using railties 4.2.5
Using sprockets-rails 3.2.0
Using coffee-rails 4.1.0
Using jquery-rails 4.3.1
Using rails 4.2.5
Using sass-rails 5.0.0
Bundle complete! 13 Gemfile dependencies, 53 gems now installed.
Gems in the group production were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.`
(I deleted some message because it exceeded the length limit of stackoverflow.)
My Gemfile is:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', group: [:development, :test]
# Use postgresql as database for production
group :production do
gem 'pg'
gem 'rails_12factor'
end
# Use SCSS for stylesheets
gem 'sass-rails', ' 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', ' 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', ' 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', ' 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', ' 0.4.0', group: :doc
gem 'spring', group: :development
gem 'rack-timeout', '0.3.2'
# Use ActiveModel has_secure_password
# gem 'bcrypt', ' 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
#group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
# gem 'byebug'
#end
#group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
# gem 'web-console', ' 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
# gem 'spring'
#end
My Gemfile is not the same as the lecturer presented, because somehow I can't install the 4.1.0 version Ruby (mine is 4.2.5) on Cloud9 IDE.
And here is the lecturer's Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', group: [:development, :test]
# Use postgresql as database for production
group :production do
gem 'pg'
gem 'rails_12factor'
end
# Use SCSS for stylesheets
gem 'sass-rails', ' 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', ' 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', ' 4.0.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', ' 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', ' 0.4.0', group: :doc
gem 'spring', group: :development
What should I do? Thank you in advance.
your gem version is
gem 'sass-rails', ' 5.0'
change it to
gem 'sass-rails', '5.0.3' or gem 'sass-rails', '5.0.2'
or do
bundle update sass-rails
which ultimately updates you saas-rails gem to the latest one. Or you can enter the version in your gemfile as specified above.

Heroku rejecting my git push due to SQLite3

Heroku keeps rejecting my pushes with this error:
Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Detected sqlite3 gem which is not supported on Heroku.
remote: ! https://devcenter.heroku.com/articles/sqlite3
remote: !
remote: ! Push rejected, failed to compile Ruby app.
I realize this is a common problem (I have looked at other threads) I have tried removing the sqlite3 gem from my Gemfile, I ran a bundle install and made sure that the sqlite3 gem was also out of my Gemfile.lock (which it was).
I also got rid of all references to sqlite3 from my database.yml and replaced them with Postgres:
#
default: &default
adapter: postgresql
encoding: unicode
database: store_development
pool: 5
timeout: 5000
development:
adapter: postgresql
encoding: unicode
database: store_development
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: postgresql
encoding: unicode
database: store_test
production:
adapter: postgresql
encoding: unicode
database: store_development
I'm lost any suggestions?
Here is my gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5.1'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
#bcrypt for for encrpytion
gem 'bcrypt', '~> 3.1', '>= 3.1.11'
#byebug
gem 'byebug', '~> 9.0', '>= 9.0.5'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
#paperclip for easy upload management
gem 'paperclip', '~> 4.3', '>= 4.3.6'
#bootstrap-sass
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.6'
#searchkick
gem 'searchkick', '~> 1.2', '>= 1.2.1'
#paginate
gem 'will_paginate', '~> 3.1'
#paginate for bootstrap
gem 'bootstrap-will_paginate', '~> 0.0.10'
#Carrierwave
#gem 'carrierwave'
#Cloudinary
#gem 'cloudinary'
#Paperclip forcloudinary
gem 'paperclip-cloudinary'
#elasticsearch stuff
gem 'elasticsearch-rails'
gem 'elasticsearch-model'
#bonsi
gem 'bonsai-elasticsearch-rails', '~> 0.0.4'
group :development, :test do
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
#db stuff
gem 'sqlite3'
end
group :production do
gem 'rails_12factor'
gem 'puma', '~> 3.4'
#postgresql
gem 'pg'
end
I'll also include the whole Heroku rejection just for reference:
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.4
remote: -----> Installing dependencies using bundler 1.11.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Warning: the running version of Bundler is older than the version that created the lockfile. 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 i18n 0.7.0
remote: Using rake 11.1.2
remote: Using json 1.8.3
remote: Using minitest 5.8.4
remote: Using thread_safe 0.3.5
remote: Using builder 3.2.2
remote: Using erubis 2.7.0
remote: Using mini_portile2 2.0.0
remote: Using rack 1.6.4
remote: Using mime-types-data 3.2016.0221
remote: Using arel 6.0.3
remote: Using execjs 2.6.0
remote: Using aws_cf_signer 0.1.3
remote: Using bcrypt 3.1.11
remote: Using bonsai-elasticsearch-rails 0.0.4
remote: Using sass 3.4.22
remote: Using will_paginate 3.1.0
remote: Using coffee-script-source 1.10.0
remote: Using thor 0.19.1
remote: Using concurrent-ruby 1.0.1
remote: Using orm_adapter 0.5.0
remote: Using multi_json 1.11.2
remote: Using multipart-post 2.0.0
remote: Using hashie 3.4.3
remote: Using elasticsearch-rails 0.1.9
remote: Using mimemagic 0.3.0
remote: Using pg 0.18.4
remote: Using bundler 1.11.2
remote: Using rails_serve_static_assets 0.0.5
remote: Using rails_stdout_logging 0.0.5
remote: Using tilt 2.0.2
remote: Using rdoc 4.2.2
remote: Using tzinfo 1.2.2
remote: Using nokogiri 1.6.7.2
remote: Using mime-types 3.0
remote: Using autoprefixer-rails 6.3.6
remote: Using uglifier 3.0.0
remote: Using rack-test 0.6.3
remote: Using warden 1.2.6
remote: Using bootstrap-will_paginate 0.0.10
remote: Using coffee-script 2.4.1
remote: Using sprockets 3.6.0
remote: Using elasticsearch-api 1.0.17
remote: Using faraday 0.9.2
remote: Using rails_12factor 0.0.3
remote: Using sdoc 0.4.1
remote: Using activesupport 4.2.5.1
remote: Using loofah 2.0.3
remote: Using mail 2.6.4
remote: Using rest-client 1.6.7
remote: Using bootstrap-sass 3.3.6
remote: Using elasticsearch-transport 1.0.17
remote: Using rails-deprecated_sanitizer 1.0.3
remote: Using globalid 0.3.6
remote: Using activemodel 4.2.5.1
remote: Using climate_control 0.0.3
remote: Using jbuilder 2.4.1
remote: Using rails-html-sanitizer 1.0.3
remote: Using cloudinary 1.2.0
remote: Using rails-dom-testing 1.0.7
remote: Using elasticsearch 1.0.17
remote: Using activejob 4.2.5.1
remote: Using cocaine 0.5.8
remote: Using paperclip-cloudinary 1.1.0
remote: Using actionview 4.2.5.1
remote: Using elasticsearch-model 0.1.9
remote: Using activerecord 4.2.5.1
remote: Using searchkick 1.2.1
remote: Using paperclip 4.3.6
remote: Using actionpack 4.2.5.1
remote: Using actionmailer 4.2.5.1
remote: Using railties 4.2.5.1
remote: Using sprockets-rails 3.0.4
remote: Using coffee-rails 4.1.1
remote: Using responders 2.1.2
remote: Using jquery-rails 4.1.1
remote: Using rails 4.2.5.1
remote: Using sass-rails 5.0.4
remote: Using turbolinks 2.5.3
remote: Using devise 4.0.0
remote: Installing sqlite3 1.3.11 with native extensions
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote: /tmp/build_650c9daea9707f0830f7e2ecbfc558e2/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160801-197-lz2bsz.rb extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_650c9daea9707f0830f7e2ecbfc558e2/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/lib
remote: extconf failed, exit code 1
remote: Gem files will remain installed in /tmp/build_650c9daea9707f0830f7e2ecbfc558e2/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection.
remote: Results logged to /tmp/build_650c9daea9707f0830f7e2ecbfc558e2/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out
remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
remote: Bundler Output: Warning: the running version of Bundler is older than the version that created the lockfile. 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 i18n 0.7.0
remote: Using rake 11.1.2
remote: Using json 1.8.3
remote: Using minitest 5.8.4
remote: Using thread_safe 0.3.5
remote: Using builder 3.2.2
remote: Using erubis 2.7.0
remote: Using mini_portile2 2.0.0
remote: Using rack 1.6.4
remote: Using mime-types-data 3.2016.0221
remote: Using arel 6.0.3
remote: Using execjs 2.6.0
remote: Using aws_cf_signer 0.1.3
remote: Using bcrypt 3.1.11
remote: Using bonsai-elasticsearch-rails 0.0.4
remote: Using sass 3.4.22
remote: Using will_paginate 3.1.0
remote: Using coffee-script-source 1.10.0
remote: Using thor 0.19.1
remote: Using concurrent-ruby 1.0.1
remote: Using orm_adapter 0.5.0
remote: Using multi_json 1.11.2
remote: Using multipart-post 2.0.0
remote: Using hashie 3.4.3
remote: Using elasticsearch-rails 0.1.9
remote: Using mimemagic 0.3.0
remote: Using pg 0.18.4
remote: Using bundler 1.11.2
remote: Using rails_serve_static_assets 0.0.5
remote: Using rails_stdout_logging 0.0.5
remote: Using tilt 2.0.2
remote: Using rdoc 4.2.2
remote: Using tzinfo 1.2.2
remote: Using nokogiri 1.6.7.2
remote: Using mime-types 3.0
remote: Using autoprefixer-rails 6.3.6
remote: Using uglifier 3.0.0
remote: Using rack-test 0.6.3
remote: Using warden 1.2.6
remote: Using bootstrap-will_paginate 0.0.10
remote: Using coffee-script 2.4.1
remote: Using sprockets 3.6.0
remote: Using elasticsearch-api 1.0.17
remote: Using faraday 0.9.2
remote: Using rails_12factor 0.0.3
remote: Using sdoc 0.4.1
remote: Using activesupport 4.2.5.1
remote: Using loofah 2.0.3
remote: Using mail 2.6.4
remote: Using rest-client 1.6.7
remote: Using bootstrap-sass 3.3.6
remote: Using elasticsearch-transport 1.0.17
remote: Using rails-deprecated_sanitizer 1.0.3
remote: Using globalid 0.3.6
remote: Using activemodel 4.2.5.1
remote: Using climate_control 0.0.3
remote: Using jbuilder 2.4.1
remote: Using rails-html-sanitizer 1.0.3
remote: Using cloudinary 1.2.0
remote: Using rails-dom-testing 1.0.7
remote: Using elasticsearch 1.0.17
remote: Using activejob 4.2.5.1
remote: Using cocaine 0.5.8
remote: Using paperclip-cloudinary 1.1.0
remote: Using actionview 4.2.5.1
remote: Using elasticsearch-model 0.1.9
remote: Using activerecord 4.2.5.1
remote: Using searchkick 1.2.1
remote: Using paperclip 4.3.6
remote: Using actionpack 4.2.5.1
remote: Using actionmailer 4.2.5.1
remote: Using railties 4.2.5.1
remote: Using sprockets-rails 3.0.4
remote: Using coffee-rails 4.1.1
remote: Using responders 2.1.2
remote: Using jquery-rails 4.1.1
remote: Using rails 4.2.5.1
remote: Using sass-rails 5.0.4
remote: Using turbolinks 2.5.3
remote: Using devise 4.0.0
remote: Installing sqlite3 1.3.11 with native extensions
remote:
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:
remote: /tmp/build_650c9daea9707f0830f7e2ecbfc558e2/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160801-197-lz2bsz.rb extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote:
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_650c9daea9707f0830f7e2ecbfc558e2/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/lib
remote:
remote: extconf failed, exit code 1
remote:
remote: Gem files will remain installed in /tmp/build_650c9daea9707f0830f7e2ecbfc558e2/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection.
remote: Results logged to /tmp/build_650c9daea9707f0830f7e2ecbfc558e2/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out
remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Detected sqlite3 gem which is not supported on Heroku.
remote: ! https://devcenter.heroku.com/articles/sqlite3
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to professor-ratings.
remote:
Could the problem be with the build configuration? How can I change that?'
Using SQLITE3 is fine in development, Heroku just needs PG for production, your gemfile should look something like this:
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
You may need to reset your database (rails db:reset / rake db:reset depending on rails version). Then you can just run bundle install --without production
I had the same problem, I achieve FIXED
Delete file "gemfile.lock"
Move "gem 'sqlite3'" into development group.
Add production group whit gem 'pg':
group :production do
gem 'pg'
end
then bundle
git add .
In console or command promt or CMD run:
heroku config:set BUNDLE_WITHOUT="development:test"
Dont forget commit.
And then, git push heroku master
GO SUCCESS!!
remote: ! Detected sqlite3 gem which is not supported on Heroku.
remote: ! https://devcenter.heroku.com/articles/sqlite3
Log it self say's sqlite3 is not supported on Heroku by default. by default Heroku use the postgres database.
Make sure your Gemfile contains gem 'pg' in production group and try again, it will surely work.
If you want to use sqlite3 on developmet then you have to do code as below in your Gemfile
#Gemfile
gem 'sqlite3', group: [:development, :test]
gem 'pg', group: :production
Firstly makes sure you have added the following gems
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
Next make sure you run bundle intsall
Now push your app to github git push origin master
Now your ready to push it into production git push heroku master
After you bundle install you need to make sure you pushed your app to github first (assuming your using github)
As they said you need to replace the gem, however gem pg won't work on windows because the latest version is buggy. So you need to do three things basically to push correctly to heroku.
1- add these two gems to your gemfile
group :production do
gem 'pg','~>0.19.0.pre20160409114042'
gem 'rails_12factor'
the group is only if you want to keep pg in the production mode mainly then of course run
bundle install
so make sure everything is alright by running the server once more all the gems are ok now we move to the next step
2- make sure you are on the right heroku and apparently you are but here is the a nice trick you can do
rake assets:precompile
to make sure all your assets are compiled and ready then do the normal git procedure
git add .
git commit -am"latest or whatever you feel like"
3- last but not least push to heroku the right way
git push heroku master
You pushed to heroku but your database didn't run on heroku right
heroku run rails db:migrate
So now it should be all good to go.
If it's still not ok please tell us.
Hope that's helpful

Error executing a gem

Initially, I tried to push my application up to heroku with the git push heroku master command and I got this error:
$ git push heroku master
Counting objects: 106, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (94/94), done.
Writing objects: 100% (106/106), 20.47 KiB | 0 bytes/s, done.
Total 106 (delta 21), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.4
remote: ###### WARNING:
remote: Removing `Gemfile.lock` because it was generated on Windows.
remote: Bundler will do a full resolve so native gems are handled properly.
remote: This may result in unexpected gem versions being used in your app.
remote: In rare occasions Bundler may not be able to resolve your dependencies at all.
remote: https://devcenter.heroku.com/articles/bundler-windows-gemfile
remote:
remote: -----> Installing dependencies using bundler 1.11.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Resolving dependencies....
remote: Installing json 1.8.3 with native extensions
remote: Installing i18n 0.7.0
remote: Installing rake 11.1.2
remote: Installing minitest 5.8.4
remote: Installing thread_safe 0.3.5
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.0.0
remote: Installing rack 1.6.4
remote: Installing mime-types-data 3.2016.0221
remote: Installing arel 6.0.3
remote: Using bundler 1.11.2
remote: Installing sass 3.4.21
remote: Installing execjs 2.6.0
remote: Installing coffee-script-source 1.10.0
remote: Installing thor 0.19.1
remote: Installing concurrent-ruby 1.0.1
remote: Installing multi_json 1.11.2
remote: Installing pg 0.18.4 with native extensions
remote: Installing rails_serve_static_assets 0.0.5
remote: Installing rails_stdout_logging 0.0.5
remote: Installing sqlite3 1.3.11 with native extensions
remote: Installing tilt 2.0.2
remote: Installing tzinfo 1.2.2
remote: Installing nokogiri 1.6.7.2 with native extensions
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote: /tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160328-319-1a7qvmc.rb extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/lib
remote: extconf failed, exit code 1
remote: Gem files will remain installed in /tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection.
remote: Results logged to /tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out
remote: Installing rack-test 0.6.3
remote: Installing mime-types 3.0
remote: Installing rdoc 4.2.2
remote: Installing autoprefixer-rails 6.3.5
remote: Installing uglifier 3.0.0
remote: Installing coffee-script 2.4.1
remote: Installing sprockets 3.5.2
remote: Installing rails_12factor 0.0.3
remote: Installing activesupport 4.2.5
remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
remote: Bundler Output: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Resolving dependencies....
remote: Installing json 1.8.3 with native extensions
remote: Installing i18n 0.7.0
remote: Installing rake 11.1.2
remote: Installing minitest 5.8.4
remote: Installing thread_safe 0.3.5
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.0.0
remote: Installing rack 1.6.4
remote: Installing mime-types-data 3.2016.0221
remote: Installing arel 6.0.3
remote: Using bundler 1.11.2
remote: Installing sass 3.4.21
remote: Installing execjs 2.6.0
remote: Installing coffee-script-source 1.10.0
remote: Installing thor 0.19.1
remote: Installing concurrent-ruby 1.0.1
remote: Installing multi_json 1.11.2
remote: Installing pg 0.18.4 with native extensions
remote: Installing rails_serve_static_assets 0.0.5
remote: Installing rails_stdout_logging 0.0.5
remote: Installing sqlite3 1.3.11 with native extensions
remote: Installing tilt 2.0.2
remote: Installing tzinfo 1.2.2
remote: Installing nokogiri 1.6.7.2 with native extensions
remote:
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:
remote: /tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160328-319-1a7qvmc.rb extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote:
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/lib
remote:
remote: extconf failed, exit code 1
remote:
remote: Gem files will remain installed in /tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection.
remote: Results logged to /tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out
remote: Installing rack-test 0.6.3
remote: Installing mime-types 3.0
remote: Installing rdoc 4.2.2
remote: Installing autoprefixer-rails 6.3.5
remote: Installing uglifier 3.0.0
remote: Installing coffee-script 2.4.1
remote: Installing sprockets 3.5.2
remote: Installing rails_12factor 0.0.3
remote: Installing activesupport 4.2.5
remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Detected sqlite3 gem which is not supported on Heroku.
remote: ! https://devcenter.heroku.com/articles/sqlite3
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to pengame.
remote:
To https://git.heroku.com/pengame.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/
When I try to install a gem I get this error:
$ gem install sqlite3 -v '1.3.11'
ERROR: While executing gem ... (Errno::EACCES)
Permission denied # rb_sysopen - C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.11-x86-mingw32/lib/sqlite3/2.1/sqlite3_native.so
Here's my Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.3', '>= 1.3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'bootstrap-sass'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
I'm not sure what I could be doing wrong.
My application works perfectly on the development server.
Anybody know why this might be happening??
Heroku doesn't support sqlite and is therefore refusing to install the native extensions. Since you're not using sqlite in production you should probably isolate the sqlite gem to environments run on your local machine (i.e. test and dev groups). Though I'd also recommend using Postgres in all environments, including tests, for consistency.
Perhaps you've seen this but there's also a very useful article on Heroku on how to setup Postgres on Heroku here: https://devcenter.heroku.com/articles/getting-started-with-rails4#heroku-gems.

git push heroku master fails even if everything seems to be fine

This is the console, everything seems to work fine until the launching module of git push
What's the problem?
# Rails Environment Configuration.
---
git:
user.name: Theofilos_Mouratidis
user.email: mtheofilos#gmail.com
version: git version 1.7.9.msysgit.0
ruby:
bin: C:/RailsInstaller/Ruby1.9.2/bin/ruby.exe
version: ruby 1.9.3p125 (2012-02-16) [i386-mingw32]
rails:
bin: C:/RailsInstaller/Ruby1.9.2/bin/rails.bat
version: Rails 3.2.13
ssh:
public_key_location: C:\Users\acer/.ssh/id_rsa.pub
public_key_contents: ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvrft8l3K12KfGo9uXrFfK
YhiQW2mHxoBIWaHXmFec7/14bx3awQLb8rG4zYZdrAWijy86vOJlk7jm07amwrOPKjkTYkIkHoclEu1y
wYS3PEPBCLe5gpPMIoej22T7X3PqLfLza3MpW6HSE3TOOT+dG74Ms0T6v8YOFQ19SiGwKTIAyF7Mczx0
xet9rKxxnRQuvyqByWq+ZOBSFao5zlqsfh8QWwGGh3thsjNo7ICDfP8tQmu57jjOTcjZC3st0tEzUoNK
zdXdz5PDLRo2fSXTKG7PhadLmLn4Cg4fhY6sOraXeYrzt9pVp0b9SYnWqTYNhi74kSx0z1i5lfna6eXk
w== Theofilos Mouratidis <mtheofilos#gmail.com>
C:\Sites>cd tama
C:\Sites\tama>heroku login
Enter your Heroku credentials.
Email: mtheofilos#gmail.com
Password (typing will be hidden):
Authentication successful.
C:\Sites\tama>git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: .idea/workspace.xml
#
no changes added to commit (use "git add" and/or "git commit -a")
C:\Sites\tama>git add .
C:\Sites\tama>git commit
Aborting commit due to empty commit message.
C:\Sites\tama>git commit -m "nothing"
[master cd12603] nothing
1 files changed, 3 insertions(+), 3 deletions(-)
C:\Sites\tama>git push heroku master
Counting objects: 172, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (152/152), done.
Writing objects: 100% (172/172), 210.47 KiB | 67 KiB/s, done.
Total 172 (delta 41), reused 0 (delta 0)
remote:
remote: -----> Ruby/Rails app detected
remote: -----> WARNING: Removing `Gemfile.lock` because it was generated on Wind
ows.
remote: Bundler will do a full resolve so native gems are handled properl
y.
remote: This may result in unexpected gem versions being used in your app
.
remote: -----> Installing dependencies using Bundler version 1.3.2
remote: Running: bundle install --without development:test --path vendor/
bundle --binstubs vendor/bundle/bin
remote: Fetching gem metadata from https://rubygems.org/........
remote: Fetching gem metadata from https://rubygems.org/..
remote: Resolving dependencies...
remote: Installing rake (10.0.4)
remote: Installing i18n (0.6.1)
remote: Installing multi_json (1.7.2)
remote: Installing activesupport (3.2.13)
remote: Installing builder (3.0.4)
remote: Installing activemodel (3.2.13)
remote: Installing erubis (2.7.0)
remote: Installing journey (1.0.4)
remote: Installing rack (1.4.5)
remote: Installing rack-cache (1.2)
remote: Installing rack-test (0.6.2)
remote: Installing hike (1.2.2)
remote: Installing tilt (1.3.7)
remote: Installing sprockets (2.2.2)
remote: Installing actionpack (3.2.13)
remote: Installing mime-types (1.23)
remote: Installing polyglot (0.3.3)
remote: Installing treetop (1.4.12)
remote: Installing mail (2.5.3)
remote: Installing actionmailer (3.2.13)
remote: Installing arel (3.0.2)
remote: Installing tzinfo (0.3.37)
remote: Installing activerecord (3.2.13)
remote: Installing activeresource (3.2.13)
remote: Installing authlogic (3.3.0)
remote: Using bundler (1.3.2)
remote: Installing coffee-script-source (1.6.2)
remote: Installing execjs (1.4.0)
remote: Installing coffee-script (2.2.0)
remote: Installing rack-ssl (1.3.3)
remote: Installing json (1.7.7)
remote: Installing rdoc (3.12.2)
remote: Installing thor (0.18.1)
remote: Installing railties (3.2.13)
remote: Installing coffee-rails (3.2.2)
remote: Installing jquery-rails (2.2.1)
remote: Installing pg (0.15.1)
remote: Installing rails (3.2.13)
remote: Installing sass (3.2.8)
remote: Installing sass-rails (3.2.6)
remote: Installing uglifier (2.0.1)
remote: Your bundle is complete! 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 r
doc/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: Cleaning up the bundler cache.
remote: -----> Writing config/database.yml to read from DATABASE_URL
remote: -----> Preparing app for Rails asset pipeline
remote: Detected manifest.yml, assuming assets were compiled locally
remote: -----> Rails plugin injection
remote: Injecting rails_log_stdout
remote: Injecting rails3_serve_static_assets
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote: Default types for Ruby/Rails -> console, rake, web, worker
remote:
remote: -----> Compiled slug size: 9.4MB
remote: -----> Launching... ! Heroku push rejected, Could not communicate wi
th vendor, please try again later
remote:
To git#heroku.com:tamagotchi-connect.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:tamagotchi-connect.git'
C:\Sites\tama>
This is the Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.13'
group :development do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'
gem 'jquery-rails'
end
gem 'authlogic'

Resources