Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 将应用程序推送到heroku时出错(安装linecache19(0.5.12)时出现本机扩展错误)需要帮助!_Ruby On Rails_Heroku - Fatal编程技术网

Ruby on rails 将应用程序推送到heroku时出错(安装linecache19(0.5.12)时出现本机扩展错误)需要帮助!

Ruby on rails 将应用程序推送到heroku时出错(安装linecache19(0.5.12)时出现本机扩展错误)需要帮助!,ruby-on-rails,heroku,Ruby On Rails,Heroku,我在使用git push heroku master将我的应用程序部署到heroku时遇到此错误 -----> Heroku receiving push -----> Rails app detected -----> Detected Rails is not set to serve static_assets Installing rails3_serve_static_assets... done -----> Configure Rails 3

我在使用git push heroku master将我的应用程序部署到heroku时遇到此错误

-----> Heroku receiving push
-----> Rails app detected
-----> Detected Rails is not set to serve static_assets
       Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
       Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
       Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
       Unresolved dependencies detected; Installing...
       Using --without development:test
       Fetching source index for http://rubygems.org/
       Installing rake (0.9.0) 
       Installing abstract (1.0.0) 
       Installing activesupport (3.0.1) 
       Installing builder (2.1.2) 
       Installing i18n (0.4.2) 
       Installing activemodel (3.0.1) 
       Installing erubis (2.6.6) 
       Installing rack (1.2.3) 
       Installing rack-mount (0.6.14) 
       Installing rack-test (0.5.7) 
       Installing tzinfo (0.3.27) 
       Installing actionpack (3.0.1) 
       Installing mime-types (1.16) 
       Installing polyglot (0.3.1) 
       Installing treetop (1.4.9) 
       Installing mail (2.2.19) 
       Installing actionmailer (3.0.1) 
       Installing arel (1.0.1) 
       Installing activerecord (3.0.1) 
       Installing activeresource (3.0.1) 
       Installing archive-tar-minitar (0.5.2) 
       Installing columnize (0.3.2) 
       Installing ruby_core_source (0.1.5) 
       Installing linecache19 (0.5.12) with native extensions /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

       /usr/ruby1.9.2/bin/ruby extconf.rb 
       checking for vm_core.h... no
       checking for vm_core.h... no
       Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
       Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
       *** extconf.rb failed ***
       Could not create Makefile due to some reason, probably lack of
       necessary libraries and/or headers.  Check the mkmf.log file for more
       details.  You may need configuration options.

       Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/ruby1.9.2/bin/ruby
        --with-ruby-dir
        --without-ruby-dir
        --with-ruby-include
        --without-ruby-include=${ruby-dir}/include
        --with-ruby-lib
        --without-ruby-lib=${ruby-dir}/lib
       /usr/ruby1.9.2/lib/ruby/1.9.1/fileutils.rb:243:in `mkdir': Permission denied - /usr/ruby1.9.2/include/ruby-1.9.1/ruby-1.9.2-p180 (Errno::EACCES)
        from /usr/ruby1.9.2/lib/ruby/1.9.1/fileutils.rb:243:in `fu_mkdir'
        from /usr/ruby1.9.2/lib/ruby/1.9.1/fileutils.rb:217:in `block (2 levels) in mkdir_p'
        from /usr/ruby1.9.2/lib/ruby/1.9.1/fileutils.rb:215:in `reverse_each'
        from /usr/ruby1.9.2/lib/ruby/1.9.1/fileutils.rb:215:in `block in mkdir_p'
        from /usr/ruby1.9.2/lib/ruby/1.9.1/fileutils.rb:201:in `each'
        from /usr/ruby1.9.2/lib/ruby/1.9.1/fileutils.rb:201:in `mkdir_p'
        from /disk1/tmp/build_2bk91kj0jaqmb/.bundle/gems/ruby/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:59:in `block in create_makefile_with_core'
        from /usr/ruby1.9.2/lib/ruby/1.9.1/tempfile.rb:320:in `open'
        from /disk1/tmp/build_2bk91kj0jaqmb/.bundle/gems/ruby/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:51:in `create_makefile_with_core'
        from extconf.rb:19:in `<main>'


       Gem files will remain installed in /disk1/tmp/build_2bk91kj0jaqmb/.bundle/gems/ruby/1.9.1/gems/linecache19-0.5.12 for inspection.
       Results logged to /disk1/tmp/build_2bk91kj0jaqmb/.bundle/gems/ruby/1.9.1/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out
        from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/installer.rb:486:in `block in build_extensions'
        from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/installer.rb:446:in `each'
        from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/installer.rb:446:in `build_extensions'
        from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/installer.rb:198:in `install'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/source.rb:95:in `install'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:55:in `block in run'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `block in each'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:44:in `run'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:8:in `install'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/cli.rb:225:in `install'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/bin/bundle:13:in `<top (required)>'
        from /usr/ruby1.9.2/bin/bundle:19:in `load'
        from /usr/ruby1.9.2/bin/bundle:19:in `<main>'
       FAILED: http://devcenter.heroku.com/articles/bundler
 !     Heroku push rejected, failed to install gems via Bundler

To git@heroku.com:young-planet-247.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:young-planet-247.git'
GemFile.lock

 GEM
  remote: http://rubygems.org/
  specs:
    abstract (1.0.0)
    actionmailer (3.0.1)
      actionpack (= 3.0.1)
      mail (~> 2.2.5)
    actionpack (3.0.1)
      activemodel (= 3.0.1)
      activesupport (= 3.0.1)
      builder (~> 2.1.2)
      erubis (~> 2.6.6)
      i18n (~> 0.4.1)
      rack (~> 1.2.1)
      rack-mount (~> 0.6.12)
      rack-test (~> 0.5.4)
      tzinfo (~> 0.3.23)
    activemodel (3.0.1)
      activesupport (= 3.0.1)
      builder (~> 2.1.2)
      i18n (~> 0.4.1)
    activerecord (3.0.1)
      activemodel (= 3.0.1)
      activesupport (= 3.0.1)
      arel (~> 1.0.0)
      tzinfo (~> 0.3.23)
    activeresource (3.0.1)
      activemodel (= 3.0.1)
      activesupport (= 3.0.1)
    activesupport (3.0.1)
    annotate-models (1.0.4)
    archive-tar-minitar (0.5.2)
    arel (1.0.1)
      activesupport (~> 3.0.0)
    builder (2.1.2)
    columnize (0.3.3)
    erubis (2.6.6)
      abstract (>= 1.0.0)
    i18n (0.4.2)
    linecache19 (0.5.12)
      ruby_core_source (>= 0.1.4)
    mail (2.2.19)
      activesupport (>= 2.3.6)
      i18n (>= 0.4.0)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.16)
    polyglot (0.3.1)
    rack (1.2.3)
    rack-mount (0.6.14)
      rack (>= 1.0.0)
    rack-test (0.5.7)
      rack (>= 1.0)
    rails (3.0.1)
      actionmailer (= 3.0.1)
      actionpack (= 3.0.1)
      activerecord (= 3.0.1)
      activeresource (= 3.0.1)
      activesupport (= 3.0.1)
      bundler (~> 1.0.0)
      railties (= 3.0.1)
    railties (3.0.1)
      actionpack (= 3.0.1)
      activesupport (= 3.0.1)
      rake (>= 0.8.4)
      thor (~> 0.14.0)
    rake (0.9.2)
    ruby-debug-base19 (0.11.25)
      columnize (>= 0.3.1)
      linecache19 (>= 0.5.11)
      ruby_core_source (>= 0.1.4)
    ruby-debug19 (0.11.6)
      columnize (>= 0.3.1)
      linecache19 (>= 0.5.11)
      ruby-debug-base19 (>= 0.11.19)
    ruby_core_source (0.1.5)
      archive-tar-minitar (>= 0.5.2)
    sqlite3-ruby (1.2.5)
    thor (0.14.6)
    treetop (1.4.9)
      polyglot (>= 0.3.1)
    tzinfo (0.3.27)

PLATFORMS
  ruby

DEPENDENCIES
  annotate-models (= 1.0.4)
  rails (= 3.0.1)
  ruby-debug19
  sqlite3-ruby (= 1.2.5)
我已经试过这里提到的步骤了。。

有人能告诉我如何解决这个问题吗


谢谢

此错误与ruby-debug19有关。从您的gemfile中删除它,它将在Heroku上编译。这与Heroku的环境有关。

我的问题是,我从正在处理的分支中删除了ruby-debug19,但我忘记了将其与主分支合并。一直以来,我都在推动主分支,而没有做任何更改。

您是否尝试过添加
Heroku配置:添加BUNDLE\u而没有=“发展:测试“
然后进行git推送?得到完全相同的结果?你也可以发布你的Gemfile.lock吗?是的,我得到了同样的结果。发布Gemfile.lock抱歉发布了错误的Gemfile.lock。发布了新的。请看一看。非常感谢。这让我发疯,直到我做了一个
git分支
,并意识到我在一个分支中尝试调试,但按下了master,这显然没有改变。向上投票
 GEM
  remote: http://rubygems.org/
  specs:
    abstract (1.0.0)
    actionmailer (3.0.1)
      actionpack (= 3.0.1)
      mail (~> 2.2.5)
    actionpack (3.0.1)
      activemodel (= 3.0.1)
      activesupport (= 3.0.1)
      builder (~> 2.1.2)
      erubis (~> 2.6.6)
      i18n (~> 0.4.1)
      rack (~> 1.2.1)
      rack-mount (~> 0.6.12)
      rack-test (~> 0.5.4)
      tzinfo (~> 0.3.23)
    activemodel (3.0.1)
      activesupport (= 3.0.1)
      builder (~> 2.1.2)
      i18n (~> 0.4.1)
    activerecord (3.0.1)
      activemodel (= 3.0.1)
      activesupport (= 3.0.1)
      arel (~> 1.0.0)
      tzinfo (~> 0.3.23)
    activeresource (3.0.1)
      activemodel (= 3.0.1)
      activesupport (= 3.0.1)
    activesupport (3.0.1)
    annotate-models (1.0.4)
    archive-tar-minitar (0.5.2)
    arel (1.0.1)
      activesupport (~> 3.0.0)
    builder (2.1.2)
    columnize (0.3.3)
    erubis (2.6.6)
      abstract (>= 1.0.0)
    i18n (0.4.2)
    linecache19 (0.5.12)
      ruby_core_source (>= 0.1.4)
    mail (2.2.19)
      activesupport (>= 2.3.6)
      i18n (>= 0.4.0)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.16)
    polyglot (0.3.1)
    rack (1.2.3)
    rack-mount (0.6.14)
      rack (>= 1.0.0)
    rack-test (0.5.7)
      rack (>= 1.0)
    rails (3.0.1)
      actionmailer (= 3.0.1)
      actionpack (= 3.0.1)
      activerecord (= 3.0.1)
      activeresource (= 3.0.1)
      activesupport (= 3.0.1)
      bundler (~> 1.0.0)
      railties (= 3.0.1)
    railties (3.0.1)
      actionpack (= 3.0.1)
      activesupport (= 3.0.1)
      rake (>= 0.8.4)
      thor (~> 0.14.0)
    rake (0.9.2)
    ruby-debug-base19 (0.11.25)
      columnize (>= 0.3.1)
      linecache19 (>= 0.5.11)
      ruby_core_source (>= 0.1.4)
    ruby-debug19 (0.11.6)
      columnize (>= 0.3.1)
      linecache19 (>= 0.5.11)
      ruby-debug-base19 (>= 0.11.19)
    ruby_core_source (0.1.5)
      archive-tar-minitar (>= 0.5.2)
    sqlite3-ruby (1.2.5)
    thor (0.14.6)
    treetop (1.4.9)
      polyglot (>= 0.3.1)
    tzinfo (0.3.27)

PLATFORMS
  ruby

DEPENDENCIES
  annotate-models (= 1.0.4)
  rails (= 3.0.1)
  ruby-debug19
  sqlite3-ruby (= 1.2.5)