-
What version of bundler you are using
$ bundle -v Bundler version 1.0.7
-
What version of Ruby you are using
$ ruby -v ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-darwin10.4.1], MBARI 0x6770, Ruby Enterprise Edition 2010.02
-
Whether you are using RVM, and if so what version
$ rvm -v rvm 1.1.0 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]
-
Your Gemfile
included in the gist (generated by
bundle create example-gem
) -
Your Gemfile.lock
included in the gist
-
If you are on 1.0, the result of bundle config
$ bundle config Settings are listed in order of priority. The top value will be used.
-
The command you ran to generate exception(s)
bundle exec ./bin/example-executable
-
The exception backtrace(s)
Not an exception, but notice the git errors. These are caused by git
git ls-files
commands in the .gemspec because the .gemspec is being evaluated in the current directory instead of the directory containing the .gemspec. Note the difference in behavior between running./bin/example-executable
andbundle exec ./bin/example-executable
Created
January 16, 2011 05:34
-
-
Save sumbach/781594 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkg/* | |
*.gem | |
.bundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'fileutils' | |
if ARGV.size > 0 | |
puts "Hello again" | |
exit | |
end | |
puts "Hello, World!" | |
puts "I'm going to run myself recursively from another directory now..." | |
executable = File.expand_path($0) | |
begin | |
temp_dir = "/tmp/example-gem-#{rand(1000)}" | |
FileUtils.mkdir_p temp_dir | |
Dir.chdir(temp_dir) do | |
system "#{executable} recursive" | |
end | |
ensure | |
FileUtils.rm_rf temp_dir | |
end | |
puts "I'm back!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding: utf-8 -*- | |
$:.push File.expand_path("../lib", __FILE__) | |
require "example-gem/version" | |
Gem::Specification.new do |s| | |
s.name = "example-gem" | |
s.version = Example::Gem::VERSION | |
s.platform = Gem::Platform::RUBY | |
s.authors = ["TODO: Write your name"] | |
s.email = ["TODO: Write your email address"] | |
s.homepage = "" | |
s.summary = %q{TODO: Write a gem summary} | |
s.description = %q{TODO: Write a gem description} | |
s.rubyforge_project = "example-gem" | |
s.files = `git ls-files`.split("\n") | |
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") | |
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } | |
s.require_paths = ["lib"] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Example | |
module Gem | |
# Your code goes here... | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "http://rubygems.org" | |
# Specify your gem's dependencies in example-gem.gemspec | |
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PATH | |
remote: . | |
specs: | |
example-gem (0.0.1) | |
GEM | |
remote: http://rubygems.org/ | |
specs: | |
PLATFORMS | |
ruby | |
DEPENDENCIES | |
example-gem! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler' | |
Bundler::GemHelper.install_tasks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Example | |
module Gem | |
VERSION = "0.0.1" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what's even worse is this means one cannot use these types of gems unless the gem directory has the proper .git directory in it.... sigh.