public
Description: FixtureReplacement rails plugin (version 2 and on)
Homepage: http://replacefixtures.rubyforge.org/
Clone URL: git://github.com/smtlaissezfaire/fixturereplacement.git
Search Repo:
(hopeful) bugfix (without regression) for linoj's bug

git-svn-id: http://thmadb.com/public_svn/plugins/fixture_replacement@7 
6dbbdfbd-06da-443d-8068-b1bdd22a71ef
smt (author)
Fri Sep 28 14:39:00 -0700 2007
commit  4d8128f3baaef1cc7d0f1632c9f540a7dba02309
tree    25edf5dc2edd8b39a2ae623010637ba4fcaa41ec
parent  062b9b9f648889bbd4867b5d926017ae55c690c6
...
1
2
3
4
5
6
7
8
9
10
11
 
...
 
 
 
 
 
 
 
 
 
 
 
1
0
@@ -1,12 +1,2 @@
0
-# Copyright 2007 Scott Taylor (scott@railsnewbie.com) + Urbis.com
0
-
0
-if ENV["RAILS_ENV"] == "test" || ENV["RAILS_ENV"] == "development"
0
- begin
0
- require File.dirname(__FILE__) + "/../../../db/example_data"
0
- require File.dirname(__FILE__) + "/lib/fixture_replacement"
0
- FixtureReplacement::Generator.generate_methods
0
- rescue Exception => e
0
- raise "Error in FixtureReplacement Plugin: #{e}"
0
- end
0
-end
0
+# Do nothing here...Just a placeholder for rails
...
1
2
3
 
 
 
 
 
 
 
 
 
 
 
...
1
 
 
2
3
4
5
6
7
8
9
10
11
12
0
@@ -1,4 +1,13 @@
0
 
0
-require File.dirname(__FILE__) + "/fixture_replacement/string"
0
-require File.dirname(__FILE__) + "/fixture_replacement/fixture_replacement"
0
+if ENV["RAILS_ENV"] == "test" || ENV["RAILS_ENV"] == "development"
0
+ begin
0
+ require File.dirname(__FILE__) + "/../../../../db/example_data"
0
+ require File.dirname(__FILE__) + "/fixture_replacement/string"
0
+ require File.dirname(__FILE__) + "/fixture_replacement/fixture_replacement"
0
+
0
+ FixtureReplacement::Generator.generate_methods
0
+ rescue Exception => e
0
+ raise "Error in FixtureReplacement Plugin: #{e}"
0
+ end
0
+end
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
0
@@ -1 +1,49 @@
0
+Hi Scott,
0
+
0
+I'm wondering if you have insight into this or if I should go ask somewhere else.
0
+
0
+I installed 2 plug-in today,
0
+first fixture_replacement plugin
0
+and been using it successfully
0
+
0
+Then I installed validates_email_format_of plugin
0
+http://code.dunae.ca/validates_email_format_of
0
+
0
+and added this to my User model
0
+ validates_email_format_of :email
0
+
0
+then script/server wont start
0
+When I comment out this line, it's fine
0
+
0
+Here's the error:
0
+
0
+$ script/server
0
+=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
0
+=> Rails application starting on http://0.0.0.0:3000
0
+=> Call with -d to detach
0
+=> Ctrl-C to shutdown server
0
+** Starting Mongrel listening at 0.0.0.0:3000
0
+** Starting Rails with development environment...
0
+Exiting
0
+/Users/jonathan/rails/reviewramp/vendor/plugins/fixture_replacement/init.rb:9:in `evaluate': Error in FixtureReplacement Plugin: undefined method `validates_email_format_of' for #<Class:0x241cc68> (RuntimeError)
0
+ from ./script/../config/../vendor/rails/railties/lib/rails/plugin/loader.rb:107:in `evaluate'
0
+ from /Users/jonathan/rails/reviewramp/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
0
+ from ./script/../config/../vendor/rails/railties/lib/rails/plugin/loader.rb:107:in `evaluate'
0
+ from ./script/../config/../vendor/rails/railties/lib/rails/plugin/loader.rb:24:in `load'
0
+ from /Users/jonathan/rails/reviewramp/vendor/rails/railties/lib/initializer.rb:183:in `load_plugins'
0
+ from ./script/../config/../vendor/rails/railties/lib/rails/plugin/locator.rb:16:in `each'
0
+ from ./script/../config/../vendor/rails/railties/lib/rails/plugin/locator.rb:16:in `each'
0
+ from /Users/jonathan/rails/reviewramp/vendor/rails/railties/lib/initializer.rb:182:in `load_plugins'
0
+ ... 31 levels...
0
+ from /Users/jonathan/rails/reviewramp/vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require'
0
+ from /Users/jonathan/rails/reviewramp/vendor/rails/railties/lib/commands/server.rb:39
0
+ from script/server:3:in `require'
0
+ from script/server:3
0
+
0
+
0
+I havent tried it in a different project (without fixture_replacement) but looks like yours is getting the blame... :)
0
+
0
+(I'm on Rails Edge)
0
+
0
+-- linoj

Comments

    No one has commented yet.