-----> 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
Related
━━━━━━ 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
Trying to use rest-client gem in ruby but keep getting error: "WARNING: The rest_client gem is deprecated and will be removed from RubyGems. Please use rest-client gem instead."
Even though my code uses 'rest-client' and not 'rest_client'
#!/usr/bin/ruby
require 'rest-client'
Also, when i try to do 'gem install rest-client' it fails with:
Building native extensions. This could take a while...
ERROR: Error installing rest-client:
ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 mkrf_conf.rb
Building native extensions. This could take a while...
/usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:89:in `run': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/unf-0.2.0.beta2/ext/gems/gems/unf_ext-0.0.7.2 for inspection.
Results logged to /var/lib/gems/2.1.0/gems/unf-0.2.0.beta2/ext/gems/extensions/x86_64-linux/2.1.0/unf_ext-0.0.7.2/gem_make.out
from /usr/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:38:in `block in build'
from /usr/lib/ruby/2.1.0/tempfile.rb:324:in `open'
from /usr/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:17:in `build'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `chdir'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `block in build_extension'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `synchronize'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `build_extension'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `each'
from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `build_extensions'
from /usr/lib/ruby/2.1.0/rubygems/installer.rb:677:in `build_extensions'
from /usr/lib/ruby/2.1.0/rubygems/installer.rb:232:in `install'
from /usr/lib/ruby/2.1.0/rubygems/resolver/specification.rb:78:in `install'
from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:206:in `block in install_into'
from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:198:in `each'
from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:198:in `install_into'
from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:119:in `install'
from /usr/lib/ruby/2.1.0/rubygems/dependency_installer.rb:389:in `install'
from mkrf_conf.rb:15:in `<main>'
rake failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/unf-0.2.0.beta2 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/unf-0.2.0.beta2/gem_make.out
Thanks for any help
I didn't have ruby dev installed... doh!
gem install: Failed to build gem native extension (can't find header files)
sudo apt-get install ruby-dev
fixed my problem
I'm fairly new to Ruby and I tried to push my code to Heroku, but it seems that when I tried:
git push heroku master
It failed in the push and displayed this error:
Bundle completed (25.17s)
Cleaning up the bundler cache.
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
DEPRECATION WARNING: Paths in SQLite3 database URLs of the form `sqlite3:///path` will be treated as absolute in Rails 4.2. Please switch to `sqlite3:dbname`. (called from <top (required)> at /tmp/build_9b82245b019e78f91f12b14e50aeac25/Rakefile:6)
rake aborted!
Gem::LoadError: Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/connection_specification.rb:190:in `rescue in spec'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/connection_specification.rb:187:in `spec'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.6/lib/active_record/connection_handling.rb:50:in `establish_connection'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.6/lib/active_record/railtie.rb:129:in `block (2 levels) in <class:Railtie>'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:27:in `each'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.6/lib/active_record/railtie.rb:118:in `block in <class:Railtie>'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/railties-4.1.6/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/railties-4.1.6/lib/rails/initializable.rb:30:in `run'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/railties-4.1.6/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/railties-4.1.6/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/railties-4.1.6/lib/rails/application.rb:300:in `initialize!'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/config/environment.rb:5:in `<top (required)>'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/railties-4.1.6/lib/rails/application.rb:276:in `require_environment!'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/railties-4.1.6/lib/rails/application.rb:389:in `block in run_tasks_blocks'
/tmp/build_9b82245b019e78f91f12b14e50aeac25/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.2.1/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:rigpirate.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:testapp.git'
This is what it displayed after I submitted the push command to Heroku. I think it is because of my code in the gem file here:
gem 'rails', '4.1.6'
group :development, :test do
gem 'sqlite3'
end
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'y
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'spring', group: :development
gem 'devise'
gem 'simple_form'
Can anybody help me with this one?
Currently you put the sqlite3 gem inside the development and test groups. If you'd want to deploy with sqlite3 on Heroku, you need to include it in the production group as well, which is as simple as removing the group :development, :test.
Do note that using sqlite3 on Heroku is most likely a bad idea, and you would be better off using Heroku Postgres. Read the Heroku documentation for more information.
after a while of searching i saw the answer here
http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you//
I just needed to install PG and then do a
sudo apt-get install libpq-dev
and then the push to heroku worked
I'm trying to run a Jekyll build programatically, but I'm having issues in that the build crashes when trying to load some gems used by the Jekyll site's plugins.
My code looks like this (line breaks added for readability):
%x(cd #{#config['input_directory']} &&
bundle install &&
bundle exec jekyll build --config #{File.join(#config['input_directory'], "_config.yml")} --source #{#config['input_directory']} --destination #{#config['output_directory']} --trace)
When this runs, I get a stack trace that looks like this:
/_plugins/jekyll_lunr_js_search.rb:80:in `require': cannot load such file -- nokogiri (LoadError)
from /_plugins/jekyll_lunr_js_search.rb:80:in `<top (required)>'
from /ruby-1.9.3-p448/gems/jekyll-1.3.0/lib/jekyll/site.rb:77:in `require'
from /ruby-1.9.3-p448/gems/jekyll-1.3.0/lib/jekyll/site.rb:77:in `block (2 levels) in setup'
from /ruby-1.9.3-p448/gems/jekyll-1.3.0/lib/jekyll/site.rb:76:in `each'
from /ruby-1.9.3-p448/gems/jekyll-1.3.0/lib/jekyll/site.rb:76:in `block in setup'
from /ruby-1.9.3-p448/gems/jekyll-1.3.0/lib/jekyll/site.rb:75:in `each'
from /ruby-1.9.3-p448/gems/jekyll-1.3.0/lib/jekyll/site.rb:75:in `setup'
from /ruby-1.9.3-p448/gems/jekyll-1.3.0/lib/jekyll/site.rb:29:in `initialize'
from /ruby-1.9.3-p448/gems/jekyll-1.3.0/lib/jekyll/commands/build.rb:5:in `new'
from /ruby-1.9.3-p448/gems/jekyll-1.3.0/lib/jekyll/commands/build.rb:5:in `process'
from /ruby-1.9.3-p448/gems/jekyll-1.3.0/bin/jekyll:77:in `block (2 levels) in <top (required)>'
from /ruby-1.9.3-p448/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
from /ruby-1.9.3-p448/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
from /ruby-1.9.3-p448/gems/commander-4.1.5/lib/commander/command.rb:155:in `run'
from /ruby-1.9.3-p448/gems/commander-4.1.5/lib/commander/runner.rb:402:in `run_active_command'
from /ruby-1.9.3-p448/gems/commander-4.1.5/lib/commander/runner.rb:78:in `run!'
from /ruby-1.9.3-p448/gems/commander-4.1.5/lib/commander/delegates.rb:11:in `run!'
from /ruby-1.9.3-p448/gems/commander-4.1.5/lib/commander/import.rb:10:in `block in <top (required)>'
The Gemfile of the input_directory looks like this, so I'm not sure why it's not able to load nokogiri.
source 'https://rubygems.org'
gem 'directory_watcher', '= 1.4.1' # http://stackoverflow.com/questions/15591000/jekylls-auto-doesnt-work
gem 'kramdown'
gem 'nokogiri'
gem 'yui-compressor'
gem "jekyll"
group :development do
gem 'capistrano'
gem 'rvm-capistrano'
end
Any pointers here are welcome. I get the feeling there are better ways of doing this Jekyll build programmatically too, this just seemed to be simplest to me.
Run bundle exec jekyll to ensure that it sets up the gem path correctly for Jekyll. If you're calling the program from an app that uses Bundler itself, you may need to also wrap the execution in a call to Bundler.with_clean_env.
The complete command should look like this:
Bundler.with_clean_env do
%x(cd #{#config['input_directory']} &&
bundle install &&
bundle exec jekyll build --config #{File.join(#config['input_directory'], "_config.yml")} --source #{#config['input_directory']} --destination #{#config['output_directory']} --trace)
end
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