关于在Heroku

Results logged to /tmp/build_207lfem2op1z3/vendor/bundle/ruby/1.9.1/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out 

An error occurred while installing linecache19 (0.5.12), and Bundler cannot continue.

Make sure that `gem install linecache19 -v '0.5.12'` succeeds before bundling.

!

! Failed to install gems via Bundler.

!

! Heroku push rejected, failed to compile Ruby/rails app

To [email protected]:intense-garden-9145.git

! [remote rejected] master -> master (pre-receive hook declined)

error: failed to push some refs to '[email protected]:intense-garden-9145.git'

我的应用程序更新,请帮助我解决这个荫新的Heroku和Ruby on Rails关于在Heroku

我按照以下步骤来更新我的应用程序 git的初始化git的 增加。 git commit -m'。' 混帐推Heroku的主

而且我已经得到了以下运行错误

[email protected]:~/hw2_rottenpotatoes$ git push heroku master 

Counting objects: 462, done.

Compressing objects: 100% (240/240), done.

Writing objects: 100% (462/462), 76.71 KiB, done.

Total 462 (delta 185), reused 427 (delta 172)

-----> Heroku receiving push

-----> Ruby/Rails app detected

-----> Installing dependencies using Bundler version 1.2.1

Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment

Fetching gem metadata from http://rubygems.org/.........

Fetching gem metadata from http://rubygems.org/..

Installing rake (0.9.2.2)

Installing multi_json (1.0.4)

Installing activesupport (3.1.0)

Installing bcrypt-ruby (3.0.1) with native extensions

Installing builder (3.0.0)

Installing i18n (0.6.0)

Installing activemodel (3.1.0)

Installing erubis (2.7.0)

Installing rack (1.3.6)

Installing rack-cache (1.0.3)

Installing rack-mount (0.8.3)

Installing rack-test (0.6.1)

Installing hike (1.2.1)

Installing tilt (1.3.3)

Installing sprockets (2.0.3)

Installing actionpack (3.1.0)

Installing mime-types (1.17.2)

Installing polyglot (0.3.3)

Installing treetop (1.4.10)

Installing mail (2.3.0)

Installing actionmailer (3.1.0)

Installing arel (2.2.1)

Installing tzinfo (0.3.31)

Installing activerecord (3.1.0)

Installing activeresource (3.1.0)

Installing archive-tar-minitar (0.5.2)

Installing coffee-script-source (1.2.0)

Installing execjs (1.2.13)

Installing coffee-script (2.2.0)

Installing rack-ssl (1.3.2)

Installing json (1.6.5) with native extensions

Installing rdoc (3.12)

Installing thor (0.14.6)

Installing railties (3.1.0)

Installing coffee-rails (3.1.1)

Installing columnize (0.3.6)

Installing haml (3.1.4)

Installing jquery-rails (1.0.19)

Installing libv8 (3.3.10.4)

Installing ruby_core_source (0.1.5)

Installing linecache19 (0.5.12) with native extensions

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb

checking for vm_core.h... no

checking for vm_core.h... no

*** 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/local/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/local/lib/ruby/1.9.1/fileutils.rb:243:in `mkdir': Read-only file system - /usr/local/include/ruby-1.9.1/ruby-1.9.2-p290 (Errno::EROFS)

from /usr/local/lib/ruby/1.9.1/fileutils.rb:243:in `fu_mkdir'

from /usr/local/lib/ruby/1.9.1/fileutils.rb:217:in `block (2 levels) in mkdir_p'

from /usr/local/lib/ruby/1.9.1/fileutils.rb:215:in `reverse_each'

from /usr/local/lib/ruby/1.9.1/fileutils.rb:215:in `block in mkdir_p'

from /usr/local/lib/ruby/1.9.1/fileutils.rb:201:in `each'

from /usr/local/lib/ruby/1.9.1/fileutils.rb:201:in `mkdir_p'

from /tmp/build_lt34ecl4ewpm/vendor/bundle/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/local/lib/ruby/1.9.1/tempfile.rb:320:in `open'

from /tmp/build_lt34ecl4ewpm/vendor/bundle/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>'

Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz

Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz

Gem files will remain installed in /tmp/build_lt34ecl4ewpm/vendor/bundle/ruby/1.9.1/gems/linecache19-0.5.12 for inspection.

Results logged to /tmp/build_lt34ecl4ewpm/vendor/bundle/ruby/1.9.1/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out

An error occurred while installing linecache19 (0.5.12), and Bundler cannot continue.

Make sure that `gem install linecache19 -v '0.5.12'` succeeds before bundling.

!

! Failed to install gems via Bundler.

!

! Heroku push rejected, failed to compile Ruby/rails app

To [email protected]:intense-garden-9145.git

! [remote rejected] master -> master (pre-receive hook declined)

error: failed to push some refs to '[email protected]:intense-garden-9145.git'

下面荫张贴我的宝石文件

source 'http://rubygems.org' 

gem 'rails', '3.1.0'

# Bundle edge Rails instead:

# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'

# Gems used only for assets and not required

# in production environments by default.

group :assets do

gem 'therubyracer'

gem 'sass-rails', " ~> 3.1.0"

gem 'coffee-rails', "~> 3.1.0"

gem 'uglifier'

end

gem 'jquery-rails'

# Use unicorn as the web server

# gem 'unicorn'

# Deploy with Capistrano

# gem 'capistrano'

# To use debugger

gem 'ruby-debug19', :require => 'ruby-debug'

gem 'haml'

回答:

在安装linecache19发生错误(0.5.12) ,Bundler无法继续。

通常,您只会在开发中使用ruby-debug宝石,而不是在生产中。确保ruby-debug位于您的Gemfile:development:test组中。

group :development, :test do 

gem 'ruby-debug19', :require => 'ruby-debug'

end

请尝试以下

  1. 运行bundle再次
  2. 再次提交您的GemfileGemfile.lock
  3. 推到Heroku的

回答:

linecache19安装为ruby-debug19依赖, WHI反正你不想在生产中拥有它。

在你的Gemfile,更换说

gem 'ruby-debug19', :require => 'ruby-debug' 

与此

group :development, :test do 

gem 'ruby-debug19', require: 'ruby-debug'

end

这将意味着调试器的开发和测试环境只装线。

您也打算与不支持在Heroku要么sqlite3遇到了麻烦......看到this question

以上是 关于在Heroku 的全部内容, 来源链接: utcz.com/qa/266488.html

回到顶部