Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在heroko无法成功branch #87

Open
liuzj288 opened this issue Mar 8, 2019 · 5 comments
Open

在heroko无法成功branch #87

liuzj288 opened this issue Mar 8, 2019 · 5 comments

Comments

@liuzj288
Copy link

liuzj288 commented Mar 8, 2019

       An error occurred while installing json (1.8.3), and Bundler cannot continue.
       Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
       
       In Gemfile:
         rails_admin was resolved to 0.8.1, which depends on
           rails was resolved to 4.2.5.2, which depends on
             actionmailer was resolved to 4.2.5.2, which depends on
               actionpack was resolved to 4.2.5.2, which depends on
                 actionview was resolved to 4.2.5.2, which depends on
                   rails-dom-testing was resolved to 1.0.7, which depends on
                     rails-deprecated_sanitizer was resolved to 1.0.3, which depends on
                       activesupport was resolved to 4.2.5.2, which depends on
                         json
 !
 !     Failed to install gems via Bundler.
 !
 !     Push rejected, failed to compile Ruby app.
 !     Push failed

@PENGZhaoqing
Copy link
Owner

估计是版本太低了, 有些依赖库要求的版本达不到

@liuzj288
Copy link
Author

liuzj288 commented Mar 8, 2019

估计是版本太低了, 有些依赖库要求的版本达不到

下面是详细的数据,可以给个思路怎么修复吗?

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.5.3
-----> Installing dependencies using bundler 1.15.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Fetching rake 11.2.2
Fetching i18n 0.7.0
Fetching json 1.8.3
Installing i18n 0.7.0
Installing json 1.8.3 with native extensions
Installing rake 11.2.2
Fetching minitest 5.9.0
Fetching thread_safe 0.3.5
Installing minitest 5.9.0
Installing thread_safe 0.3.5
Fetching builder 3.2.2
Fetching erubis 2.7.0
Installing builder 3.2.2
Installing erubis 2.7.0
Fetching mini_portile2 2.1.0
Installing mini_portile2 2.1.0
Fetching pkg-config 1.1.7
Installing pkg-config 1.1.7
Fetching rack 1.6.4
Installing rack 1.6.4
Fetching mime-types-data 3.2016.0521
Installing mime-types-data 3.2016.0521
Fetching arel 6.0.3
Installing arel 6.0.3
Fetching execjs 2.7.0
Installing execjs 2.7.0
Fetching htmlentities 4.3.4
Installing htmlentities 4.3.4
Fetching rubyzip 1.1.7
Installing rubyzip 1.1.7
Fetching bcrypt 3.1.11
Installing bcrypt 3.1.11 with native extensions
Fetching sass 3.4.22
Installing sass 3.4.22
Fetching will_paginate 3.1.6
Installing will_paginate 3.1.6
Using bundler 1.15.2
Fetching climate_control 0.2.0
Installing climate_control 0.2.0
Fetching coderay 1.1.2
Installing coderay 1.1.2
Fetching coffee-script-source 1.10.0
Installing coffee-script-source 1.10.0
Fetching thor 0.19.1
Installing thor 0.19.1
Fetching concurrent-ruby 1.0.2
Installing concurrent-ruby 1.0.2
Fetching tilt 2.0.5
Installing tilt 2.0.5
Fetching multi_json 1.12.1
Installing multi_json 1.12.1
Fetching method_source 0.9.0
Installing method_source 0.9.0
Fetching mimemagic 0.3.2
Fetching nested_form 0.3.2
Installing mimemagic 0.3.2
Installing nested_form 0.3.2
Fetching request_store 1.3.2
Installing request_store 1.3.2
Fetching pg 0.18.4
Installing pg 0.18.4 with native extensions
Fetching rails_serve_static_assets 0.0.5
Installing rails_serve_static_assets 0.0.5
Fetching rails_stdout_logging 0.0.5
Installing rails_stdout_logging 0.0.5
Fetching remotipart 1.2.1
Installing remotipart 1.2.1
Fetching safe_yaml 1.0.4
Installing safe_yaml 1.0.4
Fetching ruby-ole 1.2.12.1
Fetching turbolinks-source 5.0.0
Installing ruby-ole 1.2.12.1
Installing turbolinks-source 5.0.0
Fetching faker 1.6.3
Fetching tzinfo 1.2.2
Installing tzinfo 1.2.2
Installing faker 1.6.3
Fetching nokogiri 1.6.8
Fetching rack-test 0.6.3
Installing rack-test 0.6.3
Fetching mime-types 3.1
Installing mime-types 3.1
Installing nokogiri 1.6.8 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

   current directory:
   /tmp/build_b6fddf20ce13b4936c64cf127118bbfd/vendor/bundle/ruby/2.5.0/gems/json-1.8.3/ext/json/ext/generator
   /tmp/build_b6fddf20ce13b4936c64cf127118bbfd/vendor/ruby-2.5.3/bin/ruby -r
   ./siteconf20190308-225-1r6upvz.rb extconf.rb
   creating Makefile
   
   current directory:
   /tmp/build_b6fddf20ce13b4936c64cf127118bbfd/vendor/bundle/ruby/2.5.0/gems/json-1.8.3/ext/json/ext/generator
   make "DESTDIR=" clean
   
   current directory:
   /tmp/build_b6fddf20ce13b4936c64cf127118bbfd/vendor/bundle/ruby/2.5.0/gems/json-1.8.3/ext/json/ext/generator
   make "DESTDIR="
   compiling generator.c
   generator.c: In function ‘generate_json’:
   generator.c:861:25: error: ‘rb_cFixnum’ undeclared (first use in this function);
   did you mean ‘mFixnum’?
        } else if (klass == rb_cFixnum) {
                            ^~~~~~~~~~
                            mFixnum
   generator.c:861:25: note: each undeclared identifier is reported only once for
   each function it appears in
   generator.c:863:25: error: ‘rb_cBignum’ undeclared (first use in this function);
   did you mean ‘rb_cFixnum’?
        } else if (klass == rb_cBignum) {
                            ^~~~~~~~~~
                            rb_cFixnum
   generator.c: At top level:
   cc1: warning: unrecognized command line option ‘-Wno-self-assign’
   cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
   cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
   Makefile:241: recipe for target 'generator.o' failed
   make: *** [generator.o] Error 1
   
   make failed, exit code 2
   
   Gem files will remain installed in
   /tmp/build_b6fddf20ce13b4936c64cf127118bbfd/vendor/bundle/ruby/2.5.0/gems/json-1.8.3
   for inspection.
   Results logged to
   /tmp/build_b6fddf20ce13b4936c64cf127118bbfd/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/json-1.8.3/gem_make.out
   
   An error occurred while installing json (1.8.3), and Bundler cannot continue.
   Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
   
   In Gemfile:
     rails_admin was resolved to 0.8.1, which depends on
       rails was resolved to 4.2.5.2, which depends on
         actionmailer was resolved to 4.2.5.2, which depends on
           actionpack was resolved to 4.2.5.2, which depends on
             actionview was resolved to 4.2.5.2, which depends on
               rails-dom-testing was resolved to 1.0.7, which depends on
                 rails-deprecated_sanitizer was resolved to 1.0.3, which depends on
                   activesupport was resolved to 4.2.5.2, which depends on
                     json
   Bundler Output: Fetching gem metadata from https://rubygems.org/..........
   Fetching version metadata from https://rubygems.org/..
   Fetching dependency metadata from https://rubygems.org/.
   Fetching rake 11.2.2
   Fetching i18n 0.7.0
   Fetching json 1.8.3
   Installing i18n 0.7.0
   Installing json 1.8.3 with native extensions
   Installing rake 11.2.2
   Fetching minitest 5.9.0
   Fetching thread_safe 0.3.5
   Installing minitest 5.9.0
   Installing thread_safe 0.3.5
   Fetching builder 3.2.2
   Fetching erubis 2.7.0
   Installing builder 3.2.2
   Installing erubis 2.7.0
   Fetching mini_portile2 2.1.0
   Installing mini_portile2 2.1.0
   Fetching pkg-config 1.1.7
   Installing pkg-config 1.1.7
   Fetching rack 1.6.4
   Installing rack 1.6.4
   Fetching mime-types-data 3.2016.0521
   Installing mime-types-data 3.2016.0521
   Fetching arel 6.0.3
   Installing arel 6.0.3
   Fetching execjs 2.7.0
   Installing execjs 2.7.0
   Fetching htmlentities 4.3.4
   Installing htmlentities 4.3.4
   Fetching rubyzip 1.1.7
   Installing rubyzip 1.1.7
   Fetching bcrypt 3.1.11
   Installing bcrypt 3.1.11 with native extensions
   Fetching sass 3.4.22
   Installing sass 3.4.22
   Fetching will_paginate 3.1.6
   Installing will_paginate 3.1.6
   Using bundler 1.15.2
   Fetching climate_control 0.2.0
   Installing climate_control 0.2.0
   Fetching coderay 1.1.2
   Installing coderay 1.1.2
   Fetching coffee-script-source 1.10.0
   Installing coffee-script-source 1.10.0
   Fetching thor 0.19.1
   Installing thor 0.19.1
   Fetching concurrent-ruby 1.0.2
   Installing concurrent-ruby 1.0.2
   Fetching tilt 2.0.5
   Installing tilt 2.0.5
   Fetching multi_json 1.12.1
   Installing multi_json 1.12.1
   Fetching method_source 0.9.0
   Installing method_source 0.9.0
   Fetching mimemagic 0.3.2
   Fetching nested_form 0.3.2
   Installing mimemagic 0.3.2
   Installing nested_form 0.3.2
   Fetching request_store 1.3.2
   Installing request_store 1.3.2
   Fetching pg 0.18.4
   Installing pg 0.18.4 with native extensions
   Fetching rails_serve_static_assets 0.0.5
   Installing rails_serve_static_assets 0.0.5
   Fetching rails_stdout_logging 0.0.5
   Installing rails_stdout_logging 0.0.5
   Fetching remotipart 1.2.1
   Installing remotipart 1.2.1
   Fetching safe_yaml 1.0.4
   Installing safe_yaml 1.0.4
   Fetching ruby-ole 1.2.12.1
   Fetching turbolinks-source 5.0.0
   Installing ruby-ole 1.2.12.1
   Installing turbolinks-source 5.0.0
   Fetching faker 1.6.3
   Fetching tzinfo 1.2.2
   Installing tzinfo 1.2.2
   Installing faker 1.6.3
   Fetching nokogiri 1.6.8
   Fetching rack-test 0.6.3
   Installing rack-test 0.6.3
   Fetching mime-types 3.1
   Installing mime-types 3.1
   Installing nokogiri 1.6.8 with native extensions
   Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
   
   current directory:
   /tmp/build_b6fddf20ce13b4936c64cf127118bbfd/vendor/bundle/ruby/2.5.0/gems/json-1.8.3/ext/json/ext/generator
   /tmp/build_b6fddf20ce13b4936c64cf127118bbfd/vendor/ruby-2.5.3/bin/ruby -r
   ./siteconf20190308-225-1r6upvz.rb extconf.rb
   creating Makefile
   
   current directory:
   /tmp/build_b6fddf20ce13b4936c64cf127118bbfd/vendor/bundle/ruby/2.5.0/gems/json-1.8.3/ext/json/ext/generator
   make "DESTDIR=" clean
   
   current directory:
   /tmp/build_b6fddf20ce13b4936c64cf127118bbfd/vendor/bundle/ruby/2.5.0/gems/json-1.8.3/ext/json/ext/generator
   make "DESTDIR="
   compiling generator.c
   generator.c: In function ‘generate_json’:
   generator.c:861:25: error: ‘rb_cFixnum’ undeclared (first use in this function);
   did you mean ‘mFixnum’?
        } else if (klass == rb_cFixnum) {
                            ^~~~~~~~~~
                            mFixnum
   generator.c:861:25: note: each undeclared identifier is reported only once for
   each function it appears in
   generator.c:863:25: error: ‘rb_cBignum’ undeclared (first use in this function);
   did you mean ‘rb_cFixnum’?
        } else if (klass == rb_cBignum) {
                            ^~~~~~~~~~
                            rb_cFixnum
   generator.c: At top level:
   cc1: warning: unrecognized command line option ‘-Wno-self-assign’
   cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
   cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
   Makefile:241: recipe for target 'generator.o' failed
   make: *** [generator.o] Error 1
   
   make failed, exit code 2
   
   Gem files will remain installed in
   /tmp/build_b6fddf20ce13b4936c64cf127118bbfd/vendor/bundle/ruby/2.5.0/gems/json-1.8.3
   for inspection.
   Results logged to
   /tmp/build_b6fddf20ce13b4936c64cf127118bbfd/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/json-1.8.3/gem_make.out
   
   An error occurred while installing json (1.8.3), and Bundler cannot continue.
   Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
   
   In Gemfile:
     rails_admin was resolved to 0.8.1, which depends on
       rails was resolved to 4.2.5.2, which depends on
         actionmailer was resolved to 4.2.5.2, which depends on
           actionpack was resolved to 4.2.5.2, which depends on
             actionview was resolved to 4.2.5.2, which depends on
               rails-dom-testing was resolved to 1.0.7, which depends on
                 rails-deprecated_sanitizer was resolved to 1.0.3, which depends on
                   activesupport was resolved to 4.2.5.2, which depends on
                     json

!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app.
! Push failed

@PENGZhaoqing
Copy link
Owner

首先检查你的ruby版本, 用rvm把你的ruby版本升级到最新, 然后选一个高一点的rails版本, 修改gem文件CourseSelect/Gemfile,

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '5.x.x.x'

然后运行bundle install,让bundle自动装相应的rails版本, 也可以直接用gem装
https://github.com/PENGZhaoqing/CourseSelect/wiki/FAQ-of-installation

@liuzj288
Copy link
Author

liuzj288 commented Mar 9, 2019

ruby v显示信息如下:
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]
大神啥时候有空可不可以直接登陆我账号看看原因

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants