-
-
Notifications
You must be signed in to change notification settings - Fork 2k
calling the same gem in different groups causes the gem not to be loaded in any environment #135
Comments
ah, so if you move the factory_girl out of the :test group and into the dev/staging group (and add test to it) when running under test mode factory_girl is not found/loaded up. Why wouldn't calling group multiple times on the same environment key not just append/modify the gems in the list (rather than not add them at all)? |
Sorry, I'm still sort of unclear on what exactly triggers this bug. What is a working example, and what is a not working example? |
huh; I can't recreate. I'll open this up again if I can. Sorry about that Indirect |
ah! I can sort of recreate it.... It has to do with the lock file. If I lock it, it sometimes creates an invalid lock file. Sometimes it creates the right one sometimes not, which makes me wonder if their is a hash being used in a place where order (say, of the keys) is expected. It feels like that sort of error. So far, when I unlock it is fine. Here is a gist of the Gemfile and Gemfile.lock. Notice how Gemfile.lock doesn't have factory_girl in the right buckets (it only has it in staging, not dev or test) |
huh, how can I reopen this? Would suck to create a dup.... |
Here is a minimal test case that reproduces reliably for me: |
FYI: I also see this problem if I simply include factory_girl in ANY group, and then rake tests. http://gist.github.com/322193 |
Fixed in 3685d0b. |
if your gem file looks like this:
source "http://gemcutter.org"
then script/console
Factory
#NameError: uninitialized constant Factory
however, if you don't duplicate the factory_girl gem call in both groups but combine it into one, it works and is loaded properly.
The text was updated successfully, but these errors were encountered: