Exclude hoe gem dependency from Heroku - heroku

I am trying to push code to Heroku and it seems like the system gem "hoe" is somehow included by some other gem (geokit was one of them but no luck even after removing that gem from Gemfile). This is causing Heroku to fail because it cannot update system gems. how to solve this issue?
Installing geokit (1.5.0)
Installing geonames (0.2.2)
Installing hoe (2.9.1) /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:170:in `install': hoe requires RubyGems version >= 1.4. Try 'gem update --system' to update RubyGems itself. (Gem::InstallError)
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/source.rb:95:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:55:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:44:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:8:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/cli.rb:225:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `send'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/bin/bundle:13
from /usr/ruby1.8.7/bin/bundle:19:in `load'
from /usr/ruby1.8.7/bin/bundle:19
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler

Just pin it in your Gemfile, I bet your dependent gems don't depend on 2.9.1. Add this:
gem 'hoe', '~> 1.5.1' # Heroku's rubygems is too old for hoe 2.9.1 as of 28 Mar 2011

Related

Why does `gem install` succeed but `bundle install` fails?

I'm trying to install gtk3, but bundle install chokes while installing atk. Most of the responses seem to resolve around mismatched versions in the lock file. Removing the lock file doesn't help, neither does installing the matching version of bundle.
$ bundle install
Fetching gem metadata from https://rubygems.org/....
Resolving dependencies...
Using bundler 2.4.6
Fetching native-package-installer 1.1.5
Fetching pkg-config 1.5.1
Installing pkg-config 1.5.1
Installing native-package-installer 1.1.5
Fetching glib2 3.5.1
Installing glib2 3.5.1 with native extensions
Fetching atk 3.5.1
Installing atk 3.5.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/sproctor/code/lich-5/vendor/bundle/ruby/2.7.0/gems/atk-3.5.1/dependency-check
rake RUBYARCHDIR\=/home/sproctor/code/lich-5/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/atk-3.5.1
RUBYLIBDIR\=/home/sproctor/code/lich-5/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/atk-3.5.1
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems.rb:263:in `find_spec_for_exe': can't find gem
rake (>= 0.a) with executable rake (Gem::GemNotFoundException)
from /home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems.rb:282:in `activate_bin_path'
from /home/sproctor/.rvm/gems/ruby-2.7.7/bin/rake:23:in `<main>'
from /home/sproctor/.rvm/gems/ruby-2.7.7/bin/ruby_executable_hooks:22:in `eval'
from /home/sproctor/.rvm/gems/ruby-2.7.7/bin/ruby_executable_hooks:22:in `<main>'
rake failed, exit code 1
Gem files will remain installed in /home/sproctor/code/lich-5/vendor/bundle/ruby/2.7.0/gems/atk-3.5.1 for inspection.
Results logged to
/home/sproctor/code/lich-5/vendor/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/atk-3.5.1/gem_make.out
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:102:in `run'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/rake_builder.rb:28:in `build'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:170:in `build_extension'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:204:in `block in
build_extensions'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:201:in `each'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:201:in `build_extensions'
/home/sproctor/.rvm/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/rubygems/installer.rb:843:in `build_extensions'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/rubygems_gem_installer.rb:72:in `build_extensions'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/rubygems_gem_installer.rb:28:in `install'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/source/rubygems.rb:200:in `install'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/installer/gem_installer.rb:54:in `install'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/installer/parallel_installer.rb:155:in
`do_install'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/installer/parallel_installer.rb:146:in `block in
worker_pool'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/worker.rb:62:in `apply_func'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/worker.rb:57:in `block in process_queue'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/worker.rb:54:in `loop'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/worker.rb:54:in `process_queue'
/home/sproctor/.rvm/gems/ruby-2.7.7/gems/bundler-2.4.6/lib/bundler/worker.rb:90:in `block (2 levels) in
create_threads'
An error occurred while installing atk (3.5.1), and Bundler cannot continue.
In Gemfile:
atk
However, installing via gem works fine.
gem install atk -v 3.5.1
Building native extensions. This could take a while...
Successfully installed atk-3.5.1
Parsing documentation for atk-3.5.1
Done installing documentation for atk after 0 seconds
1 gem installed
This isn't a great answer, so if someone has a more in depth explanation, please feel free to give a better answer.
gem install gtk3 and bundle install use a different copy of rake.
The only difference between the two is the shebang line. The version from bundler is #!/usr/bin/env ruby_executable_hooks while the other version points to a specific version of ruby.
I'm not sure why this fails for the bundler version.
An easy workaround mentioned here: https://github.com/postmodern/digest-crc/issues/18#issuecomment-652889761 is to add gem "rake" to your Gemfile.

error while run npm run dev after adding extension for App Lock theme in shopify app MERN

━━━━━━ Error ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Command failed with exit code 1: bundle install
Your lockfile was created by an old Bundler that left some things out.
Because of the missing DEPENDENCIES, we can only install gems one at a time, instead of installing 4 at a time.
You can fix this by adding the missing gems to your Gemfile, running bundle install, and then removing the gems from your Gemfile.
The missing gems are:
* mini_portile2 depended upon by nokogiri
--- ERROR REPORT TEMPLATE -------------------------------------------------------
```
NoMethodError: undefined method `full_name' for nil:NilClass
warning << "* #{unmet_spec_dependency}, depended upon #{spec.full_name}, unsatisfied by #{#specs.find {|s| s.name == unmet_spec_dependency.name && !unmet_spec_dependency.matches_spec?(s.spec) }.full_name}"
^^^^^^^^^^
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/installer/parallel_installer.rb:124:in `block (2 levels) in check_for_unmet_dependencies'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/installer/parallel_installer.rb:123:in `each'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/installer/parallel_installer.rb:123:in `block in check_for_unmet_dependencies'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/installer/parallel_installer.rb:122:in `each'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/installer/parallel_installer.rb:122:in `check_for_unmet_dependencies'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/installer/parallel_installer.rb:100:in `call'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/installer/parallel_installer.rb:71:in `call'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/installer.rb:254:in `install_in_parallel'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/installer.rb:209:in `install'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/installer.rb:89:in `block in run'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/process_lock.rb:12:in `block in lock'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/process_lock.rb:9:in `open'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/process_lock.rb:9:in `lock'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/installer.rb:71:in `run'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/installer.rb:23:in `install'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/cli/install.rb:62:in `run'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/cli.rb:257:in `block in install'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/settings.rb:131:in `temporary'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/cli.rb:256:in `install'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/cli.rb:31:in `dispatch'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/cli.rb:25:in `start'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.23/exe/bundle:48:in `block in <top (required)>'
C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/bundler/friendly_errors.rb:120:in `with_friendly_errors'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.23/exe/bundle:36:in `<top (required)>'
C:/Ruby31-x64/bin/bundle:33:in `load'
C:/Ruby31-x64/bin/bundle:33:in `<main>'
```
## Environment
```
Bundler 2.3.23
Platforms ruby, x64-mingw-ucrt
Ruby 3.1.2p20 (2022-04-12 revision 4491bb740a9506d76391ac44bb2fe6e483fec952) [x64-mingw-ucrt]
Full Path C:/Ruby31-x64/bin/ruby.exe
Config Dir C:/ProgramData
RubyGems 3.3.23
Gem Home C:/Users/reeba/AppData/Local/shopify-cli-nodejs/Cache/vendor/ruby-cli/2.25.0/ruby/3.1.0
Gem Path C:/Users/reeba/AppData/Local/shopify-cli-nodejs/Cache/vendor/ruby-cli/2.25.0/ruby/3.1.0
User Home C:/Users/reeba
User Path C:/Users/reeba/.local/share/gem/ruby/3.1.0
Bin Dir C:/Users/reeba/AppData/Local/shopify-cli-nodejs/Cache/vendor/ruby-cli/2.25.0/ruby/3.1.0/bin
OpenSSL
Compiled OpenSSL 1.1.1n 15 Mar 2022
Loaded OpenSSL 1.1.1n 15 Mar 2022
Cert File C:/Ruby31-x64/ssl/cert.pem
Cert Dir C:/Ruby31-x64/ssl/certs
Tools
Git 2.32.0.windows.2
RVM not installed
rbenv not installed
chruby not installed
```
## Bundler Build Metadata
```
Built At 2022-10-05
Git SHA 250d9d485d
Released Version true
```
## Bundler settings
```
path
Set for your local app (C:/Users/reeba/AppData/Local/shopify-cli-nodejs/Cache/vendor/ruby-cli/2.25.0/.bundle/config): "C:/Users/reeba/AppData/Local/shopify-cli-nodejs/Cache/vendor/ruby-cli/2.25.0"
```
## Gemfile
### Gemfile
```ruby
source 'https://rubygems.org'
gem 'shopify-cli', '2.25.0'
```
### Gemfile.lock
```
<No C:/Users/reeba/AppData/Local/shopify-cli-nodejs/Cache/vendor/ruby-cli/2.25.0/Gemfile.lock found>
```
--- TEMPLATE END ----------------------------------------------------------------
Unfortunately, an unexpected error occurred, and Bundler cannot continue.
First, try this link to see if there are any existing issue reports for this error:
https://github.com/rubygems/rubygems/search?q=undefined+method+%60full_name%27+for+nil+NilClass&type=Issues
If there aren't any reports for this error yet, please fill in the new issue form located at https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md, and copy and paste the report template above in there.
Fetching gem metadata from https://rubygems.org/.............
Resolving dependencies...
Using ast 2.4.2
Using concurrent-ruby 1.1.10
Using bugsnag 6.24.2
Using bundler 2.3.23
Using ffi 1.15.5
Using liquid 5.4.0
Using rb-fsevent 0.11.2
Using rb-inotify 0.10.1
Using listen 3.7.1
Using racc 1.6.0
Installing nokogiri 1.13.8 with native extensions
I've got the same error message.
First of all I've made the gem update and the bundler updates:
gem install bundler
gem update --system
And then:
You should find the Gemfile.lock file in the directory .../path to your installed folder/lib/ruby/gems/2.7.0/gems/shopify-cli-2.27.0/Gemfile.lock and copy in to the folder C:/Users/reeba/AppData/Local/shopify-cli-nodejs/Cache/vendor/ruby-cli/2.25.0/
Generally it says - that the Gemfile.lock is not found:
Gemfile.lock
<No C:/Users/reeba/AppData/Local/shopify-cli-nodejs/Cache/vendor/ruby-cli/2.25.0/Gemfile.lock found>
That should help.
I had the same problem and this worked for me:
If you are using shopify cli 3.0+ and ruby 3.1.2 then copy Gemfile.lock from => *ruby path installed folder */lib/ruby/gems/2.7.0/gems/shopify-app/Gemfile.lock
OR in other versions it will be in *ruby path installed folder */lib/ruby/gems/2.7.0/gems/shopify-cli-2.27.0/Gemfile.lock
Add the Gemfile.lock in C:\Users\reeba\AppData\Local\shopify-cli-nodejs\Cache\vendor\ruby-cli\2.27.0
And also add same file at C:\Users\reeba\AppData\Local\shopify-cli-nodejs\Cache\vendor\theme-check\1.10.3

How do I resolve this error while installing Jekyll?

I followed this page and installed Jekyll, but when I tried to run Jekyll I got this error:
/usr/local/lib/site_ruby/2.1.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'liquid' (~> 2.5.5) - did find: [liquid-3.0.1,liquid-2.6.1] (Gem::LoadError)
Checked in 'GEM_PATH=/home/ali/.gem/ruby/2.1.0:/var/lib/gems/2.1.0:/usr/share/rubygems-integration/2.1.0:/usr/share/rubygems-integration/2.1:/usr/share/rubygems-integration/all', execute `gem env` for more information
from /usr/local/lib/site_ruby/2.1.0/rubygems/specification.rb:1311:in `block in activate_dependencies'
from /usr/local/lib/site_ruby/2.1.0/rubygems/specification.rb:1300:in `each'
from /usr/local/lib/site_ruby/2.1.0/rubygems/specification.rb:1300:in `activate_dependencies'
from /usr/local/lib/site_ruby/2.1.0/rubygems/specification.rb:1282:in `activate'
from /usr/local/lib/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:67:in `block in gem'
from /usr/local/lib/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:66:in `synchronize'
from /usr/local/lib/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:66:in `gem'
from /usr/local/bin/jekyll:22:in `<main>'
This error indicates that the version of the liquid Gem that jekyll needs is lower than the ones you have installed. You should look into installing the right version which is v2.5.5.
gem install liquid -v 2.5.5
Should fix this.

Heroku push rejected

-----> Ruby/Rack app detected
-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using Bundler version 1.3.0.pre.2
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/
Fetching gem metadata from http://rubygems.org/.........
Fetching gem metadata from http://rubygems.org/..
^[[C^[[D^[[D/app/slug-compiler/lib/utils.rb:66:in `block (2 levels) in spawn': command='/app/slug-compiler/lib/../../tmp/buildpacks/ruby/bin/compile /tmp/build_22uiq5k0q45sp /app/tmp/repo.git/.cache' exit_status=0 out='' at=timeout elapsed=900.1076555252075 (Utils::TimeoutError)
from /app/slug-compiler/lib/utils.rb:52:in `loop'
from /app/slug-compiler/lib/utils.rb:52:in `block in spawn'
from /app/slug-compiler/lib/utils.rb:47:in `popen'
from /app/slug-compiler/lib/utils.rb:47:in `spawn'
from /app/slug-compiler/lib/buildpack.rb:37:in `block in compile'
from /app/slug-compiler/lib/buildpack.rb:35:in `fork'
from /app/slug-compiler/lib/buildpack.rb:35:in `compile'
from /app/slug-compiler/lib/slug.rb:497:in `block in run_buildpack'
from /app/slug-compiler/lib/utils.rb:121:in `log'
from /app/slug-compiler/lib/slug.rb:748:in `log'
from /app/slug-compiler/lib/slug.rb:496:in `run_buildpack'
from /app/slug-compiler/lib/slug.rb:125:in `block (2 levels) in compile'
from /app/slug-compiler/lib/utils.rb:102:in `block in timeout'
from /usr/local/lib/ruby/1.9.1/timeout.rb:58:in `timeout'
from /app/slug-compiler/lib/utils.rb:102:in `rescue in timeout'
from /app/slug-compiler/lib/utils.rb:97:in `timeout'
from /app/slug-compiler/lib/slug.rb:114:in `block in compile'
from /app/slug-compiler/lib/utils.rb:121:in `log'
from /app/slug-compiler/lib/slug.rb:748:in `log'
from /app/slug-compiler/lib/slug.rb:113:in `compile'
from /app/slug-compiler/bin/slugc:85:in `block in '
from /app/slug-compiler/lib/slug.rb:505:in `block in lock'
from /app/slug-compiler/lib/repo_lock.rb:44:in `call'
from /app/slug-compiler/lib/repo_lock.rb:44:in `run'
from /app/slug-compiler/lib/slug.rb:505:in `lock'
from /app/slug-compiler/bin/slugc:66:in `'
! Heroku push rejected, failed to compile Ruby/rack app
Here is my Gemfile:
source :rubygems
ruby '1.9.3'
gem 'sinatra', '1.3.3'
gem 'sinatra-contrib', '1.3.2'
gem 'thin', '1.5.0'
gem 'haml', '3.1.6'
gem 'bcrypt-ruby', '3.0.1'
gem 'mongo', '1.8.0'
gem 'bson_ext', '1.8.0'
gem 'mongoid', '3.0.16'
gem 'sinatra-flash', '0.3.0'
gem 'braintree', '2.22.0'
gem 'faye', '0.8.6'
#gem 'pony'
The error is gone when I change
gem 'braintree', '2.22.0'
to
gem 'braintree'
UPDATE: This answer doesn't work. The only option is to raise a support ticket.
There's a new feature that fixes this problem:
$ heroku config:set COMPILE_TIMEOUT=n
where n is a number in seconds. I used n=3000 (default is 900).
(note: you may need user-env-compile enabled to use this feature)
Update: Please read the comments on this answer for updated information!
For me the solution that I found was:
Push first half of my dependencies (half of the requirements.txt file)
Push all the requirements.txt file (including opencv dependency), this work because heroku keep in cached the first half, so then the second installation will go more fast

Error building PostgreSQL gem with `budle install` [Ubuntu 10.04, Ruby EE]

I've Ruby Enterprise Edition installed on Ubuntu 10.04 as the default Ruby interpreter:
ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2011.01
If I sudo gem install pg, the gem is installed successfully.
But withing my Rails app, bundle install hangs up like that:
[...]
Using net-sftp (2.0.5)
Using net-ssh-gateway (1.0.1)
Using capistrano (2.5.19)
Installing pg (0.10.1) with native extensions /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/site_ruby/1.8/rubygems/installer.rb:529:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/opt/ruby-enterprise-1.8.7-2011.01/bin/ruby extconf.rb
Gem files will remain installed in /home/selhozka/rails/vendor/gems/ruby/1.8/gems/pg-0.10.1 for inspection.
Results logged to /home/selhozka/rails/vendor/gems/ruby/1.8/gems/pg-0.10.1/ext/gem_make.out
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/site_ruby/1.8/rubygems/installer.rb:482:in `each'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/site_ruby/1.8/rubygems/installer.rb:482:in `build_extensions'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/site_ruby/1.8/rubygems/installer.rb:156:in `install'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:96:in `install'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:55:in `run'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:44:in `run'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:8:in `install'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/cli.rb:226:in `install'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `send'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `run'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/base.rb:389:in `start'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/bin/bundle:13
from /opt/ruby-enterprise-1.8.7-2011.01/bin/bundle:19:in `load'
from /opt/ruby-enterprise-1.8.7-2011.01/bin/bundle:19
The contents of /home/selhozka/rails/vendor/gems/ruby/1.8/gems/pg-0.10.1/ext/gem_make.out:
/opt/ruby-enterprise-1.8.7-2011.01/bin/ruby extconf.rb
It was a lack-of-memory issue with an OpenVZ VPS.
There was only 256 MB of RAM and OpenVZ doesn't provide you with swap space. So the script hang up.

Resources