This project is archived and is in readonly mode.
rake aborted! no such file to load --
-
scottsymm (at gmail)
i was able to reproduce with ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin9.8.0]
-
scottsymm (at gmail)
unpacking the gem in vendor/plugins/ seems to work for me. although, rake call does generate a warning:
DEPRECATION WARNING: Having rake tasks in PLUGIN_PATH/tasks or PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead.
cd vendor/plugins
gem unpack faker -
José Valim
- Assigned user set to Carl Lerche
-
Lenary
Indeed I came across this problem as well, and it's completely reproducible.
This said, there is an easy workaround, which uses Bundler as is easy.
In your bundle file, declare the following:
group :rake do gem 'faker' endand then add the following to your Rakefile, or even to the top of the individual rake task:
Bundler.require(:rake)then all your problems are solved.
-
Ryan Bigg
If this is inheriting from the :environment task then shouldn't that be the one that's loading these gems? I don't think the rake group workaround is the best idea.
-
José Valim
- Milestone cleared.
- State changed from new to open
- Assigned user changed from Carl Lerche to José Valim
+1 for Lenary suggestion. If you want to use faker in development and test as well, it's ok to put it under the environment group.
Maybe we could even "Bundler.require(:rake)" by default in the Rakefile. It should be discussed.
-
Ryan Bigg
Uh, shouldn't that be inside the :environment task where this inherits from? That would make more sense, no?
-
José Valim
Sorry Ryan, I guess I misunderstood you. Can you please give an example?
-
Ryan Bigg
I am suggesting that this
Bundler.require(:rake)be put intotask :environmentdefinition rather than in the Rakefile of the application. -
José Valim
It's better to avoid adding bundler inside the framework. We should do our best to have bundler just in the generated application in order to be packaging system agnostic. :)
-
Ryan Bigg
Ah right, of course, then yes Lenary's suggestion is fine. Sorry for the confusion.
-
José Valim
No problem at all!
-
Lenary
I'm just about to write a generator patch for this. :D
-
Jeremy Kemper
- State changed from open to invalid
-1 on an additional
Bundler.requireLooks like faker is just missing from the OP's
Gemfile. Add it, bundle, and you're good to go. -
cocoOS
the problem is machinist require faker..It solve delete(or coment) require 'faker' inside machinist.rb..I had the same problem :).....