Git Product home page Git Product logo

bundler's Introduction

RubyGems Maintainability

RubyGems is a package management framework for Ruby.

A package (also known as a library) contains a set of functionality that can be invoked by a Ruby program, such as reading and parsing an XML file. We call these packages "gems" and RubyGems is a tool to install, create, manage and load these packages in your Ruby environment.

RubyGems is also a client for RubyGems.org, a public repository of Gems that allows you to publish a Gem that can be shared and used by other developers. See our guide on publishing a Gem at guides.rubygems.org

Getting Started

Installing and managing a Gem is done through the gem command. To install a Gem such as Nokogiri which lets you read and parse XML in Ruby:

$ gem install nokogiri

RubyGems will download the Nokogiri Gem from RubyGems.org and install it into your Ruby environment.

Finally, inside your Ruby program, load the Nokogiri gem and start parsing your XML:

require 'nokogiri'

Nokogiri.XML('<h1>Hello World</h1>')

For more information about how to use RubyGems, see our RubyGems basics guide at guides.rubygems.org

Requirements

  • RubyGems supports Ruby 3.0 or later.

Installation

RubyGems is already installed in your Ruby environment, you can check the version you have installed by running gem --version in your terminal emulator.

In some cases Ruby & RubyGems may be provided as OS packages. This is not a recommended way to use Ruby & RubyGems. It's better to use a Ruby Version Manager, such as rbenv or chruby. If you still want to use the version provided by your OS package manager, please also use your OS package manager to upgrade rubygems, and disregard any other installation instructions given below.

If you would like to manually install RubyGems:

Install RubyGems by running:

$ ruby setup.rb

For more details and other options, see:

$ ruby setup.rb --help

Upgrading RubyGems

To upgrade to the latest RubyGems, run:

$ gem update --system

See UPGRADING for more details and alternative instructions.

Release policy

RubyGems and Bundler are released in sync, although they do not share their major version number. It is planned that also their major version numbers will be sync'ed in the future.

The release policy is somewhat similar to the release policy of Ruby itself:

  • Frequent patch releases (every 2-4 weeks) including bug fixes, minor enhancements, small features, or even medium sized features declared as experimental for battle testing.
  • Yearly minor releases including bigger features, and minor breaking changes (affecting only edge cases and a very small set of users).
  • Occasional major releases (replacing yearly minors) including major breaking changes.

Documentation

RubyGems uses rdoc for documentation. A compiled set of the docs can be viewed online at rubydoc.

RubyGems also provides a comprehensive set of guides which covers numerous topics such as creating a new gem, security practices and other resources at https://guides.rubygems.org

Getting Help

Filing Tickets

Got a bug and you're not sure? You're sure you have a bug, but don't know what to do next? In any case, let us know about it! The best place for letting the RubyGems team know about bugs or problems you're having is on the RubyGems issues page at GitHub.

Bundler Compatibility

See https://bundler.io/compatibility for known issues.

Supporting

RubyGems is managed by Ruby Central, a non-profit organization that supports the Ruby community through projects like this one, as well as RubyConf, RailsConf, and RubyGems.org. You can support Ruby Central by attending or sponsoring a conference, or by joining as a supporting member.

Contributing

If you'd like to contribute to RubyGems, that's awesome, and we <3 you. Check out our guide to contributing for more information.

Code of Conduct

Everyone interacting in the RubyGems project’s codebases, issue trackers, chat rooms, and mailing lists is expected to follow the contributor code of conduct.

bundler's People

Contributors

agis avatar agrim123 avatar asutoshpalai avatar bundlerbot avatar chrismo avatar colby-swandale avatar deivid-rodriguez avatar denniss avatar esasse avatar gnufied avatar homu avatar hone avatar hsbt avatar indirect avatar jeremy avatar josevalim avatar joshbuddy avatar koic avatar koronen avatar kou avatar nex3 avatar radar avatar rochesterinnyc avatar segiddins avatar sferik avatar spastorino avatar tenderlove avatar timmoore avatar who828 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  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

bundler's Issues

0.9.3: Rails executable exec format error

I created a new app. Did a bundle install. It installed all files to ~./bundle. So far so good.

I see 0.9.3 has a fix to put bundles bin files before system ones. I upgrade to 0.9.3. So far so good.

I run bundle exec rails, opps! :-(

/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.3/lib/bundler/cli.rb:112:in `exec': Exec format error - rails (Errno::ENOEXEC)
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.3/lib/bundler/cli.rb:112:in `exec'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.3/lib/bundler/vendor/thor/task.rb:32:in `send'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.3/lib/bundler/vendor/thor/task.rb:32:in `run'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.3/lib/bundler/vendor/thor/invocation.rb:108
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.3/lib/bundler/vendor/thor/invocation.rb:115:in `call'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.3/lib/bundler/vendor/thor/invocation.rb:115:in `invoke'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.3/lib/bundler/vendor/thor.rb:137:in `start'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.3/lib/bundler/vendor/thor/base.rb:369:in `start'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.3/lib/bundler/vendor/thor.rb:124:in `start'
from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/bundler-0.9.3/bin/bundle:4
from /opt/ree-latest/bin/bundle:19:in `load'
from /opt/ree-latest/bin/bundle:19

[NOT A BUG, resolved] 0.9.2 no such file to load --bundler

Hello,

UPDATE: It seems that was some dependences mess, originally introduced by rubygems1.9.1 package, which was installed firstly and reinstalled later on from sources as not working. The problem with it is that it actually does not add gem executables path to PATH, so one should fix it manually under ubuntu 9.10

What I've done so far: uninstalled ruby through apt, manually traced all possible locations for gems (including site_ruby) and removed them, got amused by endless possibilities for hiding things, and reinstalled ruby1.9.1-full and rubygems1.9.1 from apt (and added executable path to .bashrc)

Seems working nao.

Just got a 'situation', while trying rails3. My machine runs ubuntu 9.10 with ruby 1.9.1 installed from apt (ruby 1.9.1-full). Though I've installed bundler (it shows up in a gem list and executable works), I can't require it (and rails can't too)... Take a look:

moe@ingrid:/tmp/Test$ ruby -v
ruby 1.9.1p243 (2009-07-16 revision 24175) [i486-linux]
moe@ingrid:/tmp/Test$ gem list bundl*

*** LOCAL GEMS ***

bundler (0.9.2)
moe@ingrid:/tmp/Test$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'bundler'
LoadError: no such file to load -- bundler
    from (irb):2:in `require'
    from (irb):2
    from /usr/bin/irb:12:in `'
irb(main):003:0> exit
moe@ingrid:/tmp/Test$ bundle
Tasks:
  bundle check        # Checks if the dependencies listed in Gemfile are satisfied by currently installed gems
  bundle exec         # Run the command in context of the bundle
  bundle help [TASK]  # Describe available tasks or one specific task
  bundle init         # Generates a Gemfile into the current working directory
  bundle install      # Install the current environment to the system
  bundle lock         # Locks the bundle to the current set of dependencies, including all child dependencies.
  bundle pack         # Packs all the gems to vendor/cache
  bundle show         # Shows all gems that are part of the bundle.
  bundle unlock       # Unlock the bundle. This allows gem versions to be changed

moe@ingrid:/tmp/Test$ rails console
/tmp/Test/config/boot.rb:6:in `require': no such file to load -- bundler (LoadError)
    from /tmp/Test/config/boot.rb:6:in `rescue in '
    from /tmp/Test/config/boot.rb:2:in `'
    from /tmp/Test/script/rails:9:in `require'
    from /tmp/Test/script/rails:9:in `'
moe@ingrid:/tmp/Test$ 

With Bundled gems, initialization fails to find the Rails gem

Tried 0.8.1 and 0.9pre5.

When bundler is installed on Rails 2.3.5, with a preinitializer.rb as follows: https://gist.github.com/bd3f78221df92302bacc

the app fails to load on passenger 2.2.9 / mongrel with the message:

Missing the Rails 2.3.5 gem. Please gem install -v=2.3.5 rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

Bundler 0.9.1 missed tmail dependency of rails 2.3.5, and prerelease gems problem

Hello,

I just installed bundler via an fresh clone and rake install and had it bundle the gems from the following Gemfile
http://gist.github.com/295102
It missed the rails dependecy to "tmail" without which the server wouldn't start. Uncommenting the respective line in the Gemfile made it work. I don't know where the reason for this lies, but shouldn't have bundler picked this dependency up?

Also, using the same Gemfile I tried to run rake, bundler failed because the prerelease? method was undefined on at least one of the gems. I patched resolver.rb and index.rb, which worked for me. Carefull: I did not add any tests.
Fork is here:
http://github.com/shageman/bundler

"Recommended" bundler preinit for Rails 2.3 breaks Rails

Using the recommended preinitializer:
begin
# Require the preresolved locked set of gems.
require File.expand_path('../vendor/environment', FILE)
rescue LoadError
# Fallback on doing the resolve at runtime.
require "rubygems"
require "bundler"
Bundler.setup
end

gives the following errors on script/console and similar on unicorn_rails:
$ script/console
Loading development environment (Rails 2.3.5)
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/cgi_ext/stdinput.rb:14:in included':NoMethodError: undefined methodalias_method_chain' for CGI:Class
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view.rb:58:NameError: uninitialized constant I18n
/Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/console_with_helpers.rb:5:NameError: uninitialized constant ApplicationController

0.9.1 breaks gem capability on windows running 1.9.1p243

I did a 'gem outdated' and 'gem update' cycle this morning on my system this morning and was rewarded with the following mess. It appears that if you have bundler previously installed, the 0.9.1 version will be installed with it's warning, but the install strands you by making other gem commands exception out.

Note that this did not happen for me when first uninstalling bundler then installing the new version.

You never know that you need to manually uninstall bundler before installing until you've already installed the new version. By then it's too late as you can see from the following sequence.

Now I need to waste my time to manually clean this mess up. Is this scenario windows only? If yes, did you test on windows before releasing?

C:\Documents and Settings\Jon\My Documents>ruby --version
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]

C:\Documents and Settings\Jon\My Documents>gem update
Updating installed gems
Updating bundler
Due to a rubygems bug, you must uninstall all older versions of bundler for 0.9 to work
Successfully installed bundler-0.9.1
Updating thor
Successfully installed thor-0.13.0
Gems updated: bundler, thor

[OK, let's follow the warning's directions...]

C:\Documents and Settings\Jon\My Documents>gem cleanup
D:/ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.8.1/lib/rubygems_plugin.rb:2:in require': no such file to load -- bundler/commands/bundle_command (LoadError) from D:/ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.8.1/lib/rubygems_plugin.rb:2:in <top (required)>'
from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1136:in load' from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1136:inblock in <top (requir
ed)>'
from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1134:in each' from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1134:in<top (required)>'
from internal:gem_prelude:225:in require' from <internal:gem_prelude>:225:inload_full_rubygems_library'
from internal:gem_prelude:324:in const_missing' from D:/ruby19/bin/gem:12:in

'

[....very nice...let's figure out what previous versions I have...]

C:\Documents and Settings\Jon\My Documents>gem list
D:/ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.8.1/lib/rubygems_plugin.rb:2:in require': no such file to load -- bundler/commands/bundle_command (LoadError) from D:/ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.8.1/lib/rubygems_plugin.rb:2:in <top (required)>'
from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1136:in load' from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1136:inblock in <top (requir
ed)>'
from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1134:in each' from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1134:in<top (required)>'
from internal:gem_prelude:225:in require' from <internal:gem_prelude>:225:inload_full_rubygems_library'
from internal:gem_prelude:324:in const_missing' from D:/ruby19/bin/gem:12:in

'

[...sodding lovely...ok, let's just force things...]

C:\Documents and Settings\Jon\My Documents>gem uninstall bundler --version '0.8.1'
D:/ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.8.1/lib/rubygems_plugin.rb:2:in require': no such file to load -- bundler/commands/bundle_command (LoadError) from D:/ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.8.1/lib/rubygems_plugin.rb:2:in <top (required)>'
from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1136:in load' from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1136:inblock in <top (requir
ed)>'
from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1134:in each' from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1134:in<top (required)>'
from internal:gem_prelude:225:in require' from <internal:gem_prelude>:225:inload_full_rubygems_library'
from internal:gem_prelude:324:in const_missing' from D:/ruby19/bin/gem:12:in

'

[...??!!???!@@@!!!??...]

C:\Documents and Settings\Jon\My Documents>gem environment
D:/ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.8.1/lib/rubygems_plugin.rb:2:in require' such file to load -- bundler/commands/bundle_command (LoadError) from D:/ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.8.1/lib/rubygems_plugin.rb:2 <top (required)>'
from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1136:in load' from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1136:inblock in <top (re
ed)>'
from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1134:in each' from D:/ruby19/lib/ruby/site_ruby/1.9.1/rubygems.rb:1134:in<top (required)>'
from internal:gem_prelude:225:in require' from <internal:gem_prelude>:225:inload_full_rubygems_library'
from internal:gem_prelude:324:in const_missing' from D:/ruby19/bin/gem:12:in

'

"source index not created from disk" with 0.9.3 and Rails 2.3.5

After upgrading to bundler 0.9.3, I get a RuntimeError when running script/server and friends.

/Users/kamal/.rvm/ruby-1.8.7-p174/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:344:in `refresh!': source index not created from disk (RuntimeError)
  from /Users/kamal/.rvm/gems/ruby/1.8.7/gems/rails-2.3.5/lib/rails/vendor_gem_source_index.rb:34:in `refresh!'
  from /Users/kamal/.rvm/gems/ruby/1.8.7/gems/rails-2.3.5/lib/rails/vendor_gem_source_index.rb:29:in `initialize'
  from /Users/kamal/.rvm/gems/ruby/1.8.7/gems/rails-2.3.5/lib/rails/gem_dependency.rb:21:in `new'
  from /Users/kamal/.rvm/gems/ruby/1.8.7/gems/rails-2.3.5/lib/rails/gem_dependency.rb:21:in `add_frozen_gem_path'
  from /Users/kamal/.rvm/gems/ruby/1.8.7/gems/rails-2.3.5/lib/initializer.rb:298:in `add_gem_load_paths'
  from /Users/kamal/.rvm/gems/ruby/1.8.7/gems/rails-2.3.5/lib/initializer.rb:132:in `process'
  from /Users/kamal/.rvm/gems/ruby/1.8.7/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
  from /Users/kamal/.rvm/gems/ruby/1.8.7/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
  from /Volumes/client/app/config/environment.rb:9
  from /Users/kamal/.rvm/gems/ruby/1.8.7/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
  from /Users/kamal/.rvm/gems/ruby/1.8.7/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
  from /Users/kamal/.rvm/gems/ruby/1.8.7/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
  from /Users/kamal/.rvm/gems/ruby/1.8.7/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
  from /Users/kamal/.rvm/gems/ruby/1.8.7/gems/rails-2.3.5/lib/commands/server.rb:84
  from ./script/server:3:in `require'
  from ./script/server:3

With 0.9.2, I could run ./script/server with no problems.

Excessive warning output on environment load

Under RVM 1.9.1, whenever I require the bundler environment, errors paired with gemspecs continuously print out to stderr.

WARNING:  #<NoMethodError: undefined method `>' for nil:NilClass>
# -*- encoding: utf-8 -*-
(...gemspec prints here entirely...)
WARNING:  Invalid .gemspec format in \
'.rvm/gems/ruby-1.9.1-p378/specifications/spec.gemspec'

Repeat.

At the end, I get a couple dozen warnings for "already initialized constant".

Hundreds of lines of output, in all (and all silenced when 2>/dev/null).

This has been occurring since Bundler 0.9.beta3 on Rails 3.0.pre and now Rails 3.0.0.beta with the latest Bundler 0.9.2. It occurs for script/{console,server} and bundle exec [ruby] script/{console,server} and bundle exec zsh; script/{console,server} all the same.

Selectively source system gems

Any thoughts on the ability to specify a gem as having a :system source?

I have an issue where I want to deploy an app with some gems installed in its vendor repo, but be able to selectively pull in system gems. (e.g. those with native extensions) additionally I don't necessarily need or want bundler to manage installation or upgrade of these, but merely make sure that they are accessible. The only way I can see this being possible now is by adding a path to the gem, pointing to where it is already installed.

mongo_ext can't be loaded

I added both mongo and mongo_ext to Gemfile. When I run Rails, it dies, because bundler can't find mongo_ext. However, mongo_ext is automatically loaded by mongo gem. If I remove mongo_ext, Rails loads, but C extension is not available.

I think bundler should allow adding gems that are not loaded by default or detect those not loadable gems somehow.

gem bundle doesnt work when you only have the latest prerelease version of the gem installed

Checkout edge rails, install the latest prerelease version of bundler, then type gem bundle in the edge rails app directory.

The first error you'd get looks like this: http://gist.github.com/292143

If you type gem cleanup bundler, then type gem bundle in the edge rails app directory, then this will happen: http://gist.github.com/292154

Is rubygems unable to pick up a gem plugin if it's in a prerelease gem? Or am I just getting ahead of myself while edge rails and bundler are in a state of flux? :) Either way, its not currently working

bundle lock makes bad assumptions for deployment

the LOAD_PATHS in .bundle/environment.rb hardcode the current users's home directory so locking is not a valid plan for deployment. Perhaps I'm misunderstanding the purpose of this feature though.

Can't find bundler env file

Read me preinitializer line:
require File.expand_path('../.bundle/environment', FILE)

Should be:
require File.expand_path('../../.bundle/environment', FILE)

If you want it to actually find the file.

rubygems: warning: already initialized constant...

Output from latest master:

% rails console
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems.rb:14: warning: already initialized constant VERSION
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems.rb:14: warning: already initialized constant RubyGemsVersion
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems.rb:194: warning: already initialized constant MUTEX
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems.rb:196: warning: already initialized constant RubyGemsPackageVersion
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems.rb:202: warning: already initialized constant WIN_PATTERNS
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems.rb:1079: warning: already initialized constant MARSHAL_SPEC_DIR
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems.rb:1084: warning: already initialized constant YAML_SPEC_DIR
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/version.rb:72: warning: already initialized constant VERSION_PATTERN
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb:20: warning: already initialized constant OPS
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/requirement.rb:30: warning: already initialized constant OP_RE
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/version.rb:246: warning: already initialized constant Requirement
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:18: warning: already initialized constant TYPES
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb:171: warning: already initialized constant RUBY
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/platform.rb:177: warning: already initialized constant CURRENT
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:39: warning: already initialized constant NONEXISTENT_SPECIFICATION_VERSION
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:50: warning: already initialized constant CURRENT_SPECIFICATION_VERSION
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:56: warning: already initialized constant SPECIFICATION_VERSION_HISTORY
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:72: warning: already initialized constant MARSHAL_FIELDS
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:75: warning: already initialized constant TODAY
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:593: warning: already initialized constant Cache
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:14: warning: already initialized constant DEFAULT_BACKTRACE
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:15: warning: already initialized constant DEFAULT_BENCHMARK
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:16: warning: already initialized constant DEFAULT_BULK_THRESHOLD
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:17: warning: already initialized constant DEFAULT_VERBOSITY
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:18: warning: already initialized constant DEFAULT_UPDATE_SOURCES
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:24: warning: already initialized constant OPERATING_SYSTEM_DEFAULTS
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:30: warning: already initialized constant PLATFORM_DEFAULTS
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:53: warning: already initialized constant SYSTEM_WIDE_CONFIG_FILE
~/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:474: warning: already initialized constant HELP
Loading development environment (Rails 3.0.0.beta1)
>> 

Bundler.logger does not exist

I have defined a gem source server that does not support prerelease gems. So the bundle install command(version 0.9.2) throws this error:
/Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/source.rb:62:in prerelease_specs': undefined methodlogger' for Bundler:Module (NoMethodError)
from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/source.rb:44:in fetch_specs' from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/source.rb:23:inspecs'
from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/installer.rb:102:in index' from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/installer.rb:101:ineach'
from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/installer.rb:101:in index' from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/installer.rb:66:inresolve_remotely'
from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/installer.rb:36:in specs' from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/installer.rb:15:inrun'
from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/installer.rb:6:in install' from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/cli.rb:54:ininstall'
from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/vendor/thor/task.rb:32:in send' from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/vendor/thor/task.rb:32:inrun'
from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/vendor/thor/invocation.rb:108:in invoke' from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/vendor/thor/invocation.rb:115:incall'
from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/vendor/thor/invocation.rb:115:in invoke' from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/vendor/thor.rb:137:instart'
from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/vendor/thor/base.rb:369:in start' from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/lib/bundler/vendor/thor.rb:124:instart'
from /Library/Ruby/Gems/1.8/gems/bundler-0.9.2/bin/bundle:4
from /usr/bin/bundle:19:in `load'
from /usr/bin/bundle:19

undefined method `setup' for Bundler:Module

I get the following error:

undefined method `setup' for Bundler:Module

When using bundler (0.9.1.pre1) with no other versions of bundler installed.

This is in a Rails 2.3.5 application. I have the recommended initializer in config/preinitializer.rb.

HAML views broken

Hi,

It seems that HAML isn't working properly with Bundler. No views or layouts are working with HAML although ERB seems to be working ok.

No such file to load -- set

Attempting to use bundler-0.9.2 and I'm getting this error:
bundler-0.9.2/lib/bundler/resolver.rb:1:in `require': no such file to load -- set (LoadError)

Anybody else experience this or have any idea?

native extension failure if running bundle install first time

If:

  • your system gem repository is empty (or lacking 'rake'... mostly because you specify an empty install-path) AND
  • you specify a gem that requires native compilation (eg: ffi or mysql) AND
  • that gem comes alphabetically before 'rake'

Then installation fails because rake is not found.

Cannot lock specific groups

So if you run "bundle install --without test production" it barfs when you try to run bundle lock. barfs = complaining about missing gems from test or production.

Uninitialized constant...

Trying to upgrade a 2.3.5 app to the newest bundler pre and am getting 'uninitialized constant...'. I have my preinitializer pointing to the env file in the vendor directory and still no love...

Rails passes the current environment group as string, documentation hints at a symbol?

Trying to get some test-environment-only gems working with the new Rails beta, I did something along the lines of:

group :test do
  gem "factory_girl"
end

just as the commented out sample suggested. Eventually, I figured that wasn't working because Rails is passing in the current environment as a group, but it's passing in a string, not a symbol (config/application.rb#6 in my app here).

I guess it's a matter of taste, but personally I reckon bundler should force the group name into a consistent type before comparison so it doesn't matter if it's a string or a symbol being passed in?

Thanks!

ENV does not accept Pathname directly in 1.9

$ bundle exec ruby -v
/Users/sakuro/.rvm/gems/mput-head/gems/bundler-0.9.3/lib/bundler/cli.rb:103:in `[]=': can't convert Pathname into String (TypeError)
    from /Users/sakuro/.rvm/gems/mput-head/gems/bundler-0.9.3/lib/bundler/cli.rb:103:in `exec'

In Bundler 0.9.3 with Ruby 1.9, assigning Pathname to ENV fails since Pathname does not have to_str. Explicit to_s will be needed.

# Set BUNDLE_GEMFILE
ENV['BUNDLE_GEMFILE'] = Bundler.default_gemfile

Bundler is stuck when there are sources specified

Gemfile.

 gem "rails", git: "git://github.com/rails/rails.git"
 git "git://github.com/rails/arel.git"
 git "git://github.com/rails/rack.git"

 source "http://gemcutter.org/"
 source "http://gems.rubyforge.org/"

 #any other gems you need
 gem 'sqlite3-ruby'


 sam@sam-ubuntu:~/Source/testapp$ bundle install
 Source: Updating `git://github.com/rails/rails.git`... Done.
 Source: Processing index... Done.
 Source: Updating `git://github.com/rails/arel.git`... Done.
 Source: Processing index... Done.
 Source: Updating `git://github.com/rails/rack.git`... Done.
 Source: Processing index... Done.
 Source: Fetching remote index for `http://gemcutter.org/`... done.
 Source: Processing index... ^C/home/sam/.rvm/ruby-1.9.2-     head/lib/ruby/1.9.1/net/protocol.rb:137:in `select': Interrupt
    from /home/sam/.rvm/ruby-1.9.2-head/lib/ruby/1.9.1/net/protocol.rb:137:in `rescue in rbuf_fill'
    from /home/sam/.rvm/ruby-1.9.2-head/lib/ruby/1.9.1/net/protocol.rb:134:in `rbuf_fill'
    from /home/sam/.rvm/ruby-1.9.2-head/lib/ruby/1.9.1/net/protocol.rb:116:in `readuntil'
    from /home/sam/.rvm/ruby-1.9.2-head/lib/ruby/1.9.1/net/protocol.rb:126:in `readline'
    from /home/sam/.rvm/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:2207:in `read_status_line'
    from /home/sam/.rvm/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:2196:in `read_new'
    from /home/sam/.rvm/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:1179:in `transport_request'
    from /home/sam/.rvm/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:1165:in `request'
    from /home/sam/.rvm/ruby-1.9.2-head/lib/ruby/1.9.1/rubygems/remote_fetcher.rb:327:in `request'
    from /home/sam/.rvm/ruby-1.9.2-head/lib/ruby/1.9.1/rubygems/remote_fetcher.rb:279:in `open_uri_or_path'
    from /home/sam/.rvm/ruby-1.9.2-head/lib/ruby/1.9.1/rubygems/remote_fetcher.rb:164:in `fetch_path'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/remote_specification.rb:43:in `_remote_specification'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/remote_specification.rb:50:in `method_missing'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/index.rb:52:in `flatten'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/index.rb:52:in `each'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/index.rb:58:in `merge!'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/index.rb:23:in `initialize_copy'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/index.rb:65:in `dup'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/index.rb:65:in `merge'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/installer.rb:112:in `block in index'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/installer.rb:109:in `each'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/installer.rb:109:in `index'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/installer.rb:71:in `resolve_remotely'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/installer.rb:36:in `specs'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/installer.rb:22:in `run'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/installer.rb:6:in `install'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/cli.rb:56:in `install'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/vendor/thor/task.rb:32:in `run'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/vendor/thor/invocation.rb:108:in `block in invoke'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/vendor/thor/invocation.rb:115:in `call'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/vendor/thor/invocation.rb:115:in `invoke'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/vendor/thor.rb:139:in `block in start'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/vendor/thor/base.rb:354:in `start'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/lib/bundler/vendor/thor.rb:126:in `start'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/gems/bundler-0.9.0.pre4/bin/bundle:4:in `<top (required)>'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/bin/bundle:19:in `load'
    from /home/sam/.rvm/gems/ruby-1.9.2-head/bin/bundle:19:in `<main>'

No such file to load -- rails

I'm using the latest version from this repo and I get this:

.bundle/environment.rb:13:in `require': no such file to load -- rails

Any idea of what may be causing this ?

Bundler does not respect $GEM_HOME

Not sure if this is a bug or not.

I'm using rvm which manages its own gemsets. So if you do 'bundle install', Bundler's default location (in head, as of today) of ~/.bundle means the gems can't be found. Currently I'm having to do:

% bundle install $GEM_HOME

To get the rvm Ruby to see them.

Wayne Seguin seems to think 0.9.3 behaviour was supposed to be to use $GEM_HOME. What's the correct behaviour here?

Cheers - Ashley

bundle exec / cli.rb / TypeError

ruby-1.9.1-p376/lib/ruby/gems/1.9.1/gems/bundler-0.9.3/lib/bundler/cli.rb:103:in `[]=': can't convert Pathname into String (TypeError)

diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index ac313d6..bb614d8 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -100,7 +100,7 @@ module Bundler
       ENV["PATH"] = paths.uniq.join(File::PATH_SEPARATOR)

       # Set BUNDLE_GEMFILE
-      ENV['BUNDLE_GEMFILE'] = Bundler.default_gemfile
+      ENV['BUNDLE_GEMFILE'] = Bundler.default_gemfile.to_s

       # Set RUBYOPT
       rubyopt = [ENV["RUBYOPT"]].compact

MultiRuby Support: Want native gems with differnt ABI coexist

I am using @wayneeseguin's rvm(Ruby version manager) and have 1.8.7 and mput a.k.a. @shyouhei's git clone of svn trunk istalled.
When I install sqlite3 via 'bundle install' while I am using 1.8.7($ rvm use 1.8.7), and later I switch to mput's($ rvm use mput), bundler still tries to use the library compiled with 1.8.7, which results(in MacOSX Snow Leopard):

dyld: lazy symbol binding failed: Symbol not found: _rb_str2cstr
Referenced from: /Users/sakuro/.bundle/gems/sqlite3-ruby-1.2.5/lib/sqlite3_api.bundle Expected in: flat namespace

No problem of course if I install such lib with each ruby separatedly without help of bundler.

Recursive Gemfiles

It would be nice to see some way of using Gemfiles recursively. So that I can make a gem containing a Gemfile which gets evaluated even if the gem is not a top level dependency.

  • Simon

permission problems with git source

If used with a user without root access (say deploy user) the git dependencies are unpacked in a read-only directory.

Error is the following:

Source: Updating git://github.com/rails/rails.git... error: cannot open FETCH_HEAD: Permission denied

Feature Request: Easy way to directly use local git checkout with bundler

I have a common pattern when developing apps of working on plugins (gems) while I develop the app. On Bundler 0.7 and the old merb:gem thor tasks, I used to just bundle everything up, then symlink the gems/gems/[gem_name] over to my local working directory of that gem source. Everything ran great

Trying to repeat this process with Bundler and traced the git checkouts over to ~/.bundle/bundler/gems/gemname-XXXXXXXXXX. I went ahead and removed that folder and symlinked it back to my original gem source directory (actually defined by the :git options) and everything worked great. However, sort of ran in one big circle here to get back to what I wanted in the first place (just a simple link to that directory).

So... I'd suggest that an awesome feature for bundler would be a way to swap between local and git easily using a simple config. Example:

# Gemfile
gem "my_plugin", :git => "~/Gems/my_plugin"

If I'm in dev mode, I'd love a way to flag bundler to just use that directory directly (putting the load paths there as if that was the actual gem directory). Maybe something like :dev => true option on the gem. Or maybe some sort of command in the Gemfile (like use_local_git) that would convert all local git paths to reference the actual files.

RubyGem version error: bundler(0.9.3 not ~> 0.8.1) when running dev_appserver.rb

Attempted to run dev_apserver and got the following error:
C:\RailsProjects\SunsetsDM>dev_appserver.rb.bat .
=> Booting DevAppServer
=> Press Ctrl-C to shutdown server
=> Installing JRuby
=> Installing JRuby-Rack
=> Installing appengine-sdk
=> Generating configuration files
C:/Program Files/NetBeans 6.8/ruby2/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31
:in `require': no such file to load -- .gems/bundler_gems/jruby/1.8/environment (LoadError)

Upgraded to bundler 0.9.3 and am now getting the following error.

C:/Program Files/NetBeans 6.8/ruby2/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems.rb:827:in `report_ac
tivate_error': RubyGem version error: bundler(0.9.3 not ~> 0.8.1) (Gem::LoadError)

Any ideas out there?

Bundler can't bundle private github repos

% bundle install
/home/rando/.rvm/ruby-1.8.7-p248/lib/ruby/1.8/uri/common.rb:436:in `split': bad URI(is not URI?): [email protected]:absperf/rack-ssbe_auth.git (URI::InvalidURIError)
from /home/rando/.rvm/ruby-1.8.7-p248/lib/ruby/1.8/uri/common.rb:485:in `parse'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/source.rb:263:in `uri_hash'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/source.rb:267:in `cache_path'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/source.rb:271:in `cache'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/source.rb:205:in `specs'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/installer.rb:94:in `index'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/installer.rb:93:in `each'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/installer.rb:93:in `index'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/installer.rb:66:in `resolve_remotely'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/installer.rb:36:in `specs'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/installer.rb:15:in `run'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/installer.rb:6:in `install'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/cli.rb:54:in `install'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/vendor/thor/task.rb:32:in `send'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/vendor/thor/task.rb:32:in `run'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/vendor/thor/invocation.rb:108
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/vendor/thor/invocation.rb:115:in `call'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/vendor/thor/invocation.rb:115:in `invoke'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/vendor/thor.rb:137:in `start'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/vendor/thor/base.rb:369:in `start'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/lib/bundler/vendor/thor.rb:124:in `start'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/gems/bundler-0.9.2/bin/bundle:4
from /home/rando/.rvm/gems/ruby-1.8.7-p248/bin/bundle:19:in `load'
from /home/rando/.rvm/gems/ruby-1.8.7-p248/bin/bundle:19

Specification gets loaded_from set to a Pathname

The Specification#loaded_from sometimes returns a String and sometimes returns a Pathname. In Rails 2.3.5 (vendor_gem_source_index.rb:40), we have this code...

spec.loaded_from.empty?

There is no Pathname#empty?, so it looks like the Rails code is expecting a String.

I'm not sure who's to blame here. Maybe the Rails code shouldn't be assuming a String. If that's the case, feel free to reject and I will post an issue to Rails.

Using bundler 0.8 returns "stack level too deep" error

Hello,

Been stuck on this for days now.
I'm using bundler 0.8 (cannot use 0.9 since i'm deploying on heroku)
When I try to start my Rails 2.3.5 app with sqlite I get the error:

$ ruby script/server
=> Booting Mongrel
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Error during failsafe response: stack level too deep
Fri Feb 05 20:27:02 -0600 2010: Read error: #<NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each>
c:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/utils.rb:196:in `initialize'
c:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:14:in `new'
c:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:14:in `call'
c:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/chunked.rb:15:in `call'
c:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:64:in `process'
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in `process_client'
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `each'
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `process_client'
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run'
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `initialize'
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `new'
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run'
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `initialize'
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `new'
c:/Ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `run'
c:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:34:in `run'
c:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:111
c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
script/server:3

My Gemfile looks like this:
bundle_path 'vendor/bundler_gems'

gem 'scrubyt', '0.4.06'
gem 'firewatir', '1.6.5'

My preinitializer.rb looks like this:
require "#{File.dirname(FILE)}/../vendor/bundler_gems/environment"

class Rails::Boot
  def run
    load_initializer
    extend_environment
    Rails::Initializer.run(:set_load_path)
  end

  def extend_environment
    Rails::Initializer.class_eval do
      old_load = instance_method(:load_environment)
      define_method(:load_environment) do
        Bundler.require_env RAILS_ENV
        old_load.bind(self).call
      end
    end
  end
end

Thanks!

Replacement for --build-options command line option

How can one specify command line options for bundler. In 0.8, one could use --build-options and give it a yaml file but that does not seem to work in 0.9. I did try:

bundle install --build-options build-options.yml

and it does not work.

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.