rake db:seed does't work

447 views
Skip to first unread message

skif

unread,
Sep 9, 2010, 5:40:37 PM9/9/10
to Refinery CMS
When i try to execute rake task db:seed i get error:


skif | 0 [09-10 01:36] ~/Dropbox/Projects/rails/ov2 (.013 Mb) # rake
db:seed
(in /Users/skif/Dropbox/Projects/rails/ov2)
rake aborted!
uninitialized constant InquirySetting
/Users/skif/Dropbox/Projects/rails/ov2/db/seeds/inquiry_settings.rb:
1:in `<top (required)>'
/Users/skif/Dropbox/Projects/rails/ov2/db/seeds.rb:3:in `block in <top
(required)>'
/Users/skif/Dropbox/Projects/rails/ov2/db/seeds.rb:2:in `each'
/Users/skif/Dropbox/Projects/rails/ov2/db/seeds.rb:2:in `<top
(required)>'
/opt/local/lib/ruby1.9/gems/1.9.1/gems/activerecord-3.0.0/lib/
active_record/railties/databases.rake:281:in `block (2 levels) in <top
(required)>'
/opt/local/lib/ruby1.9/1.9.1/rake.rb:634:in `call'
/opt/local/lib/ruby1.9/1.9.1/rake.rb:634:in `block in execute'
/opt/local/lib/ruby1.9/1.9.1/rake.rb:629:in `each'
/opt/local/lib/ruby1.9/1.9.1/rake.rb:629:in `execute'
/opt/local/lib/ruby1.9/1.9.1/rake.rb:595:in `block in
invoke_with_call_chain'
/opt/local/lib/ruby1.9/1.9.1/monitor.rb:201:in `mon_synchronize'
/opt/local/lib/ruby1.9/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/opt/local/lib/ruby1.9/1.9.1/rake.rb:581:in `invoke'
/opt/local/lib/ruby1.9/1.9.1/rake.rb:2041:in `invoke_task'
/opt/local/lib/ruby1.9/1.9.1/rake.rb:2019:in `block (2 levels) in
top_level'
/opt/local/lib/ruby1.9/1.9.1/rake.rb:2019:in `each'
/opt/local/lib/ruby1.9/1.9.1/rake.rb:2019:in `block in top_level'
/opt/local/lib/ruby1.9/1.9.1/rake.rb:2058:in
`standard_exception_handling'
/opt/local/lib/ruby1.9/1.9.1/rake.rb:2013:in `top_level'
/opt/local/lib/ruby1.9/1.9.1/rake.rb:1992:in `run'
/opt/local/lib/ruby1.9/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in
`<main>'


My refinery gems:

skif | 0 [09-10 01:36] ~/Dropbox/Projects/rails/ov2 (.013 Mb) # gem
list |grep refinery
refinerycms (0.9.8)
refinerycms-blog (1.0.rc6)
refinerycms-i18n (0.9.8.6)
refinerycms-inquiries (0.9.8.7)
refinerycms-news (0.9.9)
refinerycms-portfolio (0.9.7)


My environment:

skif | 0 [09-10 01:39] ~/Dropbox/Projects/rails/ov2 (.013 Mb) # ruby -
v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10]
skif | 0 [09-10 01:39] ~/Dropbox/Projects/rails/ov2 (.013 Mb) # rake --
version
rake, version 0.8.7
skif | 0 [09-10 01:39] ~/Dropbox/Projects/rails/ov2 (.013 Mb) # rails
--version
Rails 3.0.0

Philip Arndt

unread,
Sep 9, 2010, 5:47:35 PM9/9/10
to refine...@googlegroups.com
What happens if you use this instead:

rake db:setup


Aardmark

unread,
Sep 9, 2010, 6:41:40 PM9/9/10
to Refinery CMS
I have the same problem with db:setup too.

I am guessing here but I think the problem is due to there being no
require in the seed file for the inquiries ie. db/seeds/
inquiry_settings.rb.

When you originally generate the site with "refinerycms blah" db:setup
works fine but when you try and generate the production (or test)
database by just running db:setup you get the 'uninitialized constant
InquirySetting' error.

Philip Arndt

unread,
Sep 9, 2010, 6:50:09 PM9/9/10
to refine...@googlegroups.com
Good sleuthing. I'm trying to figure out currently why this is happening so this helps!

Philip Arndt

unread,
Sep 9, 2010, 7:03:19 PM9/9/10
to refine...@googlegroups.com
OH I figured it out

in 0.9.8.7 of refinerycms-inquiries we changed things so that you no longer need :require => 'inquiries'

Please make the line this instead:

gem 'refinerycms-inquiries', '~> 0.9.8.7'

Now it'll work!

Sorry.

Aardmark

unread,
Sep 9, 2010, 7:42:19 PM9/9/10
to Refinery CMS
Works fine now.
Thanks!

skif

unread,
Sep 10, 2010, 6:53:00 AM9/10/10
to Refinery CMS
Thank you!
Reply all
Reply to author
Forward
0 new messages