Skip to content

Instantly share code, notes, and snippets.

@snusnu
Created February 5, 2010 02:54
Show Gist options
  • Save snusnu/295446 to your computer and use it in GitHub Desktop.
Save snusnu/295446 to your computer and use it in GitHub Desktop.
snusnu
guys, is this a known bug in current master? http://pastie.org/810422 … imho railties shouldn't depend on mysql gem (datamapper for one doesn't need that)
is this bundler related?
_nb_
that is a known bug .. we ran into it earlier today
i think those gems (pg, mysql, etc) are defined to be development requirements
but rake gem isn't respecting that
_nb_
if i remember correctly
snusnu
yeah, they're inside a :test group .. i just ran a bundle install —without=test from inside my rails clone .. is this necessary, or would it exclude test by default?
_nb_
it would not exclude test by default. all groups are included unless you explicitly without them.
when you bundle install
so says wycats from across the table
because there's no way to know what groups you want when you install
snusnu
heh good to know for sure, i thought i read that somewhere
_nb_
there are options on Bundler.setup i think
to allow you to restrict at runtime
but .. that's a different story
snusnu
yeah, you can list all groups you want to add to the loadpath iirc
btw, i can't get something like http://pastie.org/810449 to work … i'm still kinda confused about gems vs. git repos .. when i run this, it tells me rails (~> 3.0, runtime) not found in any of the sources required by rails3_datamapper (>= 0, runtime)
_nb_
right
so .. you're telling bundler to use "rails" from gem.. which is gemcutter's sources
but you're telling bundler to use a git clone of rails3_datamapper (don't use gemcutter, instead pull the source from git directly)
right ?
rails3_datamapper is dependent on rails 3
which is not yet on gemcutter
there is no rails-3.0.0 gem on gemcutter
so .. bundler will throw errors because dependencies cannot be met
if instead you git "rails" and point to the github/rails/rails.git .. it'll use the master branch
which is "rails3"
because it'll pull the source directly
make any sense ?
snusnu
awesome, thx a lot for that explanation! makes sense yeah!
wycats_
git is specifying a source, not a gem
snusnu
yeah, now i think i finally got it :) you told me so the other day already, but it took a while for my brain obviously :)
snusnu
so i have git "git://github.com/snusnu/dm-more.git", 'branch' => 'active_support' inside my gemfile, but i don't want *all* dm-more gems required when rails does the Bundler.require .. how would i go about that? or would it even automatically require everything?
wycats_
the only things that get required are gems specified with #gem
snusnu
ok, so basically everything will be fine once we (datamapper) have proper gems with AS support .. and in the meantime, i think i know how to workaround already (for dev) .. thx!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment