git push heroku master fails even if everything seems to be fine - ruby-on-rails

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'

Related

Cannot deploy: Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded

I recently got this error. It was working yesterday. I do have pg gem! The gem is not in a group.
C:\Users\Chloe\workspace\>git push heroku
Counting objects: 34, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (34/34), done.
Writing objects: 100% (34/34), 9.32 KiB | 1.17 MiB/s, done.
Total 34 (delta 28), 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.3.1
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.15.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
remote: 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`.
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: Using rake 12.3.0
remote: Using concurrent-ruby 1.0.5
remote: Using minitest 5.11.1
remote: Using thread_safe 0.3.6
remote: Using builder 3.2.3
remote: Using erubis 2.7.0
remote: Using mini_portile2 2.3.0
remote: Using crass 1.0.3
remote: Using rack 2.0.3
remote: Using nio4r 2.2.0
remote: Using websocket-extensions 0.1.3
remote: Using mini_mime 1.0.0
remote: Using arel 7.1.4
remote: Using public_suffix 3.0.1
remote: Using aws_cf_signer 0.1.3
remote: Using bcrypt 3.1.11
remote: Using bundler 1.15.2
remote: Using rubyzip 1.2.1
remote: Using climate_control 0.2.0
remote: Using unf_ext 0.0.7.4
remote: Using mime-types-data 3.2016.0521
remote: Using netrc 0.11.0
remote: Using coffee-script-source 1.12.2
remote: Using execjs 2.7.0
remote: Using method_source 0.9.0
remote: Using thor 0.20.0
remote: Using orm_adapter 0.5.0
remote: Using multipart-post 2.0.0
remote: Using ffi 1.9.18
remote: Using temple 0.8.0
remote: Using tilt 2.0.8
remote: Using sexp_processor 4.10.0
remote: Using multi_json 1.13.0
remote: Using mimemagic 0.3.2
remote: Fetching pg 1.0.0
remote: Using puma 3.11.0
remote: Using rb-fsevent 0.10.2
remote: Using turbolinks-source 5.1.0
remote: Using i18n 0.9.1
remote: Using tzinfo 1.2.4
remote: Using nokogiri 1.8.1
remote: Using websocket-driver 0.6.5
remote: Using mail 2.7.0
remote: Using addressable 2.5.2
remote: Using city-state 0.0.13
remote: Using rack-test 0.6.3
remote: Using warden 1.2.7
remote: Using sprockets 3.7.1
remote: Using rack-proxy 0.6.3
remote: Using unf 0.1.4
remote: Using cocaine 0.5.8
remote: Using coffee-script 2.4.1
remote: Using uglifier 4.1.3
remote: Using mime-types 3.1
remote: Using faraday 0.13.1
remote: Using rb-inotify 0.9.10
remote: Using ruby_parser 3.10.1
remote: Using haml 5.0.4
remote: Using turbolinks 5.1.0
remote: Using activesupport 5.0.6
remote: Using loofah 2.1.1
remote: Using domain_name 0.5.20170404
remote: Using stripe 3.9.1
remote: Using sass-listen 4.0.0
remote: Using rails-dom-testing 2.0.3
remote: Using globalid 0.4.1
remote: Using activemodel 5.0.6
remote: Using jbuilder 2.7.0
remote: Using rails-html-sanitizer 1.0.3
remote: Using html2haml 2.2.0
remote: Using http-cookie 1.0.3
remote: Using sass 3.5.5
remote: Using activejob 5.0.6
remote: Using activerecord 5.0.6
remote: Using paperclip 5.1.0
remote: Using actionview 5.0.6
remote: Using rest-client 2.0.2
remote: Using actionpack 5.0.6
remote: Using cloudinary 1.8.2
remote: Using actioncable 5.0.6
remote: Using actionmailer 5.0.6
remote: Using railties 5.0.6
remote: Using sprockets-rails 3.2.1
remote: Using paperclip-cloudinary 1.3.1
remote: Using coffee-rails 4.2.2
remote: Using responders 2.4.0
remote: Using haml-rails 1.0.0
remote: Using jquery-rails 4.3.1
remote: Using rails 5.0.6
remote: Using sass-rails 5.0.7
remote: Using devise 4.4.0
remote: Using nested_form_fields 0.8.2
remote: Using rails-reverse-proxy 0.9.1
remote: Using devise-i18n 1.5.0
remote: Installing pg 1.0.0 with native extensions
remote: Bundle complete! 27 Gemfile dependencies, 94 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 (9.80s)
remote: Cleaning up the bundler cache.
remote: Removing pg (0.21.0)
remote: The latest bundler is 1.16.1, but you are currently running 1.15.2.
remote: To update, run `gem install bundler`
remote: -----> Installing node-v6.11.1-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: Gem::LoadError: 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).
remote: /tmp/build_a9d764dc04e2c3ac37be31055ec0e201/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.6/lib/active_record/connection_adapters/connection_specification.rb:176:in `rescue in spec'
... stacktrace ...
remote: Tasks: TOP => environment
remote: (See full trace by running task with --trace)
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 project-staging.
remote:
To https://git.heroku.com/project-staging.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/project-staging.git'
I fixed the problem with this
https://stackoverflow.com/a/44034083/148844
gem 'pg', '~> 0.21'
I had the same issue.
There's a new version of the pg gem out today (1/10/18) - v 1.0.0. In your gem file:
gem 'pg', '0.21.0'
as suggested by Chloe.
if you are pushing in production try to add pg into the production group like this, and also make sure that sqlite is either in development and test or not present in your gemfile.
group :production do
gem 'pg'
gem 'rails_12factor'
end
Edit:
Also make sure your pg version is less then your activerecord version plus if you are on a mac give your pg a version number in the gemfile.

NameError: uninitialized constant Sprockets::Rails::VERSION on pushing to heroku

I have an app which runs on local machine.
Rails 4.2.0
Ruby 2.2.3
I am getting the following error on pushing to heroku. The app runs on local machine.
rake aborts with the error NameError: uninitialized constant Sprockets::Rails::VERSION
Counting objects: 1965, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (608/608), done.
Writing objects: 100% (1965/1965), 229.38 KiB | 0 bytes/s, done.
Total 1965 (delta 1275), reused 1958 (delta 1272)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.3
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 git://github.com/derekprior/momentjs-rails.git
remote: Fetching git://github.com/zpaulovics/datetimepicker-rails.git
remote: Cloning into 'bootstrap-datetimepicker'...
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 rake 11.1.2
remote: Installing i18n 0.7.0
remote: Installing minitest 5.8.4
remote: Installing thread_safe 0.3.5
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.0.0
remote: Installing rack 1.6.4
remote: Installing mime-types 2.99.1
remote: Installing arel 6.0.3
remote: Installing execjs 2.6.0
remote: Installing bcrypt 3.1.11 with native extensions
remote: Installing bootstrap_form 2.3.0
remote: Installing sass 3.4.22
remote: Using bundler 1.11.2
remote: Installing thor 0.19.1
remote: Installing hike 1.2.3
remote: Installing multi_json 1.11.3
remote: Installing tilt 1.4.1
remote: Installing coffee-script-source 1.10.0
remote: Installing daemons 1.2.3
remote: Installing orm_adapter 0.5.0
remote: Installing eventmachine 1.0.9.1 with native extensions
remote: Installing unf_ext 0.0.7.2 with native extensions
remote: Installing fabrication 2.15.0
remote: Installing google_visualr 2.5.1
remote: Installing sexp_processor 4.7.0
remote: Installing hashie 3.4.3
remote: Installing json_pure 1.8.3
remote: Installing libv8 3.16.14.13
remote: Installing nested_form 0.3.2
remote: Installing netrc 0.11.0
remote: Installing pg 0.18.4 with native extensions
remote: Installing phony 2.15.21
remote: Installing rails_serve_static_assets 0.0.5
remote: Installing rails_stdout_logging 0.0.5
remote: Installing remotipart 1.2.1
remote: Installing safe_yaml 1.0.4
remote: Installing ref 2.0.0
remote: Installing faker 1.6.3
remote: Installing validates_email_format_of 1.6.3
remote: Installing tzinfo 1.2.2
remote: Installing nokogiri 1.6.7.2 with native extensions
remote: Installing rack-test 0.6.3
remote: Installing rack-protection 1.5.3
remote: Installing warden 1.2.6
remote: Installing mail 2.6.4
remote: Installing rdoc 4.2.2
remote: Installing autoprefixer-rails 6.3.6
remote: Installing uglifier 3.0.0
remote: Installing figaro 1.1.1
remote: Installing sprockets 2.12.4
remote: Installing haml 4.0.7
remote: Installing coffee-script 2.4.1
remote: Installing ruby_parser 3.8.1
remote: Installing unf 0.1.4
remote: Installing tropo-webapi-ruby 0.1.13
remote: Installing therubyracer 0.12.2 with native extensions
remote: Installing rails_12factor 0.0.3
remote: Installing activesupport 4.2.0
remote: Installing sinatra 1.4.7
remote: Installing sdoc 0.4.1
remote: Installing bootstrap-sass 3.3.6
remote: Installing domain_name 0.5.20160310
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing globalid 0.3.6
remote: Installing activemodel 4.2.0
remote: Installing clockwork 2.0.0
remote: Installing delayed_job 4.1.1
remote: Installing jbuilder 1.5.3
remote: Installing phony_rails 0.14.0
remote: Installing http-cookie 1.0.2
remote: Installing rails-dom-testing 1.0.7
remote: Installing loofah 2.0.3
remote: Installing html2haml 2.0.0
remote: Installing rack-pjax 0.8.0
remote: Installing activejob 4.2.0
remote: Installing activerecord 4.2.0
remote: Installing rest-client 1.8.0
remote: Installing rails-html-sanitizer 1.0.3
remote: Installing delayed_job_active_record 4.1.0
remote: Installing delayed_job_web 1.2.10
remote: Installing has_secure_token 1.0.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.0.1
remote: Installing kaminari 0.16.3
remote: Installing simple_form 3.1.1
remote: Installing jquery-rails 4.1.1
remote: Using momentjs-rails 2.11.1 from git://github.com/derekprior/momentjs-rails.git (at master#41e30d4)
remote: Installing coffee-rails 4.0.1
remote: Installing responders 2.1.2
remote: Installing font-awesome-rails 4.6.1.0
remote: Installing jquery-ui-rails 5.0.5
remote: Installing haml-rails 0.9.0
remote: Installing rails 4.2.0
remote: Installing turbolinks 2.5.3
remote: Using datetimepicker-rails 4.7.16 from git://github.com/zpaulovics/datetimepicker-rails.git (at master#36d21ce)
remote: Installing sass-rails 4.0.1
remote: Installing devise 4.0.1
remote: Installing browser-timezone-rails 0.0.8
remote: Installing fullcalendar-rails 2.6.1.0
remote: Installing dateslices 0.0.4
remote: Installing jquery-turbolinks 2.1.0
remote: Installing jquery-datatables-rails 3.3.0
remote: Installing rails_admin 0.8.1
remote: Bundle complete! 52 Gemfile dependencies, 109 gems now installed
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into ./vendor/bundle.
remote: Post-install message from rdoc:
remote: Depending on your version of ruby, you may need to install ruby rdoc/ri data:
remote: <= 1.8.6 : unsupported
remote: = 1.8.7 : gem install rdoc-data; rdoc-data --install
remote: = 1.9.1 : gem install rdoc-data; rdoc-data --install
remote: >= 1.9.2 : nothing to do! Yay!
remote: Post-install message from haml:
remote: HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
remote: your application:
remote: * Support for Ruby 1.8.6 dropped
remote: * Support for Rails 2 dropped
remote: * Sass filter now always outputs <style> tags
remote: * Data attributes are now hyphenated, not underscored
remote: * html2haml utility moved to the html2haml gem
remote: * Textile and Maruku filters moved to the haml-contrib gem
remote: For more info see:
remote: http://rubydoc.info/github/haml/haml/file/CHANGELOG.md
remote: Post-install message from phony_rails:
remote: It now adds a '+' to the normalized number when it starts with a country number!
remote: Bundle completed (61.53s)
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 Sprockets::Rails::VERSION
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/bootstrap-sass-3.3.6/lib/bootstrap-sass/engine.rb:11:in `block in <class:Engine>'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/railtie.rb:194:in `public_send'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/railtie.rb:194:in `method_missing'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/config/environment.rb:5:in `<top (required)>'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:328:in `require_environment!'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:443:in `block in run_tasks_blocks'
remote: /tmp/build_ff86312346869b165736d37b1725f32c/vendor/bundle/ruby/2.2.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:54: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 fathom-reef-94288.
remote:
To https://git.heroku.com/fathomless-reef-94288.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/fathom-reef-94288.git'
I get the following error on performing rake assets:precompile on my local machine. This is the same error I get on heroku push.
rake assets:precompile
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
rake aborted!
NameError: uninitialized constant Sprockets::Rails::VERSION
/Users/azs/ror/maintr/config/environment.rb:5:in `<top (required)>'
Tasks: TOP => environment
(See full trace by running task with --trace)
It looks like you have an old version of sprockets-rails gem being installed. With Rails 4.2 you should be getting version 3 or later. But, in your case the bundler is installing version 2.0.1. Some version of the gem had this exact problem.
I guess the easiest way would be to generate a Gemfile.lock file on linux machine and force Heroku to use new version of the sprockets-rails gem.

Can't Push Rails Project to Heroku

So I've run into a little snag with a rails app that i'm trying to
deploy on to Heroku. When I attempt to push my app onto Heroku, I'm told
that rake tasks cannot be detected. In addition, I'm told that the
application file in the config folder cannot be loaded. I ran this little
command (bundle exec rake -P RAILS_ENV=production) to see if everything
in production mode checks out and I don't get any errors.
I really appreciate anyones help as this is my first time deploying an
app on Heroku. Thanks!
Total 7266 (delta 1071), reused 0 (delta 0)
remote: Compressing source files... done.
List item
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.
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: Installing i18n 0.7.0
remote: Installing json 1.8.3 with native extensions
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.
remote: Installing rack 1.6.4
remote: Installing mime-types-data 3.2016.0221
remote: Installing arel 6.0.3
remote: Installing execjs 2.6.0
remote: Installing bcrypt 3.1.11 with native extensions
remote: Installing sass 3.4.22
remote: Installing coffee-script-source 1.10.0
remote: Installing thor 0.19.1
remote: Installing concurrent-ruby 1.0.1
remote: Installing orm_adapter 0.5.0
remote: Installing multi_json 1.11.2
remote: Installing pg 0.18.4 with native extensions
remote: Using bundler 1.11.2
remote: Installing rails_serve_static_assets 0.0.5
remote: Installing rails_stdout_logging 0.0.5
remote: Installing tilt 2.0.2
remote: Installing tzinfo 1.2.2
remote: Installing nokogiri 1.6.7.2 with native extensions
remote: Installing rack-test 0.6.3
remote: Installing warden 1.2.6
remote: Installing mime-types 3.0
remote: Installing autoprefixer-rails 6.3.5
remote: Installing uglifier 3.0.0
remote: Installing coffee-script 2.4.
remote: Installing sprockets 3.5.2
remote: Installing rails_12factor 0.0.3
remote: Installing mail 2.6.4
remote: Installing bootstrap-sass 3.3.6
remote: Installing loofah 2.0.3
remote: Installing rails-html-sanitizer 1.0.3
remote: Installing activesupport 4.2.
remote: Installing rdoc 4.2.2
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing globalid 0.3.6
remote: Installing activemodel 4.2.5
remote: Installing jbuilder 2.4.1
remote: Installing activejob 4.2.5
remote: Installing rails-dom-testing 1.0.7
remote: Installing activerecord 4.2.5
remote: Installing actionview 4.2.5
remote: Installing actionpack 4.2.5
remote: Installing sdoc 0.4.1
remote: Installing actionmailer 4.2.5
remote: Installing railties 4.2.5
remote: Installing sprockets-rails 3.0.4
remote: Installing coffee-rails 4.1.1
remote: Installing responders 2.1.2
remote: Installing jquery-rails 4.1.1
remote: Installing rails 4.2.5
remote: Installing sass-rails 5.0.4
remote: Installing turbolinks 2.5.3
remote: Installing devise 3.5.6
remote: Bundle complete! 15 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: 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 (22.56s)
remote: Cleaning up the bundler cache
remote: sh: 2: Syntax error: Unterminated quoted string
remote: sh: 2: Syntax error: Unterminated quoted string
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: ! LoadError: cannot load such file -- /tmp/build_81c00152de97c61281a1204214d29edb/website/config/application
remote: ! /tmp/build_81c00152de97c61281a1204214d29edb/website/Rakefile:4:in `require
remote: ! /tmp/build_81c00152de97c61281a1204214d29edb/website/Rakefile:4:in `<top (required)>'
remote: ! /tmp/build_81c00152de97c61281a1204214d29edb/website/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rake_module.rb:28:in `load'

We're sorry, but something went wrong. heroku

I don't see any error message.
but when I run heroku open , the browser shows "We're sorry, but something went wrong."
The app runs fine offline.
the code
https://github.com/codelearner777/blog
could somebody help me?
budi#Lenovo:~/blog$ heroku create
Creating rocky-badlands-5818... done, stack is cedar-14
https://rocky-badlands-5818.herokuapp.com/ | https://git.heroku.com/rocky-badlands-5818.git
Git remote heroku added
budi#Lenovo:~/blog$ git push heroku master
Counting objects: 139, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (98/98), done.
Writing objects: 100% (139/139), 26.23 KiB | 0 bytes/s, done.
Total 139 (delta 31), reused 139 (delta 31)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.3
remote: -----> Installing dependencies using bundler 1.9.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Using rake 10.4.2
remote: Installing minitest 5.8.2
remote: Installing i18n 0.7.0
remote: Installing thread_safe 0.3.5
remote: Installing builder 3.2.2
remote: Installing mini_portile 0.6.2
remote: Installing erubis 2.7.0
remote: Installing rack 1.6.4
remote: Installing mime-types 2.6.2
remote: Installing json 1.8.3
remote: Installing arel 6.0.3
remote: Installing coffee-script-source 1.9.1.1
remote: Installing execjs 2.6.0
remote: Installing thor 0.19.1
remote: Installing multi_json 1.11.2
remote: Using bundler 1.9.7
remote: Installing rails_serve_static_assets 0.0.4
remote: Installing bcrypt 3.1.10
remote: Using rdoc 4.2.0
remote: Installing sass 3.4.19
remote: Installing rails_stdout_logging 0.0.4
remote: Installing tzinfo 1.2.2
remote: Installing tilt 2.0.1
remote: Installing rack-test 0.6.3
remote: Installing sprockets 3.4.0
remote: Installing mail 2.6.3
remote: Installing coffee-script 2.4.1
remote: Installing uglifier 2.7.2
remote: Installing sdoc 0.4.1
remote: Installing rails_12factor 0.0.3
remote: Installing activesupport 4.2.4
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing globalid 0.3.6
remote: Installing activemodel 4.2.4
remote: Installing jbuilder 2.3.2
remote: Installing activejob 4.2.4
remote: Installing activerecord 4.2.4
remote: Installing pg 0.18.3
remote: Installing nokogiri 1.6.6.2
remote: Installing loofah 2.0.3
remote: Installing rails-dom-testing 1.0.7
remote: Installing rails-html-sanitizer 1.0.2
remote: Installing actionview 4.2.4
remote: Installing actionpack 4.2.4
remote: Installing actionmailer 4.2.4
remote: Installing sprockets-rails 2.3.3
remote: Installing railties 4.2.4
remote: Installing coffee-rails 4.1.0
remote: Installing jquery-rails 4.0.5
remote: Installing rails 4.2.4
remote: Installing sass-rails 5.0.4
remote: Installing turbolinks 2.5.3
remote: Bundle complete! 15 Gemfile dependencies, 52 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 (25.95s)
remote: Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: I, [2015-11-06T07:11:59.545861 #1061] INFO -- : Writing /tmp/build_3696c7b0356812fdd8d08d263aa37657/public/assets/application-51bf096d402cefc1025d96872785d4cf537dbf0073f5dba9572ac26b890c09ae.js
remote: I, [2015-11-06T07:11:59.560330 #1061] INFO -- : Writing /tmp/build_3696c7b0356812fdd8d08d263aa37657/public/assets/application-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css
remote: Asset precompilation completed (3.72s)
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, 30.0MB
remote: -----> Launching... done, v5
remote: https://rocky-badlands-5818.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/rocky-badlands-5818.git
* [new branch] master -> master
budi#Lenovo:~/blog$ heroku open
Opening rocky-badlands-5818... done
(process:16901): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
It seems, that your application uses database. After creating herokuapp database is not ready yet - you have to "tell it" to use your migration files.
To do this, in terminal run heroku run rake db:migrate

Git push heroku master not deploying app

I was developing an app on Ruby on Rails. I was successfully able to add, commit and push it to heroku using
$ git push heroku master
Later I switched back to previous commit using
git reset --head Head^1
I did all the changes and pushed it back to heroku. When I opened my app, no changes were made and it was still on a previous version. Changes are being shown in my localhost but not on the server.
I restarted my app using
$ heroku restart -app app-name
And here is the output when I restarted:
Restarting dynos... done
This is the output when I pushed my app to heroku after restarting
Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 435 bytes | 0 bytes/s, done.
Total 5 (delta 4), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.0
remote: -----> Installing dependencies using 1.9.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Using i18n 0.7.0
remote: Using json 1.8.2
remote: Using rake 10.4.2
remote: Using minitest 5.5.1
remote: Using thread_safe 0.3.4
remote: Using builder 3.2.2
remote: Using erubis 2.7.0
remote: Using mini_portile 0.6.2
remote: Using rack 1.6.0
remote: Using mime-types 2.4.3
remote: Using arel 6.0.0
remote: Using execjs 2.3.0
remote: Using bcrypt 3.1.10
remote: Using sass 3.4.13
remote: Using net-ssh 2.9.2
remote: Using coffee-script-source 1.9.1
remote: Using thor 0.19.1
remote: Using orm_adapter 0.5.0
remote: Using ffi 1.9.8
remote: Using tilt 1.4.1
remote: Using hike 1.2.3
remote: Using multi_json 1.10.1
remote: Using kgio 2.9.3
remote: Using libv8 3.16.14.7
remote: Using mimemagic 0.3.0
remote: Using subexec 0.2.3
remote: Using pg 0.18.1
remote: Using bundler 1.9.7
remote: Using rails_serve_static_assets 0.0.4
remote: Using rails_stdout_logging 0.0.3
remote: Using raindrops 0.13.0
remote: Using ref 1.0.5
remote: Using dropbox-sdk 1.6.4
remote: Using tzinfo 1.2.2
remote: Using nokogiri 1.6.6.2
remote: Using rack-test 0.6.3
remote: Using warden 1.2.3
remote: Using mail 2.6.3
remote: Using autoprefixer-rails 5.1.7
remote: Using uglifier 2.7.0
remote: Using net-sftp 2.1.2
remote: Using coffee-script 2.3.0
remote: Using figaro 1.1.0
remote: Using sys-uname 0.9.0
remote: Using haml 4.0.6
remote: Using sprockets 2.12.3
remote: Using rails_12factor 0.0.3
remote: Using unicorn 4.8.3
remote: Using therubyracer 0.12.1
remote: Using activesupport 4.2.0
remote: Using bootstrap-sass 3.3.3
remote: Using mini_magick 3.8.0
remote: Using loofah 2.0.1
remote: Using imagemagick-binaries 6.8.7.5.1
remote: Using rails-html-sanitizer 1.0.1
remote: Using rails-deprecated_sanitizer 1.0.3
remote: Using globalid 0.3.3
remote: Using activemodel 4.2.0
remote: Using climate_control 0.0.3
remote: Using jbuilder 2.2.8
remote: Using pundit 0.3.0
remote: Using rails-dom-testing 1.0.5
remote: Using activejob 4.2.0
remote: Using activerecord 4.2.0
remote: Using carrierwave 0.10.0
remote: Using cocaine 0.5.7
remote: Using actionview 4.2.0
remote: Using polyamorous 1.1.0
remote: Using carrierwave-dropbox 1.2.1
remote: Using carrierwave-ftp 0.2.8
remote: Using paperclip 4.3.0
remote: Using actionpack 4.2.0
remote: Using paperclip-dropbox 1.3.2
remote: Using actionmailer 4.2.0
remote: Using railties 4.2.0
remote: Using sprockets-rails 2.2.4
remote: Using kaminari 0.16.3
remote: Using ransack 1.6.3
remote: Using simple_form 3.1.0
remote: Using mail_form 1.5.1
remote: Using coffee-rails 4.1.0
remote: Using responders 2.1.0
remote: Using font-awesome-rails 4.3.0.0
remote: Using jquery-rails 4.0.3
remote: Using sass-rails 5.0.1
remote: Using lightbox2-rails 2.7.1
remote: Using rails 4.2.0
remote: Using turbolinks 2.5.3
remote: Using devise 3.4.1
remote: Using jquery-datatables-rails 3.2.0
remote: Using devise_invitable 1.4.1
remote: Using upmin-admin 0.1.01
remote: Bundle complete! 34 Gemfile dependencies, 92 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 (1.07s)
remote: Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: Asset precompilation completed (5.58s)
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, 155.5MB
remote: -----> Launching... done, v123
remote: https://app-name.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy.... done.
To https://git.heroku.com/app-name.git
6cb4846..275460b master -> master
Restart your heroku app and check again. Here is the command
heroku restart -a app_name
Later I switched back to previous commit using
git reset --head Head^1
Since you've rewrote history, a normal push won't be accepted as it is not a fast forward.
There are two possible solutions:
Force push your current branch:
$ git push -f heroku master
If all what you want is to have the previous live version back, run a rollback:
$ heroku rollback

Resources