Every repository with this icon (
Every repository with this icon (
| Description: | edit |
-
1 comment Created 2 months ago by carllercheRun the bundler when the Gemfile changesfeaturexUse mtime to see if bundler needs to run
Comments
-
1 comment Created about 1 month ago by jeremyGit sources should update with gem bundle --updatefeaturexIf you change the gemspec in a git repos, gem bundle --update doesn't notice it because the git clone isn't updated.
This changes the git source to clone the repos if the checkout is missing and to fetch origin if present. In both cases, the desired ref is checked out. Thus gem bundle --update ensures the git branch and its gemspec are up-to-date.
http://github.com/jeremy/bundler/commit/155e2f09658e1b4f8ac8e1f4e15a1b02e92a6dee
Comments
Branch from wycats/master at http://github.com/jeremy/bundler/tree/git-source-update
-
Bundler is incompatible with Ruby older than 1.8.7
2 comments Created 16 days ago by carlhudaDue to use of Symbol#to_proc: keys = %w(vendored_at path only except git path bundle require_as tag branch ref).map(&:to_sym)
dsl.rb:85
Comments
It must have taken you more to open this ticket than to change the line in question :/
carllerche
Sun Dec 13 21:54:39 -0800 2009
| link
The ticket is also to remind us to do a full sweep for any other incompatibilities ;) that, and i'm lazy
-
I noticed a problem that comes up with some gems such as after_commit. I posted a gist here with the details: https://gist.github.com/039d9e5ce54f4a11ce70. It seems like some gems when loaded assume that Rails has already been loaded... in the case of after_commit it tries to include a module in all the subclasses of ActiveRecord::ConnectionAdapters::AbstractAdapter; however, since gem bundler loads the after_commit.rb library before Rails has figured out which subclasses of AbstractAdapter to initialize (MysqlAdapter in my case), the module is not included and breaks my app.
I can't figure out if this is a problem with gem bundler for changing gem load order... or a problem with a bunch of gems out there that /assume/ a certain load order. In any case it seems like the community needs to agree on how to go about Rails gem development.
Comments
agibralter
Tue Nov 24 14:28:23 -0800 2009
| link
Ok... so I changed the preinitializer hack to http://gist.github.com/242240 ... now the problems associated with gems assuming the load order associated with config.gem go away.
manuelmorales
Mon Dec 14 09:50:45 -0800 2009
| link
It seems that I'm getting a loading order problem too. Looks like calendar_date_select and faker gems require Rails to be loaded first:
/home/manuel/scrum/teamtrick/vendor/bundler_gems/gems/calendar_date_select-1.15/lib/calendar_date_select.rb:6:NameError: uninitialized constant ActionView::Helpers::FormHelper
However, the Aaron Gibralter fix (http://gist.github.com/242240/) didn't work for me.
Any clue?
agibralter
Mon Dec 14 14:33:15 -0800 2009
| link
Does calendar_date_select work with the config.gem method? If so, what does your line look like in environment.rb?
manuelmorales
Tue Dec 15 01:29:06 -0800 2009
| link
Thanks for answering Aaron. My environment.rb looked like this:
RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION require File.join(File.dirname(__FILE__), 'boot') Rails::Initializer.run do |config| config.gem 'calendar_date_select' config.gem "faker" config.gem "populator" ...I deleted the config.gem entries and moved them to the Gemfile like this:
bundle_path "vendor/bundler_gems" disable_system_gems gem 'rails', '2.3.5' gem "sqlite3-ruby", :require_as => 'sqlite3' gem "calendar_date_select" gem "faker" gem "populator" ...And now, both gems, calendar_date_select and populator, are throwing errors because they miss Rails.
agibralter
Tue Dec 15 06:58:53 -0800 2009
| link
Does your preinitializer.rb look like this: http://gist.github.com/242240/ ?
Are you using passenger? When do you get the NameError you pasted above?
manuelmorales
Tue Dec 15 07:05:35 -0800 2009
| link
preinitializer.rblooks exactly like that. I get that error when I runscript/console. And a similar error when runningrake db:migrateorscript/server. I'm not using passenger.
agibralter
Tue Dec 15 07:11:11 -0800 2009
| link
By any chance, do you have a vendor/rails directory? If Rails's boot.rb sees the directory (even if it's empty), it will attempt a VendorBoot rather than a GemBook. I switched from using a vendor-Rails system to gem bundler and had a similar problem.
manuelmorales
Tue Dec 15 07:14:28 -0800 2009
| link
nope, all I got inside vendor are the following directories: bundler_gems, curvycorners, originals and plugins.
: (
agibralter
Tue Dec 15 07:19:33 -0800 2009
| link
The best thing that I can recommend for this sort of thing is to put:
require 'ruby-debug' debugger
at the beginning of boot.rb's boot! method. Step through the boot process and try to figure out when things are getting loaded. Maybe there's a problem with order... You may have to get rid of
disable_system_gemsfor the time being so that you can useruby-debug. It's entirely possible that the gem is not designed too well in terms of its load-order assumptions. But you won't be able to figure that out for sure unless you step through...
manuelmorales
Tue Dec 15 07:24:49 -0800 2009
| link
Ok, I'll take a look at that. I'll write here if I find the solution. Thanks for your time Aaron.
agibralter
Tue Dec 15 07:29:46 -0800 2009
| link
no problem -- good luck!
-
2 comments Created about 1 month ago by devwoutError installing gems with a bin dir on jrubyjrubyxERROR: While executing gem ... (TypeError)
wrong argument type Pathname (expected String)The problem is reproducable for any gem that wants to install binaries (rake, rails, ...)
The solution:
diff --git a/lib/bundler/repository.rb b/lib/bundler/repository.rb index 418ecbb..6333f6f 100644 --- a/lib/bundler/repository.rb +++ b/lib/bundler/repository.rb @@ -130,7 +130,7 @@ module Bundler installer = Gem::Installer.allocate installer.instance_eval do @spec = spec - @bin_dir = bin_dir + @bin_dir = bin_dir.to_s @gem_dir = path.join("gems", "#{spec.full_name}") @gem_home = path @wrappers = trueThe problem is jruby only accepts strings as argument of Dir.mkdir, while MRI will accept anything it can convert to a String. Bundler uses a Pathname object for the bin dir.
Comments
would be nice to see this one fixed in bundler. but the problem was also fixed with jruby 1.4. take a look at: http://jira.codehaus.org/browse/JRUBY-4179
hope you're able to upgrade. -
0 comments Created 2 months ago by carllercheConfusing error when using :git and no access to the repositoryerror messagexComments
-
0 comments Created 2 months ago by jeremybad :vendored_at path shows up as different errorerror messagexGive an invalid vendored_at path and gem bundle will give you an error saying the gemspec's require_lib is bad, when really the path to it is
Comments
-
http://github.com/jeremy/bundler/commit/1ee81efd8822dd5776df9630b0eb086983ad1cdc
http://github.com/jeremy/bundler/commit/eba16636e86c54a3a0118aa6b0113453bc49e359Comments
Wrapped up at http://github.com/jeremy/bundler/tree/multiruby
Bundler generates an environment that respects the ruby engine and version. The toplevel environment.rb delegates to the platform-specific environment.
-
Raise an error if a gem source is defined twice
0 comments Created 16 days ago by carlhudaComments
-
0 comments Created about 1 month ago by carllercheAdd ENV variable support to build optionsfeaturexENV vars such as ARCHFLAGS
Comments
-
:bundle => false does not work correctly with disable_system_gems
0 comments Created 18 days ago by carlhudaComments
-
gem bundle should always verify and update symlinks
0 comments Created 18 days ago by carlhudaComments
-
In a deploy scenario, it would be nice to be able to symlink vendor/gems to a shared location.
Comments
vandrijevik
Wed Dec 09 18:49:37 -0800 2009
| link
Could you provide a little more info as to what makes this currently not possible? Our deploy.rb symlinks vendor/bundler_gems/gems to a shared location, so the gems don't get expanded on every deploy and this mechanism seems to work?!
Here's a gist of my deploy: http://gist.github.com/244420 . I symlink the directories under vendor/gems though.
This ticket was opened as a result of http://rubyglasses.blogspot.com/2009/11/gem-bundle-with-capistrano.html
Do you guys have any thoughts on what the difference is between your (working) setup and Taryn's failed one?
I am symlinking the directories under vendor/bundler_gems (vendor/gems in my case), but not the top-level directory. I actually would think the preferred method should be to only symlink the cache directory, and let the other ones be regenerated. This should aid in rolling back a deploy.
I don't do that however, since I'm not concerned about the rollback.
Restating my previous entry:
After reading his blog post and re-reading the title, I agree you can't symlink vendor/gems (I think I've had this problem as well). I personally was fine with symlinking the sub-directories, and can see how both approaches (symlink the whole dir versus the sub-dir) have merit.
vandrijevik
Thu Dec 10 18:29:07 -0800 2009
| link
Ah, point number 5 (Taryn's ideal one) is currently not possible due to the locations of Gemfile and bin.
I think it boils down to:
touch some_file ln -s /tmp foo cd foo ruby -e 'puts File.exist? %Q[#{File.dirname(File.expand_path(__FILE__))}/../some_file]'Due to the fact that all File and Dir utils resolve symlinks, loading Gemfile (or locating bin, for that matter) from environment.rb will fail since Gemfile and bin/ reside in the not-symlinked app directory.
-
link from gems/ into dirs/ uses expand_path which creates absolute link paths
0 comments Created about 1 month ago by jsierlesThese should be relative links
Comments
-
1 comment Created about 1 month ago by dsisneroBundler Issue on windows machinewindowsxI have had issues with bundler when using it on a windows machine. I initially thought it was because of spaces in the directory path but then when trying it on a location without spaces, it still had problems. If I try to install do_sqlite3 using gem install it works but if I try to install it using gem bundle, it doesn't. A cli session showing this is at http://pastie.org/687220
Also, pasted at http://pastie.org/687233 is Luis Lavena's response to this when I submitted it to him on the rubyinstaller mailing list
Comments
I am having the same issue on a OS X machine. building of native extensions fails HARD! It seems that the gcc commands do not have the proper -I setup to find basic headers like string.h, stdio.h, etc. these files live in the /Developer/SDK/*/ dirs on OS X
-
1 comment Created about 1 month ago by deepjBundler failed on Windows and Ruby 1.9.1p243 with Rails 2.3.41.9xHi,
I'm trying to use Bundler in my project but I'm still getting the following error message:root@ROOT:/c/dev/MUNI/Bakalarka/portfonica$ ruby script/server webrick => Booting WEBrick => Rails 2.3.4 application starting on http://0.0.0.0:3000 c:/dev/MUNI/Bakalarka/portfonica/gems/environment.rb:157:in `instance_eval': can't convert Symbol into Integer (TypeError) from c:/dev/MUNI/Bakalarka/portfonica/gems/environment.rb:131:in `gem' from (eval):10:in `require_env' from c:/dev/MUNI/Bakalarka/portfonica/gems/environment.rb:157:in `instance_eval' from c:/dev/MUNI/Bakalarka/portfonica/gems/environment.rb:157:in `require_env' from c:/dev/MUNI/Bakalarka/portfonica/config/../config/preinitializer.rb:16:in `block (2 levels) in extend_environment' from c:/dev/MUNI/Bakalarka/portfonica/gems/gems/rails-2.3.4/lib/initializer.rb:137:in `process' from c:/dev/MUNI/Bakalarka/portfonica/gems/gems/rails-2.3.4/lib/initializer.rb:113:in `run' from c:/dev/MUNI/Bakalarka/portfonica/config/environment.rb:5:in `' from c:/dev/MUNI/Bakalarka/portfonica/gems/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require' from c:/dev/MUNI/Bakalarka/portfonica/gems/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `block in require' from c:/dev/MUNI/Bakalarka/portfonica/gems/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in' from c:/dev/MUNI/Bakalarka/portfonica/gems/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require' from c:/dev/MUNI/Bakalarka/portfonica/gems/gems/rails-2.3.4/lib/commands/server.rb:84:in `' from script/server:3:in `require' from script/server:3:in `'
I just generated a empty rails project and followed this steps:
- run
gem install bundlecommand - create a
Gemfilein the root folder inside the empty rails project - edit the one (a contain of this file is below)
- create
config/preinitializer.rbfile - put a code for this file from http://is.gd/4MmDN
- run the command gem bundle
Gemfile
clear_sources source 'http://gemcutter.org' bundle_path 'gems' gem 'rails', '2.3.4' gem 'haml', '2.2.10' gem 'prawn', '0.5.1' gem 'couchrest', '0.33' only :test do gem 'rspec', '1.2.9' gem 'rspec-rails', '1.2.9' end
Now you need to run
ruby script/server. You should get the error message above.I tried to use
disable_system_gemsand without one in theGemfilebut without any success.Comments
- run
-
0 comments Created about 1 month ago by jweiss[PATCH] Add support for git shallow clonesfeaturexI've added support for shallow git clones which reduces the size of the repository.
The test is not the nicest but git doesn't do shallow clones on file:// repos...
See http://github.com/jweiss/bundler/commit/81869330f4442a5630c62d080ee395d205fb2179
Comments
-
Maybe vendor/gems/repos ?
Comments
"dirs" IS an unhelpful name. What is the correct handling of the "dirs" directory? Should it be checked in? When this occurs there is no .gem file in the cache.
The suggestion of the default .gitignore suggests that "dirs" shouldn't be checked in.
bin/
vendor/gems/
!vendor/gems/cache/But if you don't check it in, and there's no cached .gem file the gem will not be able to be extracted from your own repo, it will have to be cloned from the original repo at deploy time.
-
1 comment Created 2 months ago by bahuvrihiPrevent circular symlinks to working directoryfeaturexI've been thinking more about the 'circular symlink' thing and I think the approach is desirable even though the symlink isn't. (regarding http://github.com/wycats/bundler/issues/closed#issue/64)
Say you don't do the circular approach:
[sample.gemspec] Gem::Specification.new do |s| s.name = "sample" s.version = "1.0" s.add_dependency "rack", "= 1.0.0" end [Gemfile] spec = eval File.read("sample.gemspec") spec.dependencies.each do |dep| options = {} options[:only] = :testing if dep.type == :development gem dep.name, dep.version_requirements, options endWhen you bundle this your environment.rb file looks like this:
[vendor/gems/environment.rb] ... $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-1.0.0/bin") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-1.0.0/lib") ... @bundled_specs["rack"] = eval(File.read("#{dir}/specifications/rack-1.0.0.gemspec")) @bundled_specs["rack"].loaded_from = "#{dir}/specifications/rack-1.0.0.gemspec"What's missing is are the lib and bin paths for the working directory (ie for the sample project). This prevents you from using the environment.rb file to setup your full environment; at some point you need to add whatever local load paths you need.
Instead you could go the route of depending on yourself, which isn't as circular as it sounds because you're really just making an environment.rb that includes the local load paths... there's actually nothing circular going on.
[Gemfile] spec = eval File.read("sample.gemspec") gem spec.name, spec.versionProduces:
[vendor/gems/environment.rb] ... $LOAD_PATH.unshift File.expand_path("#{dir}/../../bin") $LOAD_PATH.unshift File.expand_path("#{dir}/../../lib") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-1.0.0/bin") $LOAD_PATH.unshift File.expand_path("#{dir}/gems/rack-1.0.0/lib") ... @bundled_specs["sample"] = eval(File.read("#{dir}/specifications/sample-1.0.gemspec")) @bundled_specs["sample"].loaded_from = "#{dir}/specifications/sample-1.0.gemspec" @bundled_specs["rack"] = eval(File.read("#{dir}/specifications/rack-1.0.0.gemspec")) @bundled_specs["rack"].loaded_from = "#{dir}/specifications/rack-1.0.0.gemspec"Now you can use a test task like this:
[Rakefile] task :test do test = Dir.glob('test/**/*_test.rb') cmd = ['ruby', '-w', '-rvendor/gems/environment.rb', '-e', 'ARGV.dup.each {|test| load test}'] + tests system(*cmd) endIn this setup the entirety of your environment is handled by your gemspec + bundler, which I think is not only slick but adds to the completeness of the sandbox.
Again the only practical issue of this approach is the circular symlink which messes up text editors. A check can prevent the creation of the symlink. Omitting the symlink doesn't appear to break anything because it isn't actually used in the environment.rb file. The patch is here for your consideration: bahuvrihi@3731b5a
Comments
-
2 comments Created 5 months ago by carllercheResolver should timeout after a while of calculating the dependenciesbugxComments
carllerche
Tue Jul 28 16:26:50 -0700 2009
| link
There are still some crazy gem setups that cause the resolver to run for a long... long... long... (infinite?) time. There should be a timeout until those situations can be checked.
gem "merb", "= 0.9.4"
gem "merb-auth-slice-password", "<= 1.0.7.1"gem "merb", "= 0.9.4"
gem "merb-auth", "> 0.1.0"
carllerche
Wed Jul 29 18:01:29 -0700 2009
| link
gem "merb", "~> 0.9.4"
gem "merb-auth-slice-password", "<= 1.0.7.1"
gem "merb-auth", "> 0.1.0" -
5 comments Created about 1 month ago by byuBe able to alias a gem as a different gem.featurexTo solve this problem:
json, json_pure and yajl-ruby all get downloaded and required through the resolution process.
I would like to specify that I'd like to use yajl while excluding json and json_pure.
Comments
The Gemfile and the output of a
gem bundle
http://gist.github.com/228322More details about the env:
Mac OS X 10.5
homebrew installed:
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin9.8.0]
gem 1.3.5gem list in rubygems (went for almost bare rubygems system to focus on bundler):
LOCAL GEMSactionmailer (2.3.4)
actionpack (2.3.4)
activerecord (2.3.4)
activeresource (2.3.4)
activesupport (2.3.4)
bundler (0.7.0)
rack (1.0.1)
rails (2.3.4)
rake (0.8.7)
rubygems-update (1.3.5)Thanks
The problem is that json and json_pure are actual dependencies of something. Ignoring them seems dangerous no?
For this specific case, yajl-ruby has a JSON gem Compatibility API: require 'yajl/json_gem' (my posted Gemfile has mistakenly required :lib => 'yajl' instead).
http://github.com/brianmario/yajl-rubyAnd in general, I would conjecture that libraries would not notice a difference amongst differing implementations if they conform to an api. I would confirm this with series of unittests from the implementation library all the way up the stack (including the depending libraries) to my main application. To accomplish this, I'd like the power to swap implementation libraries in an out. :)
Thanks
I've run into this where I wanted to use a specific version of sinatra, and one of the gems I depend on (cehoffman-sinatra-respond_to) depends on sinatra-sinatra, which gets required, and ends up being the wrong version.
I end up having to run a post-process to delete sinatra-sinatra to make the correct version of sinatra load.
-
2 comments Created 3 months ago by merbjediUsing Bundle::Environment.load without loading rubygemsfeaturexI'm trying to use bundler with disable_rubygems while still using Bundle::Environment.load to do all my require's. Would it be possible to open up a hook into bundler where I could just require "bundler/environment" and not pick up the rubygem core class requirements (like remote_fetcher, etc)?
Comments
carllerche
Wed Sep 30 16:41:09 -0700 2009
| link
I'll check it out. Why are you doing Bundle::Environment.load to do your requires?
merb-core (master) does this in the bootloader
http://github.com/wycats/merb/blob/master/merb-core/lib/merb-core/bootloader.rb
line 413 -
0 comments Created about 1 month ago by josevalimPreinitializer example for Rails 2.3 in README needs to be improvedbugxPreinitializer example with bundler for Rails 2.3 does not use require_dependency neither loads init.rb files. Something along those lines might fix it:
require "#{File.dirname(__FILE__)}/../vendor/bundler_gems/environment" Gem.loaded_specs.values.each do |spec| require_dependency File.expand_path("lib", spec.full_gem_path) init = File.expand_path("init", spec.full_gem_path) require init if File.exists?(init) endThanks Carlhuda! :)
Comments
-
2 comments Created about 1 month ago by merbjediAdd a tiny warning when Gem not found and disable_system_gems is enabledbugxMinor suggestion:
Was banging my head against the wall the other day when gems installed locally weren't being installed via "gem bundle" command. Turns out I had disable_system_gems on. I know, dumb error, but it would be nice if it gave a more detailed warning after it cant find a gem of where it tried to look.
Comments
Are you saying that gem bundle is not pulling gems from the local system gems when disable_system_gems is on?
-
1 comment Created about 1 month ago by rubiiiBundler seems to fail at bundling JRuby gem versionsjrubyxHi,
I noticed that with Hpricot 0.8.2 (which is available for both MRI and JRuby), running "gem bundle" with JRuby does not resolve the JRuby version of the gem. It just goes for the MRI version which fails due to native extensions.
jruby -S gem install hpricot --version 0.8.2Installs the JRuby version, so I expected bundler to bundle the JRuby version as well.
Can anyone verify or recommend a fix?
Comments
-
Sometimes you submit your gem files to a file sharing service, it will be good if bundler will be able to download that gems and build them, without to create a remote gem repository.
gem "gizmo_api", :url => 'http://example.com/files/gems/gizmo_api-1.2.3.gem'Comments
-
I'd like to use bundler's great gem management system to make sure my desired gems are installed on my system. I have multiple projects using the same set of gems, and don't really want to have to vendor all of them separately. I'd like to be able to configure bundler to instal the gems onto my system, instead of vendoring them.
I believe I can get around this by setting my gem path to ~/.gem, and the configuration option may be to just use that setting in a system-specific manner.
My use-case is I'm working on a set of projects that just use ruby for some helpers (in particular Rake). I have a set of gems I'm using between these projects (in particular to manage some configuration variables), and I don't need the robustness of vendored gems (since they won't go to prod), but I do want to leverage the convenience of a Gemfile.
Comments
-
My comments on Corey's post:
Rails is still using GemInstaller to bootstrap itself and autoupdate rubygems. That's kinda silly, but still required to be called my automated CI box setup scripts (which are still languishing in my branch while I reconsider the approach...)
There should be something like this in bundler itself - like a shell script that you can wget and install with a one-liner. e.g.:
wget -O /tmp/bootstrap_bundler.sh http://github.com/wycats/bundler/raw/master/ci/bootstrap_bundler.sh && sh /tmp/bootstrap_bundler.sh
Comments
-
chokes on 'mongo' gem in 1.9 - due to silently rescuing LoadError ?
3 comments Created 17 days ago by davidlee[ davidlee /tmp/wtf ] # cat Gemfile disable_system_gems gem 'mongo' source 'http://gemcutter.org' source 'http://gems.rubyforge.org' source 'http://gems.github.com' [ davidlee /tmp/wtf ] # cat init.rb require './vendor/gems/environment' Bundler.require_env [ davidlee /tmp/wtf ] # ruby init.rb /private/tmp/wtf/vendor/gems/gems/mongo-0.18/lib/mongo/types/objectid.rb:130:in `require': uninitialized constant Mongo::InvalidStringEncoding (NameError) from /private/tmp/wtf/vendor/gems/gems/mongo-0.18/lib/mongo/types/objectid.rb:130:in `' from /private/tmp/wtf/vendor/gems/gems/mongo-0.18/lib/mongo/types/objectid.rb:24:in `' from /private/tmp/wtf/vendor/gems/gems/mongo-0.18/lib/mongo/types/objectid.rb:21:in `' from /private/tmp/wtf/vendor/gems/gems/mongo-0.18/lib/mongo.rb:6:in `require' from /private/tmp/wtf/vendor/gems/gems/mongo-0.18/lib/mongo.rb:6:in `' from /private/tmp/wtf/vendor/gems/environment.rb:80:in `require' from /private/tmp/wtf/vendor/gems/environment.rb:80:in `gem' from /private/tmp/wtf/vendor/gems/../../Gemfile:3:in `require_env' from /private/tmp/wtf/vendor/gems/environment.rb:102:in `instance_eval' from /private/tmp/wtf/vendor/gems/environment.rb:102:in `require_env' from init.rb:2:in `' [ davidlee /tmp/wtf ] # irb ruby-1.9.1-p243 > require 'mongo' => true ruby-1.9.1-p243 > ^D%Comments
in my actual project it also spews blood and vomit under 1.8 - i just can't quite distill it as succinctly - FWIW.
Actually, it seems not to be bundler's fault. After much pain, I discovered this is what's needed:
gem 'mongo', '= 0.18' # MUST BE THE **** SAME
gem 'mongo_ext', '= 0.18' # AS THIS
gem 'mongo_mapper', '= 0.6.6' -
Hi,
I lock in my versions in the Gemfile and sometimes I just want to pull in the latest and test against them. Would it make sense to have something like;
gem bundle --ignore-version(s)
which would pull in whatever the latest versions are for each gems so you can test against them and then decide whether or not to keep them. Obviously I can edit my Gemfile and take out the specified versions and git checkout if I don't want the change, but that gets annoying after changing a few. Im wondering if this might at all be useful for other people.
Cheers,
Dylan.
Comments
carllerche
Mon Oct 05 23:17:03 -0700 2009
| link
An interesting concept. I would like to postpone this until 0.8.0 unless somebody has a patch?
carllerche
Mon Oct 05 23:17:41 -0700 2009
| link
Such a feature should probably be able to take a list of gems for which to limit the ignore versions flag.
Yeah, didn't work on anything as it was just an idea this morning at work. Specifying for a list gems sounds good too. Hopefully have some time to look at it later this week.
Spent some time looking through the source and understanding how the versioning works. It looks like the version for each dependency is set before (as the Gemfile is parsed at that time) the options are passed in to the environment. Does that mean it might be best to ignore the version (if the option is set) as it goes to install the gem? Therefore just override the @version in the dependency.
-
0 comments Created 5 months ago by halorgiumRetry logic for network intensive actionsfeaturex- *.gem downloading
- source index downloading
Comments
-
Downloading rack-test-0.5.3.gem
Downloading rake-0.8.7.gem
Downloading sqlite3-ruby-1.2.5.gem
Installing abstract (1.0.0)
C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/repository.rb:170:in `symlink': symlink() function is unimplemented on this mac
hine (NotImplementedError)
from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/repository.rb:170:in `expand_vendored_gem' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/repository.rb:121:in `block in do_install' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/repository.rb:111:in `each' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/repository.rb:111:in `do_install' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/repository.rb:44:in `install' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/environment.rb:60:in `install' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/cli.rb:39:in `bundle' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/cli.rb:65:in `run' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/cli.rb:6:in `run' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/bundler-0.7.1/lib/bundler/commands/bundle_command.rb:68:in `execute' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/command.rb:257:in `invoke' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/command_manager.rb:132:in `process_args' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/command_manager.rb:102:in `run' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/gem_runner.rb:58:in `run' from C:/Ruby19/bin/gem:21:in `<main>'Comments
def expand_vendored_gem(spec, options) add_spec(spec) FileUtils.mkdir_p(@path.join("gems")) if RUBY_PLATFORM.downcase =~ /[mswin|mingw]32/ require 'rubygems' require 'win32/dir' Dir.create_junction(@path.join("gems", spec.full_name).to_s, spec.location.to_s) else File.symlink(spec.location, @path.join("gems", spec.full_name)) end end -
Warnings for instance variable not initialized
0 comments Created 11 days ago by bahuvrihiThe context class created in environment.rb raises some warnings due to the @only and @except variables not being initialized. Example:
% echo 'gem "rack"' > Gemfile % gem bundle % ruby -w -rvendor/gems/environment -e 'Bundler.require_env(:test)' ./vendor/gems/environment.rb:72: warning: instance variable @only not initialized ./vendor/gems/environment.rb:78: warning: instance variable @except not initializedThe fix is to initialize the variables: bahuvrihi@b388d72 (note you may just want to cherry pick this commit -- it's off of a branch relating to another issue that hasn't been acted on yet -- http://github.com/wycats/bundler/issues#issue/72).
Comments
-
[PATCH] Avoid loading RubyGems multiple times on Ruby 1.9
0 comments Created 5 days ago by wilsonI just spent most of the day getting a Rails 2.3.5 project bundling cleanly on both 1.8.7 and 1.9.1.
In the end, I wound up with a working setup for both, but under 1.9.1 numerous warnings are printed as RubyGems constants are re-initialized.
One possible fix is the (trivial) attached patch, which simply doesn't require 'rubygems' in environment.rb if the 'gem' method is already defined.
Patch can be found here:
http://supremetyrant.com/ruby/bundler_rubygems_19.patch
Comments
-
Gem version not respected when :vendored_at or :path option used
0 comments Created 4 days ago by ajsharpI have the following in my Gemfile:
gem 'rails', '2.3.4', :path => 'vendor/rails'
When i run gem bundle, bundler downloads 2.3.5. If I leave off the :path option, it downloads the correct version.
Comments
-
i was getting this error - maybe this is a ruby 1.8.6 issue?
[dc@tetris:dev/fish]$ gem bundle --backtrace
ERROR: While executing gem ... (TypeError)
wrong argument type Symbol (expected Proc) /Library/Ruby/Gems/1.8/gems/bundler-0.7.2/lib/bundler/dsl.rb:110:in `gem' /Users/dc/dev/fish/Gemfile:8:in `evaluate' /Library/Ruby/Gems/1.8/gems/bundler-0.7.2/lib/bundler/dsl.rb:14:in `load_gemfile' /Library/Ruby/Gems/1.8/gems/bundler-0.7.2/lib/bundler/cli.rb:35:in `initialize' /Library/Ruby/Gems/1.8/gems/bundler-0.7.2/lib/bundler/cli.rb:6:in `new' /Library/Ruby/Gems/1.8/gems/bundler-0.7.2/lib/bundler/cli.rb:6:in `run' /Library/Ruby/Gems/1.8/gems/bundler-0.7.2/lib/bundler/commands/bundle_command.rb:68:in `execute' /Library/Ruby/Site/1.8/rubygems/command.rb:257:in `invoke' /Library/Ruby/Site/1.8/rubygems/command_manager.rb:132:in `process_args' /Library/Ruby/Site/1.8/rubygems/command_manager.rb:102:in `run' /Library/Ruby/Site/1.8/rubygems/gem_runner.rb:58:in `run' /usr/bin/gem:21the following hack fixes it:
# keys = %w(vendored_at path only except git path bundle require_as tag branch ref).map(&:to_sym) keys = [:vendored_at, :path, :only, :except, :git, :path, :bundle, :require_as, :tag, :branch, :ref]Comments












think this should use a SHA of the file contents rather than mtime