He has written his own pagination class, but it is buggy and not
very DRY. Therefore I replaced it with the well-known "will_paginate"
gem, and that works just great.
The only problem is, that although this works on my machine, my
colleague (for whatever reason) refuses to install any additional gems
on his machine (I guess this is why he wrote his own paginator in the
first place).
My question: is it possible using rails 3.0.3, to unpack ONLY the
will_paginate gem to my vendor directory, so that it will work in the
project without my colleague having to install it?
I tried "bundle install vendor/gems", but this installs everything to
this directory.
In that case I would be grateful if someone could tell me:
Is this a realistic thing to do?
Or, is it a silly idea which goes against some principle of Rails 3?
In that case I would be grateful if someone could tell me:
Is this a realistic thing to do?
Or, is it a silly idea which goes against some principle of Rails 3?
I can't answer either of those directly, but -- you previously said:
The only problem is, that although this works on my machine, my
colleague (for whatever reason) refuses to install any additional gems
on his machine (I guess this is why he wrote his own paginator in the
first place).
What happens when you want to add a feature that requires adding
a different gem? Is he going to write his own version of that too? Or
when an existing gem needs an update?
My question: is it possible using rails 3.0.3, to unpack ONLY the
will_paginate gem to my vendor directory, so that it will work in the
project without my colleague having to install it?
I tried "bundle install vendor/gems", but this installs everything to
this directory.
1) So install everything in vendor/gems and be done with it; how is
that a problem? Or,
2) Install everything, delete what you don't want, and commit the one
gem you need. Done. Or,
What happens when you want to add a feature that requires adding
a different gem? Is he going to write his own version of that too? Or
when an existing gem needs an update?
U'm, I'm afraid he might try ...
Install everything, delete what you don't want, and commit the one
gem you need. Done.
This is what I'm having trouble with. I've worked quite a lot with Rails
2.x, but this is the first thing I've done with Rails 3.x and am
therefore not very familiar with Bundler.
I did install everything and then deleted what I didn't need, but then
when I tried to start WEBrick, it wouldn't start complaining about
missing dependencies. I no longer remember the exact error message as I
rolled everything back after that, but I could reproduce it if that
helps.
What exactly do you mean by "Commit the gem you need".
Am I missing a step?
Yeah, sorry, you're right -- I just tries that on a throwaway app and it
doesn't seem to work.
% rails s
Could not find rake-0.8.7 in any of the sources
Run `bundle install` to install missing gems.
Meh. So, either try to figure out why it's now looking for everything in
vendor/gems -- maybe everything listed under "DEPENDENCIES" in
your Gemfile.lock? -- or just install everything and leave it there.
If you're distributing the app to other users, that might be the safest
thing to do anyway.
Thank you for trying that out.
That's exactly the error I got.
I'll have a play with it over the next few days and if I figure out a
solution, I'll post back here just to be complete.
Other than that, it seems my best bet is to try to get my colleague to
start installing gems