Coder Social home page Coder Social logo

bundler's People

Contributors

brentd avatar brynary avatar ddollar avatar drnic avatar halorgium avatar jbarnette avatar jeremy avatar manfred avatar mislav avatar shanna avatar sr avatar vandrijevik avatar wilson avatar wycats avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bundler's Issues

Doesn't work with Ruby 1.9

% ruby -v
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin10.0.0]
% gem -v
1.3.5
% gem install bundler
% mkdir myproject
% cd myproject
% echo "gem 'rails'" > Gemfile
% gem bundle
Calculating dependencies...
ERROR:  While executing gem ... (TypeError)
    can't convert Pathname into String

:(

Cloned the repo and ran the specs w/ 1.9 as well -- 88 failures.
For now maybe we can at least note in the README that bundler isn't compatible with Ruby 1.9 atm?

local gem cache directory

I would like to use the bundler with local gems that I manage manually. Right now, it is possible to accomplish this with the :vendored_at option, but that requires more than just placing the gem file in a directory, and adding a :cached_at option or something. Please make this possible and not suck.

Cross-platform deployment unsupported

I develop on Windows and deploy to Unix so gems that compile to platform-specific versions upon download to Windows are not appropriate for deployment to the remote Unix platform. It would be nice if Bundler had a solution for this.

Docs are vague

The following doc section is vague and inconsistent. Please elaborate:

Yet another way is to manually require the environment file first. This is located in [bundle_path]/environments/default.rb. For example:

ruby -r vendor/gems/environment.rb my_ruby_script.rb

Cache full index

Cache the entire index for some time in case a retry is needed.

Tries to update gem sources, even if all gems are in cache

The gems are all in the cache, but it insists on updating sources and re-downloading all gems. This is a regression, it did the right thing in 0.3.2.

To reproduce:

% gem bundle
Calculating dependencies...
Updating source: http://gems.rubyforge.org
Updating source: file:/home/rando/development/gems
Downloading addressable-2.1.0.gem
...
% rm -rf vendor/gems/specifications
% gem bundle
Calculating dependencies...
Updating source: http://gems.rubyforge.org

Adding github as a gem source raises error

When github is added as a source, an error is raised:

$ cat Gemfile
source 'http://gems.github.com'

gem 'nokogiri'

$ gem bundle
Updating source: http://gems.rubyforge.org
Updating source: http://gems.github.com
ERROR:  While executing gem ... (ArgumentError)
    comparison of String with 3 failed

However, without github, it works as advertised:
$ cat Gemfile
gem 'nokogiri'

$ gem bundle
Updating source: http://gems.rubyforge.org
Calculating dependencies...
Downloading nokogiri-1.3.3.gem
Installing nokogiri-1.3.3.gem
Building native extensions.  This could take a while...
Done.

handle prerelease gems fine

We have a webrat-0.4.4.racktest release we use internally while waiting for a new version of the gem to be released. When specifying the version above it fetches and installs webrat-0.4.4 instead of our prerelease version. If I just use gem install -i vendor/gems -v=0.4.4.racktest it behaves as expected.

Should be able to have a .gem directory source type

For example, tokyotyrant includes a .gemspec, but isn't on github or git or rubygems. It would be nice if I could build the rubygem myself, and copy the resulting pkg/tokyotyrant.gem into myapp/vendor/gems/cache, update the Gemfile, and have it able to be deployed without attempting to locate it on rubyforge.

logging messages

  • Update source XYZ
  • Resolving ...
  • Downloading foo-1.2
  • Installing foo-1.2
  • Done

RubyGems exception with gems.github.com as a source

% gem -v       
1.3.3

% ruby -v
ruby 1.8.7 (2009-06-08 patchlevel 173) [i686-linux]

% cat Gemfile
source "http://gems.github.com"
gem "sinatra-sinatra"
gem "thor"

% gem_bundler
Updating source: http://gems.rubyforge.org
Updating source: http://gems.github.com
/usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:297:in `>': comparison of String with 3 failed (ArgumentError)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:297:in `_load'
        from /home/simon/.gems/gems/bundler-0.0.1/lib/bundler/finder.rb:52:in `load'
        from /home/simon/.gems/gems/bundler-0.0.1/lib/bundler/finder.rb:52:in `fetch'
        from /home/simon/.gems/gems/bundler-0.0.1/lib/bundler/finder.rb:19:in `initialize'
        from /home/simon/.gems/gems/bundler-0.0.1/lib/bundler/finder.rb:19:in `each'
        from /home/simon/.gems/gems/bundler-0.0.1/lib/bundler/finder.rb:19:in `initialize'
        from /home/simon/.gems/gems/bundler-0.0.1/lib/bundler/manifest.rb:56:in `new'
        from /home/simon/.gems/gems/bundler-0.0.1/lib/bundler/manifest.rb:56:in `fetch'
        from /home/simon/.gems/gems/bundler-0.0.1/lib/bundler/manifest.rb:19:in `install'
        from /home/simon/.gems/gems/bundler-0.0.1/lib/bundler/manifest_file.rb:30:in `install'
        from /home/simon/.gems/gems/bundler-0.0.1/lib/bundler/cli.rb:18:in `run'
        from /home/simon/.gems/gems/bundler-0.0.1/lib/bundler/cli.rb:6:in `run'
        from /home/simon/.gems/gems/bundler-0.0.1/bin/gem_bundler:4
        from /home/simon/.gems/bin/gem_bundler:19:in `load'
        from /home/simon/.gems/bin/gem_bundler:19

Re-building bundled gems with native extensions after deploy

How are bundled gems with native extensions handled after deploy?

I asked wycats this question on #carlhuda, and he indicated that all that would need to be done is gem bundle on the remote server, and any bundled gems with extensions would be compiled (provided that build artifacts were properly ignored from source control and such).

Maybe I'm just doin' it wrong, but I didn't see this behavior when I tried a test deploy. Here's a shell session that hopefully demonstrates:

http://gist.github.com/181460

There is a dependency on rspec

If you don't have rspec installed you can't run

rake install

as it can't find:
'spec/rake/spectask'

This only came up for me because all my projects are bundled therefore there isn't much installed when i go gem list. only rake, thor & defunkt-github (dependencies)

relative paths don't work for --manifest option

Using a relative path with the --manifest option causes an error that results in empty executable files. I get this:

[manifest_file]
gem "rake"

% gem bundle -m manifest_file
Calculating dependencies...
Updating source: http://gems.rubyforge.org
Downloading rake-0.8.7.gem
Installing rake-0.8.7.gem
ERROR:  While executing gem ... (ArgumentError)
    different prefix: "/" and "bin"

And if you check /bin/rake it will be empty. The prefix error occurs in app_script.erb because of this line:

load File.join(File.dirname(__FILE__), "<%= path.join("gems", @spec.full_name, @spec.bindir, bin_file_name).relative_path_from(Pathname.new(bin_dir)) %>")

What's happening is that at this time 'path' (as in path.join) is a Pathname for the unexpanded manifest_file, whereas bin_dir is expanded. You can try this to illustrate the error:

Pathname.new("manifest_file").relative_path_from(Pathname.new("/"))  
# !> ArgumentError: different prefix: "" and "/"

Pathname.new("/manifest_file").relative_path_from(Pathname.new("/"))
# no error

The solution is easy. Patch Environment#load as follows:

diff --git a/lib/bundler/environment.rb b/lib/bundler/environment.rb
index fa9142f..0453216 100644
--- a/lib/bundler/environment.rb
+++ b/lib/bundler/environment.rb
@@ -9,7 +9,7 @@ module Bundler
     attr_writer :gem_path, :bindir

     def self.load(gemfile = nil)
-      gemfile = gemfile ? Pathname.new(gemfile) : default_manifest_file
+      gemfile = gemfile ? Pathname.new(File.expand_path(gemfile)) : default_manifest_file

       unless gemfile.file?
         raise ManifestFileNotFound, "#{filename.inspect} does not exist"

Sorry I don't have a fork/patch for you. I was having a hard time making a spec that fails for this issue... I'm not so familiar with Rspec.

After changing version number, wrong package install is attempted

I originally had a dependency declared on memcached 0.11. Since that was causing a Gem::InstallError, I changed the dependency to memcached 0.14, re-ran the bundler, and got this:

$ gem bundle
Calculating dependencies...
Updating source: http://gems.rubyforge.org
Downloading memcached-0.14.gem
Installing memcached-0.11.gem
ERROR:  While executing gem ... (Gem::InstallError)
    memcached requires RubyGems version = 1.2

It downloaded the right version, but then tried to install the old one. rm -fr-ing my bundle directory fixed it.

rake install broken

$ rake install
(in /Users/bhelmkamp/p/bundler)
mkdir -p pkg
WARNING:  no rubyforge_project specified
WARNING:  no summary specified
  Successfully built RubyGem
  Name: bundler
  Version: 0.0.1
  File: bundler-0.0.1.gem
mv bundler-0.0.1.gem pkg/bundler-0.0.1.gem
rake aborted!
uninitialized constant GEM
/Users/bhelmkamp/p/bundler/Rakefile:44
(See full trace by running task with --trace)

Generated executables should use relative paths to vendored gems

Currently, bundler creates code like this in the bin/ directory:

require "/full/path/to/vendor/gems/environments/default"
load "/full/path/to/vendor/gems/gems/chef-0.7.4/bin/chef-client"

This means that the bundle can't be used on another system unless it's placed in an identical directory structure. bundler should instead determine the correct paths at runtime using File.dirname(__FILE__) or some similar mechanism, i.e.:

require File.dirname(__FILE__) + "/../vendor/gems/environments/default"
load File.dirname(__FILE__) + "/../vendor/gems/gems/chef-0.7.4/bin/chef-client"

Cannot install newer versions of gems

Trying to bundle Rails 2.3.4 with:
gem "rails", "2.3.4"
leaves me with this:
Could not find gem 'rails (= 2.3.4, runtime)' in any of the sources

Seems like a bug since RubyGems itself has no trouble finding and installing the gem. I'm also having this problem with gems on github (try bundling bmabey-email_spec, 0.3.1).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.